Solved

Window minimization

Posted on 1998-12-21
8
268 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
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.

708 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

13 Experts available now in Live!

Get 1:1 Help Now