How more simple can I say that I am trying to create a dialog for "OSD" 
(OnScreen Display) ? Please read the "Meaning..." again.

I am looking forward to hear your ideas, but until then I have already found 
where the problem was:

The rereturn value of the  CreatedWindow::find(window)
is zero(0) if we do not call the show() previously.


I anyone is interested on how to create a transparent background with win32 API:

typedef BOOL(WINAPI *SLWA)(HWND, COLORREF, BYTE, DWORD);

main()
{
window->color(BLACK);//the color to be transparent later
window->show();
HWND winHwnd = your win hwnd;//use CreatedWindow

SLWA pSetLayeredWindowAttributes = NULL;
HINSTANCE pLib = LoadLibrary("USER32.DLL");
pSetLayeredWindowAttributes 
=(SLWA)GetProcAddress(pLib,"SetLayeredWindowAttributes");

SetWindowLong(winHwnd, GWL_EXSTYLE,GetWindowLong(winHwnd,GWL_EXSTYLE)
                ^ WS_EX_LAYERED);

//RGB() color of your background
pSetLayeredWindowAttributes(winHwnd, RGB(0,0,0),
                            0, LWA_COLORKEY);

RedrawWindow(winHwnd, NULL, NULL,RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | 
RDW_ALLCHILDREN);
}


If anyone has achieved the same functionality with pure FTLK API please share 
it with me.

Regards.


_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to