?
Solved

Window minimization

Posted on 1998-12-21
8
Medium Priority
?
291 Views
Last Modified: 2010-04-02
I need to redefine function of window minimization.
As i understand, i have to handle a message in my own message-handler function.
Which message can i use (WM_???)
0
Comment
Question by:mcoroli
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 12

Expert Comment

by:migel
ID: 1180764
Hi! May be WM_SHOWWINDOW will help you (when minimasing wParam  is equal SW_MINIMIZE)
0
 
LVL 6

Expert Comment

by:thresher_shark
ID: 1180765
Here is what I would do:
SendMessage (hHandle, WM_SYSCOMMAND, SC_MINIMIZE, 0);

That will minimize the window referred to by hHandle.  Is this what you were looking for?
0
 
LVL 22

Accepted Solution

by:
nietod earned 300 total points
ID: 1180766
What you want to do is to handle the WM_SYSCOMMAND message.  In the message handler check if the wParam is SC_MINIMIZE.  If it is, then do your special processing and return.  If not, then pass the message and parameters to the default window procedure.

Let me know if you have questions.

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Expert Comment

by:viktornet
ID: 1180767
Hello all!

Here is what I would do if I were you....

To minimize...

ShowWindow(hHandle, SW_MINIMIZE);

To maximize...

ShowWindow(hHandle, SW_MAXIMIZE);

where hHandle is the handle to the window to be minimized or maximized..

Hope this helps!

-Viktor
--Ivanov
0
 
LVL 22

Expert Comment

by:nietod
ID: 1180768
I see thresher_shark hade the same idea.  (EE has been dead for the last 30 minutes, so I ddin't see his rsponse at the time)  Actually, no I think he has it backwards  He is trying to cause minimization, that's not what you want is it?
0
 
LVL 6

Expert Comment

by:thresher_shark
ID: 1180769
Yes I had it backwards.  I have recieved an email from mcoroli.

mcoroli - To post reply on experts-exchange, scroll down to the bottom of the screen where there is a text field.  Enter your comment there and press the submit button.  That is how you respond to people here.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1180770
But, if he isn't scrolling down he isn't going to see that message....  : - )
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1180771
So whose comment(answer) helped u the most to do what you wanted?

Merry Christmas!!!

-Viktor
--Ivanov
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question