Page 1 of 1

How to free a SysMonthCal32 gadget

Posted: Sun May 09, 2004 10:39 pm
by Flype
here is how to create a SysMonthCal32 gadget

Code: Select all

hCalendar = CreateWindowEx_(#Null,"SysMonthCal32","DateTime",#WS_CHILD|#WS_VISIBLE|#WS_BORDER,5,50,0,0,WindowID(),0,GetModuleHandle_(0),0)
but how to free it ?

should i use DeleteObject_( hCalendar )
or DestroyWindow_( hCalendar )
or another api call...

or because my own window is the parent, CloseWindow() does the job itself ?


:?: :roll: :?:

Posted: Sun May 09, 2004 11:08 pm
by freak
If you destroy the parent window, the control will correctly be freed.
If you only want to destroy the control itself, use DestroyWindow_()

Timo