Solved

Window minimization

Posted on 1998-12-21
8
272 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 100 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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 technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

786 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