15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


catching end of child window sizing

Ludek Slegr -- ludek.slegr@munich.ixos.de
Wednesday, February 07, 1996


[VC++2.1,Win32s]

Hi all,

I would like to do something, which looks pretty simple. However, I cannot 
make it work and have not found some related hints or samples either. I 
would like to do some processing, when sizing of my child window is 
finished. I heard, that there are two "undocumented" messages, which get 
sent to the mainframe, when sizing of the child window starts/finishes. 
However, I would not like to stick to some "undocumented" functionality. 
What is the right way to accomplish the task ?

Thanks for any info!

Regards,
Ludek



Brad Wilson -- bradw@netnet.net
Thursday, February 08, 1996

[Mini-digest: 3 responses]

At 09:17 AM 2/7/96 PST, you wrote:
> [VC++2.1,Win32s]
>
> I would like to do something, which looks pretty simple. However, I cannot 
> make it work and have not found some related hints or samples either. I 
> would like to do some processing, when sizing of my child window is 
> finished. I heard, that there are two "undocumented" messages, which get 
> sent to the mainframe, when sizing of the child window starts/finishes. 

There are two messages that are related to sizing:

        WM_ENTERSIZEMOVE
        WM_EXITSIZEMOVE

These messages are sent to a window when it is being resized or moved.
These messages are not undocumented (they are documented in VC++ 4.0,
and I originally found them while searching for technotes relating to
painting and full-window drag style sizing).

Brad

--
class CBradWilson : public CWorldWatchProgrammingTeam {
  public:
    void GetInetAddr  ( CString& s ) { s = "bradw@exptech.com";      }
    void GetE164Addr  ( CString& s ) { s = "+1 (810) 620-9803";      }
    void GetURL       ( CString& s ) { s = "http://www.exptech.com"; }
    void GetDisclaimer( CString& s ) { s = "All I say is fact :-p";  }
};

//  QOTW:  "Music nowadays is merely the art of executing difficulties and in
//          the end that which is only difficult ceases to please."

-----From: Deepak Saxena 
>From the win sdk docs:

The WM_SIZE message is sent to a window after its size has changed. 

So just overide the OnSize for that window and you should be fine.  If you don't
have your own class for that child window and are using a pre-defined class, you
can overide CWinApp::PreTranslateMessage and then look inside the MSG structure 
that is passed to determine if the window has been resized....of course, this 
does mean that every message has to be checked, so it would be better to just 
use your own class.

Deepak

-----From: "John Elsbree" 

Gee, WM_SIZE has been documented for a long, long time... 

John (does not speak for Microsoft)




| Вернуться в корень Архива |