Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual C++: how can I hide the main window?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Good morning,
my application starts on a stupid main window. The user select an option from the main window menu. At this point a new window appear. I want to hide the old one. I cannot use "EndDialog" because it is not a dialog box, it is, again, the main window.
Please help me!

Best regards,
Marco

P.S. Yeah, I tried to use the "help". But it ask me to insert the MSDN CD. And guess what? One of my collegue has it, he is on vacation, and the CD is hidden somewhere...
 
Well,
I found the solution, it was pretty simple. It may be odd to asnwer to myself... just wanna save other people time. :eek:)

The solution was:

>ShowWindow ( hWnd, SW_HIDE );

Where hWnd is n handle to the main window.

If you want to unhide the window:

>ShowWindow ( hWnd, SW_SHOW );

Have a nice day,
Marco

*********************************************
Marco Zennaro
Assistant Development Engineer
UC Berkeley ITS PATH

Home-page: *********************************************
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top