views:

60

answers:

1

I have created a skin in VC++ through the win32 API. Now I want to add controls to the skins. How can this be achieved?

+6  A: 

By using following code, its a button with bit map image.

hButton = CreateWindow ("BUTTON", "", WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | WS_TABSTOP | WS_TABSTOP |WS_EX_OVERLAPPEDWINDOW | BS_BITMAP| BS_FLAT|EDGE_SUNKEN, 175, 135, B_width1, B_height1, hWnd, (HMENU)IDB_BUTTON_WOPEN, ((LPCREATESTRUCT) lParam)->hInstance, NULL);

/* Set the button image */ SendMessage(hButton[7], BM_SETIMAGE, IMAGE_BITMAP, (LPARAM)LoadBitmap(hInst, MAKEINTRESOURCE(IMG_BITMAP7)));

Ravi shankar