1., In resource editor|Push Button Properties|Styles tab check in: "Owner draw" 2., In dialog message handler insert this branch: switch (message) { case WM_DRAWITEM: idCtl = (UINT) wParam; if(idCtl == IDC_BUTTON) DrawFancyButton ( (LPDRAWITEMSTRUCT) lParam, hDlg, IDC_BUTTON, IDB_BITMAP_NORMAL, IDB_BITMAP_PRESSED ); return TRUE; ... 3., Implement DrawFancyButton: void DrawFancyButton(LPDRAWITEMSTRUCT lpdis, HWND hDlg, int idCtl, int iNormalBmp, int iPressedBmp) { TCHAR ButtonText[64]; HBITMAP BitMap; RECT ButtRect; int UpSideColor, DownSideColor; HDC hdcBmp = CreateCompatibleDC(NULL); if(!(lpdis->itemState & ODS_SELECTED)) // Draw Pushed { BitMap = LoadBitmap( g_hInst, MAKEINTRESOURCE(iNormalBmp)); UpSideColor=196, DownSideColor=0; } else // Laposat rajzolok { BitMap = LoadBitmap( g_hInst, MAKEINTRESOURCE(iPressedBmp)); UpSideColor=0, DownSideColor=196; } SelectObject(hdcBmp, BitMap); BITMAP bm; GetObject(BitMap, sizeof(bm), &bm); StretchBlt ( lpdis->hDC, lpdis->rcItem.left, lpdis->rcItem.top, lpdis->rcItem.right - lpdis->rcItem.left, lpdis->rcItem.bottom - lpdis->rcItem.top, hdcBmp, 0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY ); DeleteDC(hdcBmp); if(1) // We want original text also { SetBkMode(lpdis->hDC,TRANSPARENT); GetDlgItemText(hDlg,idCtl,ButtonText,64); ButtRect = lpdis->rcItem; SetTextColor(lpdis->hDC,RGB(UpSideColor, UpSideColor, UpSideColor)); DrawText(lpdis->hDC,ButtonText,-1,&ButtRect,DT_NOCLIP|DT_CENTER|DT_VCENTER); ButtRect.bottom--; ButtRect.left--; ButtRect.right--; ButtRect.top--; SetTextColor(lpdis->hDC,RGB(DownSideColor, DownSideColor, DownSideColor)); DrawText(lpdis->hDC,ButtonText,-1,&ButtRect,DT_NOCLIP|DT_CENTER|DT_VCENTER); } }