"Skins" on windows
This question may encompass far more than I'm ready to handle, but I haven't found the answer elsewhere --
I'm creating an app that 1.) I don't want a title bar on, and 2.) I want my own custom skin that I create to be used rather than the default Windows look.
Could someone point me in the right direction on these two questions.
Thank you in advance,
The "title bar" is added if you include WS_CAPTION style, (some of the other composite styles set this for you), browse the WS_settings and decide what you want.
To draw your own window frames etc., you need to intercept and process WM_NCxxxx messages - Non Client area messages. Look them up in the help.
also have a look at
and for the skin
I got the regions/skins working with that tutorial (thanks) -
Now I have to figure out how to do child windows.. can anyone point me somewhere for this one?
My source code (very messy, its 5am) - www.rednax.net/c/bar.cpp, www.rednax.net/c/rednaxBar.exe
if you want to use bitmaps for the buttons, don't know if that's the idea:
hbmp=the HBITMAP of the BMP file or resource for the button in normal state
hbmp_pressed=the HBITMAP of the BMP file for the button in pressed state
so for every button, you need at least two bitmaps
hbutton = CreateWindow("button",NULL,WS_CHILD|WS_VISIBLE|BS_OWNERDRAW,0,0,0,0,hwnd,(HMENU)MYBUTTON,hinstance,NULL);
//also load the bitmaps here
case WM_DRAWITEM :
lpdis = (LPDRAWITEMSTRUCT) lParam;
hdcMem = CreateCompatibleDC(lpdis->hDC);
switch(lpdis->CtlID)//if the button is not pressed
StretchBlt(lpdis->hDC, lpdis->rcItem.left,lpdis->rcItem.top, lpdis->rcItem.right - lpdis->rcItem.left, lpdis->rcItem.bottom - lpdis->rcItem.top, hdcMem,0,0,mybuttonwidth,mybuttonheight,SRCCOPY);
if(lpdis->itemState & ODS_SELECTED)//if the button is pressed
StretchBlt(lpdis->hDC, lpdis->rcItem.left,lpdis->rcItem.top, lpdis->rcItem.right - lpdis->rcItem.left, lpdis->rcItem.bottom - lpdis->rcItem.top, hdcMem,0, 0,mybuttonwidth,mybuttonheight,SRCCOPY);