[comp.windows.ms] Window Subclassing

rommel@lan.informatik.tu-muenchen.dbp.de (Kai-Uwe Rommel) (08/03/90)

Is there any way to prevent the CreateWindow() call to already send the
WM_SIZE to the window procedure and delay this to later, when the
ShowWindow() call is used?

I'm using Window Subclassing with several child windows (MDI) which
differ in their handling of WM_SIZE messages. But the first point where
I can replace the window procedure with the subclassing procedure is
after the CreateWindow(), when the WM_SIZE was already sent.

Setting the window procedure using GetWindowLong()/SetWindowLong()
during the WM_CREATE message from within the original window procedure
works under Windows 2.x, but 
  1. is not very nice style and
  2. leads to an "Unrecoverable..." under Windows 3.0.

Until now I have to put the code for WM_SIZE all into the original
window procedure and test the Window ID and then do a "if () ...",
which is also really ugly, because I cannot separate the code for the
subclasses properly.

Any ideas?

Kai Uwe Rommel

--
/* Kai Uwe Rommel
 * Munich
 * rommel@lan.informatik.tu-muenchen.dbp.de
 */