hello people, I have a question :(
I have several controls but my problem is that some controls are above others and let me know how I can send a control to back at runtime?
for example:
(http://img52.imageshack.us/img52/6499/sinttuloriy.png)
I want send to back the control label, thanks people
Using the WS_CLIPSIBLINGS-style for the controls should solve your problem.
But I want do in runtime , thanks
Quote from: RHL on March 28, 2012, 08:10:56 AM
But I want do in runtime , thanks
why? give us more information.
Have you tried SetWindowPos() (http://msdn.microsoft.com/en-us/library/windows/desktop/ms633545(v=vs.85).aspx)?
qWord thanks u, well what I really want is set a control the background STATIC class to load an image in it, and move that
control STATIC as background under all but my problem is that control is above some :(
You may try this: add the WS_CLIPSIBLINGS flag to the STATIC's style using Get/SetWindowLong(hStatic,GWL_STYLE [,style]) and then invalidate the whole dialog/window using InvalidRect(hWnd,0,1).
The order of creation may play a role. Try creating the static first.
As qWord said, use SetWindowPos specifying HWND_BOTTOM, that should work for you.
invoke SetWindowPos, hStatic, HWND_BOTTOM, 0,0,0,0,SWP_NOMOVE + SWP_NOSIZE + SWP_SHOWWINDOW
i created this little app to demonstrate a static image in the background
it also demonstrates the use of tables to create controls and windows
i could have used the same class/WndProc for the child windows
but RHL intends to have vastly different controls in each, so i seperated them
i used 24-bit BMP images, so the thing is too big for the forum :P
EDIT: link replaced in next post
try this link, instead...
http://dedndave.x10hosting.com/RHLWin.zip
ok - a bit of an improvement
in the previous version, i set button fonts individually after creation
i wasn't happy with it - lol
in this version...
if the control is either a Static or a Button, i set the font as it is created
that makes for much cleaner code
also, i changed from 24-bit images to 256-color images
so, the thing fits on the forum board :P
if you wanted to do some kind of "vector" images (lines, etc), 256-colors would be plenty
Quote from: dedndave on April 02, 2012, 02:33:42 AM
ok - a bit of an improvement
in the previous version, i set button fonts individually after creation
i wasn't happy with it - lol
in this version...
if the control is either a Static or a Button, i set the font as it is created
that makes for much cleaner code
also, i changed from 24-bit images to 256-color images
so, the thing fits on the forum board :P
if you wanted to do some kind of "vector" images (lines, etc), 256-colors would be plenty
Nice I seen something like this but the picture changes with the clock on the CP...
So after say 6:30 PM you would see the sun set image after 12AM a night image ... I wonder how to do that .....
I know how to get system time soooo.....
very cool :U