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

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -