在按钮上显示图片
case WM_CREATE :
BS_hwnd = CreateWindow ( TEXT("button"),
L"PUSHBUTTON",
WS_CHILD | WS_VISIBLE | BS_BITMAP,
10, 10,
140, 60,
hwnd, (HMENU) 1,
((LPCREATESTRUCT) lParam)->hInstance, NULL) ;
SendMessage(BS_hwnd,
BM_SETIMAGE,
(WPARAM) 0,
(LPARAM) LoadImage ( 0, L"C:\\1.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE )
);
break;
BS_hwnd = CreateWindow ( TEXT("button"),
L"PUSHBUTTON",
WS_CHILD | WS_VISIBLE | BS_BITMAP,
10, 10,
140, 60,
hwnd, (HMENU) 1,
((LPCREATESTRUCT) lParam)->hInstance, NULL) ;
SendMessage(BS_hwnd,
BM_SETIMAGE,
(WPARAM) 0,
(LPARAM) LoadImage ( 0, L"C:\\1.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE )
);
break;