winapi - C++ Transparent Client Area -


i attempting create program where, when click button on main window, secondary invisible window pops up, drawings on them, hence images appearing if floating. reason however, no part of "invisible" window becomes transparent. code declaring window class is:

const char g_szclassname2[] = "inviswindow"; wndclassex inviswindowclass; hwnd invishwnd;  inviswindowclass.cbsize         = sizeof(wndclassex); inviswindowclass.style          = ws_ex_transparent; inviswindowclass.lpfnwndproc    = wndprocedure2; inviswindowclass.cbclsextra     = 0; inviswindowclass.cbwndextra     = 0; inviswindowclass.hinstance     = hinstance; inviswindowclass.hicon         = loadicon(null, idi_application); inviswindowclass.hcursor       = loadcursor(null, idc_arrow); inviswindowclass.hbrbackground = (hbrush)(color_window+1); inviswindowclass.lpszmenuname  = null; inviswindowclass.lpszclassname = g_szclassname2; inviswindowclass.hiconsm       = loadicon(null, idi_application);  registerclassex(&inviswindowclass); 

i included ws_ex_transparent style, believed make client area invisible.

the code inside button click case statement of invisible window's callback wndprocedure2 is:

                const char g_szclassname2[] = "inviswindow";                 const char wndname2[] = "invisible window";                  hwnd inviswindowhandle = createwindowex(0,                       g_szclassname2,                       wndname2,                       ws_overlappedwindow,                       200,                       200,                       800,                       500,                       null,                       null,                       null,                       null);                   showwindow(inviswindowhandle, 3);                 updatewindow(inviswindowhandle); 

what doing wrong?


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -