From: Per W. <pw...@ia...> - 2007-12-19 15:26:04
|
But I do have the answer. But I think you would have it too, if you look at the header file where the WM_CLOSE message is defined. You will find a huge number of other messages that you really want to know about, and a lot of status and configuration flags. Whenever you find an interesting message (or other symbol), it will then be trivial to google or directly visit MSDN to get the _exact_ information about when and how it is generated, or if there are version-specific notices about it, i.e. a level of information that we can't take the time to give you on this list. In short: My answer is about methodology. Few things are as giving as looking through the available header files. One hour with a couple of header files will pop your head full with ideas what you can do. After that, it is then trivial to flesh out the exact details about the solutions. You say that you have looked. My guess is that you forgot to look in the header files, in which case my previous mail did specifically point you in a very important direction. Life isn't always about getting explicit answers. The best answers you can get on mailing lists or forums are not explicit. The best answers you can get are the answers that solves a number of future problems too. In this case: where to look. In this case: google on "minimize size event" should as first match have told you about OnSizeChanged(). This might feel like a side track, but the word SIZE should feel very important. A bit closer look at the WM_SIZE message should have informed you that wParam can be SIZE_MINIMIZED. On the other hand: Looking for WM_CLOSE in the include files would have noticed it in winuser.h. Searching for MINIMIZE in winuser.h would match: #define WS_MINIMIZE 0x20000000 #define WS_MINIMIZEBOX 0x20000 #define SW_SHOWMINIMIZED 2 #define SW_MINIMIZE 6 #define SW_FORCEMINIMIZE 11 #define SM_CXMINIMIZED 57 #define SM_CYMINIMIZED 58 #define SPI_GETMINIMIZEDMETRICS 43 #define SPI_SETMINIMIZEDMETRICS 44 #define SIZE_MINIMIZED 1 #define SC_MINIMIZE 0xF020 #define HBMMENU_MBAR_MINIMIZE ((HBITMAP)3) #define HBMMENU_MBAR_MINIMIZE_D ((HBITMAP)7) #define HBMMENU_POPUP_MINIMIZE ((HBITMAP)11) typedef struct tagMINIMIZEDMETRICS { UINT cbSize; int iWidth; int iHorzGap; int iVertGap; int iArrange; } MINIMIZEDMETRICS,*LPMINIMIZEDMETRICS; A quick scan at these matches should also give a very good idea how to continue with google. They tell you such thing as how to configure a window to show a minimuze button, to allow minimizing, to make it minimized, to get the size of a minimized window, to catch the event when it gets minimized etc... Internet is large. To find something, you must develop a method how to search and where to start searching. Only then can you quickly drill down to the interesting parts. You are of course free to consider my answers bad, but learning how to search to be able to find the needed information in less than 5 minutes is quite a lot better than to have to spend 5 minutes writing a question and then have to wait hours or days for a possibly useful answer. /pwm On Wed, 19 Dec 2007, angel dario wrote: > The reason why i ask is not because i didn't took time to look it up on books, MSDN, or whatever comes to your mind. The reason i ask is because after i made a big search i couldn't find anything. GOT IT???????? > > And if you don't have the answer please don't answer with something else. > > thanks anyways. > _________________________________________________________________ > Share life as it happens with the new Windows Live. > http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_122007 |