TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: All
from: Steffen Offermann
date: 1995-05-30 16:41:00
subject: Q: WM_CLOSE, WM_DESTROY, WM_COMMAND, ...


I just don't understand... Some windows are closed after processing
of WM_CLOSE, others receive WM_DESTROY, yet others are destroyed
on WM_COMMAND messages. I have desperately been trying to implement
a notebook window class in C++. The window procedure that receives
the WM_xxx messages is a static C function which then calls the window
procedure associated with the specific C++ class. I want the static
function to call the C++ destructor if the "autoDestroy"-flag of that
class instance is set. To accomplish this I need a reliable way to
recognize when a window is destroyed.

"Normal" windows seem to receive WM_CLOSE or WM_DESTROY immediately
before they are actually destroyed. Dialog windows are closed when
they receive WM_COMMAND (unless a user-defined procedure returns
(MRESULT) FALSE on receipt of this message). But my notebook, which
consists of a frame window, client and WC_NOTEBOOK window, receives
additional messages (WM_FOCUSCHANGE, ...) _after_ WM_CLOSE.

Who can help?

Steffen

--- FastEcho 1.40+
* Origin: Heute mal wieder als Point (2:2452/112.14)
SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407
SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809
@PATH: 2452/112 158 151 242/42 2452/110 105/42 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.