c - Are child windows destroyed automatically if -1 is returned from WM_CREATE? -
lresult callback wndproc(hwnd hwnd, uint msg, wparam wparam, lparam lparam) { switch(msg) { case wm_create: { hwnd hstatic1, hstatic2; hstatic1 = createwindowex(0, l"static", l"", ws_visible | ws_child, 4, 20, 40, 40, hwnd, 0, getmodulehandle(0), 0); hstatic2 = createwindowex(0, l"static", l"", ws_visible | ws_child, 4, 80, 40, 40, hwnd, 0, getmodulehandle(0), 0); return -1; } break; default: return defwindowproc(hwnd, msg, wparam, lparam); } return 0; }
are child windows created in wm_create destroyed automatically when -1 returned? hstatic1 , hstatic2 destroyed automatically when return -1 or need call destroywindow()
on each 1 of them?
all child windows destroyed when window destroyed, , includes when window destroyed during creation returning -1
wm_create
.
Comments
Post a Comment