Click to See Complete Forum and Search --> : Equivalent functinality


July 21st, 1999, 05:30 AM
what i want to know is for the VB "QueryUnload()" event, what is the equivalent VC++ function or event.

please favour me.....thanks in advance.....
Sheetal

Lothar Haensler
July 21st, 1999, 06:50 AM
the WM_CLOSE message or the OnClose method of the CWnd object in MFC is the equivalent.

Ravi Kiran
July 22nd, 1999, 03:15 AM
Then what is the eqivilent for "unload"?

I think WM_CLOSE corresponds to "unload" more than "queryunload"?

Lothar Haensler
July 22nd, 1999, 03:17 AM
IMHO WM_DESTROY is the equivalent for unload.
But, really, I don't think there are any equivalents only similarities.

Ravi Kiran
July 22nd, 1999, 05:25 AM
There is one more Vb Form event Terminate
What about it? Between _Unload and _Treminate the form's member variables still exist and can be accessed by Public member fns.
MSDN says during WM_DESTROY we can still assume that the child windows exist.

Like you said, no one-to-one relation.
The VB events are a level higher than windows events. IMHO, few windows events together constitute one vb event. For ex., There is no direct relation to "Click" event. We have WM_LButtonDown and up and DBLClick and no LBTNCLICK. So vb's processing generates the _click event.

May be when VB process WM_CLOSE it generates both the events _QueryUnload and _Unload, who knows:-)