Solved

Window minimization

Posted on 1998-12-21
8
271 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Within a class, declare a function/method as static or not 16 132
Need some help with listview limit text 20 98
c++ syntax question 9 44
Issues with C++ Class 19 81
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…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now