The DialogBox function or DialogBoxParam function displays the dialog box at start up, regardless of whether the template specifies the WS_VISIBLE style. How do I do to come around this. I want to start the dialog box message loop but with a hidden dialog box. The dialog box is to be displayed by pushing a remote button and then hidden again by a new push. It is a mousehook installed by the WM_INITDIALOG making it possible to control the dialog box with the remote button. It all works apart from the hidden dialog box at start up. I would appreciate if somebody could suggest a solution.

Posted on 2003-04-21 16:27:04 by minor28
modal dialogboxes are always displayed regardless of style, for modeless dialogboxes you have to specify WS_VISIBLE

I always found this to be good info on dialogboxes
Posted on 2003-04-21 16:41:25 by Hiroshimator
You can't. Use CreateDialogParam instead, and have your own message loop. Use IsDialogMessage to allow usage of the tab and arrow keys.
Posted on 2003-04-21 16:42:50 by Sephiroth3
First you create the dialog box and then hide it using ShowWindow this is what i mean

hDialog dd ?

ClassName db "YourClassName",0
Title db "YourTitle",0 ;NOTE;- If this paramater is null all windows will Match


invoke FindWindow,addr ClassName,addr Title ;find the handle first then hide it.
invoke ShowWindow,hDialog,SW_HIDE ; use SW_SHOW to show it again(hDialog is the Handle of u r dialog)

Thats All!
Posted on 2003-04-22 00:17:01 by telophase
Thanks all of you

I read the "good info on dialogboxes". Very informative. The only thing I had to do was to change from API DialogBoxParam to API CreateDialogParam. Thanks again.

Posted on 2003-04-22 00:30:15 by minor28

Maybe,you can put your dialogbox in coordinates exceeding the screen resolution.(such as 2000,2000)
Try to hide like this your dialogbox.
Posted on 2003-04-22 02:58:51 by Vortex