How to free a SysMonthCal32 gadget

Windows specific forum
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

How to free a SysMonthCal32 gadget

Post 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: :?:
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
freak
PureBasic Team
PureBasic Team
Posts: 5948
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post 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
quidquid Latine dictum sit altum videtur
Post Reply