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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can you (clap clap point) ... Minimize my Dialog..

Status
Not open for further replies.

MFCnewbieDave

Programmer
Mar 9, 2001
4
0
0
US
AppWizard wont create a Dialog-based app with a window that has a MINIMIZE
box (and MIN/MAX/RESTORE arent in the system menu)

How can I either...
1) Add Min and Restore to my system menu
-or-
2) Add a Button to my dialog that will MINIMIZE it.

PreCreateWindow with cs.style |= WS_MINIMIZEBOX dont work (I think this
is for MDI and SDI kiddos only)

candy bar to the first who fix me up. :)

Thanks, dave
davidjaybrown@usa.net

 
Go to your dialog box and right click on it...then click on properties. Click on the styles tab and then there are check boxes for Minimize box, Maximize box, and a few other nice little options that AppWizard has for you to play with.


Niky Williams
NTS Marketing
Niky.Williams@NTSMarketing.com
 
Hi

If you want to add a button to do this, get the handler with the class wizard and add the following:


// Minimize Windows

ShowWindow( SW_MINIMIZE);


HTH

Thierry
EMail: Thierry.Marneffe@swing.be
 
Thank you Niky. Im learning more and more about the secrets of the IDE every day...
:) Guess I didnt see the TIP-of-the-DAY about that one yet... anyway...
This looks like what I was wanting but.... when I check the
MINIMIZE box, I get the Min AND Max boxes in my window as usual (but the MAX
is greyed out). OK, sofarsogood... But the system menu still allows me to
MAXIMIZE the derned thing, and if I do, I cannot get it OUT of MAX mode
(I cannot return it to normal) LOL. I can minimize it to an icon, and restore it to
MAX, but I cannot get it simply back to its normal size.... maybe this isnt the way
to go... (not without some further programming anyway)...

Thank you Theirry.. I was fooling with "SendMessage( WM_SHOWWINDOW, (WPARAM) SW_MINIMIZE, (LPARAM) SW_MINIMIZE);" [and variants] and wasntgetting any warmfuzzys until you showed me the shortcut... A button with ShowWindow(SW_MINIMIZE); is my yellow-brick road.... Thanks to you too.. :)

What kind of candy bar floats your boat? ;-)

-dave 'a-three-musketeers-man' brown

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top