Dialog doesnt display properly without aero

155 views Asked by At

i have a application i have been making a for a while now using C++/Win32 and when i create my first dialog it shows up weird when i dont have aero enabled or i am not using windows 7/8.

here is a screenshot of what it looks like:

enter image description here

This is my last resort, as i have no idea why this is doing it. It only happens to the first dialog i make, after the user logs in the rest of the dialogs are fine. It works just fine with aero.

here is my dialog resource script

IDI_MAINDLG DIALOGEX 0,0,195,54
CAPTION "Absolute Hacks Loader"
FONT 8,"MS Shell Dlg",400,0,1
STYLE WS_VISIBLE|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|DS_CENTER|DS_MODALFRAME|DS_SHELLFONT
EXSTYLE WS_EX_TRANSPARENT|WS_EX_TOPMOST|WS_EX_DLGMODALFRAME
BEGIN
  CONTROL "Login",IDI_LOGIN_BTN,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP|BS_DEFPUSHBUTTON,156,12,33,15
  CONTROL "",IDI_USER_TEXT,"Edit",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP|ES_CENTER,45,6,104,13,WS_EX_CLIENTEDGE
  CONTROL "Username:",IDC_STATIC,"Static",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP,3,6,39,12
  CONTROL "Password:",IDC_STATIC,"Static",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP,3,24,33,9
  CONTROL "",IDI_PASS_TEXT,"Edit",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL|ES_PASSWORD|ES_CENTER,45,24,104,12,WS_EX_CLIENTEDGE
  CONTROL "Remember me",IDI_REMEMBER,"Button",WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,135,42,57,9
  CONTROL "Coded By DaRk_NeSs",IDC_STATIC,"Static",WS_CHILDWINDOW|WS_VISIBLE,3,42,75,9
END

1

There are 1 answers

1
Stuart On BEST ANSWER

Remove the WS_EX_TRANSPARENT style from EXSTYLE.

I wrote a little program with a dialog box and the dialog box looked very strange with WS_EX_TRANSPARENT and normal without it.