ok im using createwindow to create a static text label . is there another way? and also if there is and if there isnt a way how can i make the background transparent? I know it probably has to be api but how?
Printable View
ok im using createwindow to create a static text label . is there another way? and also if there is and if there isnt a way how can i make the background transparent? I know it probably has to be api but how?
You can put it in a dialog resource. No way around CreateWindow (or CreateWindowEx) in normal windows. Any special reason why there should be?
As for transparent: You can try intercepting the WM_COLORCTLSTATIC message and return a null-brush. But I can't guarantee it will work.
If you want text with transparent background in a normal window I recommend you draw it yourself.
how can i draw the text?
You mean with the static? I think it should be SetWindowText(HWND, LPCTSTR).
Otherwise use GDI function DrawText()
how do i do the DrawText()?
Look it up in the reference. You need to intercept WM_PAINT for this, but you need to do that anyway.