You can use PhotoShop to create a bitmap. Then load the bitmap into a resource. From then on you can use it for a button image, bltbit is onto a dialog for a background image, ....
for button:
create a .bmp from Photoshop
import as resource
HBITMAP hbmp;
//get the handle for the bitmap
hbitmap = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BITMAP1));
//Create a static popup with bitmap property
SPL = CreateWindowEx(WS_EX_TOPMOST,"STATIC", "", WS_BORDER | SS_BITMAP|WS_POPUP | SS_NOTIFY,x,y,0,0,hwnd,(HMENU)ID_BUTTON,hInstance,0);
SendMessage(SPL, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hbitmap);//Set the bitmap to the static
The SS_NOTIFY will enable it so that in
WM_COMMAND:
{
switch(wParam)
{
case ID_BUTTON:{//do something
break;
}
break;
}
It basically makes it so you can add a function to it, when someone clicks on it, it'll do something (i.e. come up with a about dialog box).
Also on CreateWindowEx(WS_EX_TOPMOST | WS_EX_DLGMODALFRAME,...) creates it raised (like a button).
You also can do owner-drawn buttons
--------------
"Getting to the top is an extra reward.Its the climb that makes the man."
Xerxes Dynatos
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.