ok, as my main window i have a window created with CreateWindowEx. pressing a button on that window, shows a dialog window:

invoke DialogBoxParam,hInstance,6000,hWin,addr klasse5,NULL

this dialog is a simple dialog with no other controls in it.. but on WM_INITDIALOG:

klasse5 proc hdlg:DWORD,uMsg:DWORD,wParam :DWORD,lParam :DWORD
invoke CreateDialogParam,hInstance,6001,hdlg,addr k5_1x1,NULL

it opens another dialog that has a flat style and shall appear in the other dialog as a child window (WS_CHILD is specified in the options of this dialog). the procedure for the dialog IN the dialog is like this:
k5_1x1 proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM


mov eax,FALSE
mov eax,TRUE

k5_1x1 endp

but obviously there is something missing, because the dialog in the dialog isn't redrawn sometimes,it gets completely grey (the controls like edit and stuff aren't visible anymore till i click on them or move the top dialog, then the cursor in the edit controls isn't blinking.. and stuff like that..
i attached the exe file.. just press on "klasse 5" .. thank you

Posted on 2003-02-07 16:59:51 by NOP-erator
for some reason your program is kickin my processor usage up to 100% whenever i hit that button
Posted on 2003-02-07 23:12:27 by BubbaFate

that's a good hint, but i don't know why! i use radasm to create my project, and i added a standard dialog to my project. this is how i call the dialog:

.if ax==BN_CLICKED
INVOKE DialogBoxParam,hInstance,6000,hWin,offset klasse5,NULL

this is my dialog procedure:

klasse5 proc hdlg:DWORD,uMsg:DWORD,wParam :DWORD,lParam :DWORD

;invoke CreateDialogParam,hInstance,6001,hdlg,addr k5_1x1,NULL


INVOKE EndDialog,hdlg,NULL

;|> color the staticboxes and the dialog
;mov eax,lParam
;INVOKE SetTextColor,wParam,White
;INVOKE SetBkColor,wParam,Red
;INVOKE CreateSolidBrush,000000FFh

;mov eax,lParam
;INVOKE SetTextColor,wParam,White
;INVOKE SetBkColor,wParam,Black
;INVOKE CreateSolidBrush,00000000h



;INVOKE ReleaseCapture

mov eax,FALSE
mov eax,TRUE
klasse5 endp

so what's wrong?? :confused:
Posted on 2003-02-08 07:54:57 by NOP-erator
Dont know why your dialog uses 100% cpu, but the visual problem may be solved by repositioning your child dialog in the Z-order (with func SetWindowPos). example:

invoke SetWindowPos, hWnd,HWND_TOP,0,0,0,0, SWP_NOSIZE or SWP_NOMOVE or SWP_NOACTIVATE
Posted on 2003-02-08 08:35:49 by japheth
thank you, but the visual problem is obviously a consequence of that 100% cpu usage.. :(

Posted on 2003-02-08 08:48:47 by NOP-erator
Yes, I see now:

possible problem may be to return TRUE as response to WM_PAINT. This may cause a loop.
Posted on 2003-02-08 08:50:19 by japheth
Most of the messages should return 0. For example WM_COMMAND, WM_LBUTTONDOWN, WM_PAINT should return 0.
Posted on 2003-02-08 10:17:41 by roticv
ok.. WM_COMMAND should return obviously zero or something..
thank you, it works fine now..
Posted on 2003-02-08 11:14:32 by NOP-erator