Hide Dialog
-
Hi, How to hide the dialogbox in win32. I tried ShowWindow(hWnd,0) in Initdialog()but fails to hide.
-
Hi, How to hide the dialogbox in win32. I tried ShowWindow(hWnd,0) in Initdialog()but fails to hide.
If the dialogbox is the main window of your application look for the
m_nCmdShow
member of yourCWinApp
class. This member could be set in theInitInstance()
method of your app. Here is an article about it: A Simple Method to Control the Startup State of an MFC SDI Application[^] If it is not the main window try to remove the WS_VISIBLE style from your dialog template. -
Hi, How to hide the dialogbox in win32. I tried ShowWindow(hWnd,0) in Initdialog()but fails to hide.
Handle the first
WM_PAINT
message and callShowWindow(hWnd, false);
there. Because that's the first message that will be posted to the dialog after it's created.“Follow your bliss.” – Joseph Campbell
-
you can only hide a dialog if you have already created it. A simple way is to only create a dialog if it has to be shown :-O
Press F1 for help or google it. Greetings from Germany
KarstenK wrote:
A simple way is to only create a dialog if it has to be shown
I think the OP wants a hidden dialog. :)
“Follow your bliss.” – Joseph Campbell
-
Hi, How to hide the dialogbox in win32. I tried ShowWindow(hWnd,0) in Initdialog()but fails to hide.
If you are using MFC, see the first part of this article.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius