Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
U

User 1083172

@User 1083172
About
Posts
2
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Button with Image
    U User 1083172

    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); } }

    Mobile question

  • DebugView for WinCE
    U User 1083172

    http://www.xs4all.nl/~itsme/projects/xda/tools.html http://www.pocketgear.com/software\_detail.asp?id=1622

    Mobile question tools
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups