static int duressparawinproc(HWND hWnd, int message, WPARAM wParam, LPARAM lParam) { HDC hdc; int id,nc; char sstr[10]; int tmpvalue; static char keyupFlag=0; switch (message) { case MSG_CREATE: //if (LoadBitmap(HDC_SCREEN,&gpmngbk1,GetBmpPath("submenubg.jpg"))) // return 0; InitWindow(hWnd); //add controls InitWindowText(hWnd); UpdateWindow(hWnd,TRUE); actindex=0; SetFocusChild(EdDAM[actindex]); break; case MSG_ERASEBKGND: { HDC hdc = (HDC)wParam; const RECT* clip = (const RECT*)lParam; BOOL fGetDC = FALSE; RECT rcTemp; if(hdc == 0) { hdc = GetClientDC(hWnd); fGetDC = TRUE; } if(clip) { rcTemp = *clip; ScreenToClient(hWnd, &rcTemp.left, &rcTemp.top); ScreenToClient(hWnd,&rcTemp.right, &rcTemp.bottom); IncludeClipRect(hdc, &rcTemp); } FillBoxWithBitmap (hdc, 0, 0, gOptions.LCDWidth, gOptions.LCDHeight, get_submenubg_jgp()); if(fGetDC) ReleaseDC (hdc); return 0; } case MSG_PAINT: hdc=BeginPaint(hWnd); EndPaint(hWnd,hdc); return 0; case MSG_KEYUP: if(3 == gOptions.TFTKeyLayout) { keyupFlag=1; } break; case MSG_KEYDOWN: SetMenuTimeOut(time(NULL)); if(3 == gOptions.TFTKeyLayout) { if(1==keyupFlag) keyupFlag=0; else break; } if (gOptions.KeyPadBeep) ExKeyBeep(); if ((LOWORD(wParam)==SCANCODE_ESCAPE)) { PostMessage(hWnd, MSG_COMMAND, ID_EXIT, 0L); } if(LOWORD(wParam)==SCANCODE_CURSORBLOCKDOWN) { if(actindex==4) { memset(sstr,0,10); GetWindowText(EdDAM[actindex],sstr,3); if(strlen(sstr)==0) return 0; } if(++actindex > 6) actindex = 0; //Liaozz 20081008 fix bug third 6 if (gOptions.IsOnlyRFMachine) { if (actindex == 1 || actindex == 2) actindex = 3; } //Liaozz end SetFocusChild(EdDAM[actindex]); return 0; } if( LOWORD(wParam)==SCANCODE_CURSORBLOCKUP) { if(actindex==4) { memset(sstr,0,10); GetWindowText(EdDAM[actindex],sstr,3); if(strlen(sstr)==0) return 0; } if(--actindex < 0) actindex = 6; //Liaozz 20081008 fix bug third 6 if (gOptions.IsOnlyRFMachine) { if (actindex == 1 || actindex == 2) actindex = 0; } //Liaozz end SetFocusChild(EdDAM[actindex]); return 0; } if(LOWORD(wParam) == SCANCODE_CURSORBLOCKLEFT || (gOptions.TFTKeyLayout == 3 && LOWORD(wParam) == SCANCODE_BACKSPACE)) { if(actindex<4) { tmpvalue=SendMessage(EdDAM[actindex], CB_GETCURSEL, 0, 0); if(--tmpvalue < 0) tmpvalue = 1; SendMessage(EdDAM[actindex], CB_SETCURSEL, tmpvalue, 0); return 0; } else if(actindex>4) { if(--actindex < 0) actindex = 6; SetFocusChild(EdDAM[actindex]); return 0; } } if(LOWORD(wParam)==SCANCODE_CURSORBLOCKRIGHT) { if(actindex<4) { tmpvalue=SendMessage(EdDAM[actindex], CB_GETCURSEL, 0, 0); if(++tmpvalue > 1) tmpvalue = 0; SendMessage(EdDAM[actindex], CB_SETCURSEL, tmpvalue, 0); return 0; } else if(actindex>4) { if(++actindex > 6) actindex = 0; SetFocusChild(EdDAM[actindex]); return 0; } } if(LOWORD(wParam)==SCANCODE_ENTER) { if(actindex<5) PostMessage(hWnd,MSG_COMMAND,(WPARAM)ID_SAVE,0); } if(LOWORD(wParam)==SCANCODE_F10) { if(actindex!=6) PostMessage(hWnd, MSG_COMMAND, (WPARAM)ID_SAVE, 0L); else PostMessage(hWnd, MSG_COMMAND, (WPARAM)ID_EXIT, 0L); } if(LOWORD(wParam)==SCANCODE_MENU) PostMessage (hWnd, MSG_COMMAND, (WPARAM)ID_SAVE, 0L); break; case MSG_COMMAND: id = LOWORD(wParam); nc = HIWORD(wParam); if(nc==EN_CHANGE) { if(id == DAM_ID+4) { memset(sstr,0,5); GetWindowText(EdDAM[actindex],sstr,3); tmpvalue = atoi(sstr); if(tmpvalue>255) { SetWindowText(EdDAM[actindex],"0"); SendMessage(EdDAM[actindex],EM_SETCARETPOS,0,1); } } } switch(id) { case ID_SAVE: SaveDuressParameter(hWnd); LoadOptions(&gOptions); MessageBox1(hWnd ,LoadStrByID(HIT_RIGHT) ,LoadStrByID(HIT_RUN),MB_OK| MB_ICONINFORMATION); if(!ismenutimeout) PostMessage(hWnd,MSG_CLOSE,0,0); break; case ID_EXIT: if(ismodified() && MessageBox1(hWnd,LoadStrByID(MID_SAVEDATA), LoadStrByID(MID_APPNAME), MB_OKCANCEL | MB_ICONQUESTION | MB_BASEDONPARENT) == IDOK) SendMessage(hWnd, MSG_COMMAND, ID_SAVE, 0); if(!ismenutimeout) PostMessage(hWnd,MSG_CLOSE,0,0L); break; } break; case MSG_CLOSE: //UnloadBitmap(&gpmngbk1); //MainWindowCleanup(hWnd); DestroyMainWindow(hWnd); return 0; } return DefaultMainWinProc(hWnd,message,wParam,lParam); }
static int mainstatewinproc(HWND hWnd, int message, WPARAM wParam, LPARAM lParam) { HDC hdc; static char keyupFlag=0; switch (message) { case MSG_CREATE: //LoadBitmap(HDC_SCREEN,&mainstatebmp,GetBmpPath("submenubg.jpg")); UpdateWindow(hWnd,TRUE); break; case MSG_PAINT: hdc=BeginPaint(hWnd); procmainstatekey(hdc,hWnd); EndPaint(hWnd,hdc); return 0; case MSG_KEYUP: if(3 == gOptions.TFTKeyLayout) { keyupFlag=1; } break; case MSG_KEYDOWN: SetMenuTimeOut(time(NULL)); if(3 == gOptions.TFTKeyLayout) { if(1==keyupFlag) keyupFlag=0; else break; } if (gOptions.KeyPadBeep) ExKeyBeep(); if ((LOWORD(wParam)>=SCANCODE_F1) && ((LOWORD(wParam)<=SCANCODE_F8))) { putkey=LOWORD(wParam)-SCANCODE_F1; if (procgetstate(wParam)) { InvalidateRect(hWnd,NULL,FALSE); } } else PostMessage(hWnd, MSG_CLOSE, 0, 0L); if ((LOWORD(wParam)==SCANCODE_ESCAPE)) PostMessage(hWnd, MSG_CLOSE, 0, 0L); break; case MSG_CLOSE: //UnloadBitmap(&mainstatebmp); DestroyMainWindow(hWnd); return 0; case MSG_ERASEBKGND: { HDC hdc = (HDC)wParam; const RECT* clip = (const RECT*) lParam; BOOL fGetDC = FALSE; RECT rcTemp; if (hdc == 0) { hdc = GetClientDC (hWnd); fGetDC = TRUE; } if (clip) { rcTemp = *clip; ScreenToClient (hWnd, &rcTemp.left, &rcTemp.top); ScreenToClient (hWnd, &rcTemp.right, &rcTemp.bottom); IncludeClipRect (hdc, &rcTemp); } FillBoxWithBitmap (hdc, 0, 0, 0, 0, get_submenubg_jgp()); if (fGetDC) ReleaseDC (hdc); return 0; } } return DefaultMainWinProc(hWnd,message,wParam,lParam); }
static void btnPaintContent (PCONTROL pCtrl, HDC hdc, DWORD dwStyle, RECT* prcText) { switch (dwStyle & BS_CONTENTMASK) { case BS_TEXT: case BS_LEFTTEXT: { UINT uFormat; if (dwStyle & BS_MULTLINE) uFormat = DT_WORDBREAK; else uFormat = DT_SINGLELINE; if ((dwStyle & BS_TYPEMASK) == BS_PUSHBUTTON || (dwStyle & BS_TYPEMASK) == BS_DEFPUSHBUTTON || (dwStyle & BS_PUSHLIKE)) uFormat |= DT_CENTER | DT_VCENTER; else { uFormat = DT_TOP | DT_LEFT; if ((dwStyle & BS_ALIGNMASK) == BS_LEFT) uFormat = DT_WORDBREAK | DT_LEFT; else if ((dwStyle & BS_ALIGNMASK) == BS_RIGHT) uFormat = DT_WORDBREAK | DT_RIGHT; else if ((dwStyle & BS_ALIGNMASK) == BS_CENTER) uFormat = DT_WORDBREAK | DT_CENTER; if ((dwStyle & BS_ALIGNMASK) == BS_TOP) uFormat = DT_SINGLELINE | DT_TOP; else if ((dwStyle & BS_ALIGNMASK) == BS_BOTTOM) uFormat = DT_SINGLELINE | DT_BOTTOM; else if ((dwStyle & BS_ALIGNMASK) == BS_VCENTER) uFormat = DT_SINGLELINE | DT_VCENTER; } SetBkColor (hdc, GetWindowBkColor ((HWND)pCtrl)); if (dwStyle & WS_DISABLED) { RECT rc = *prcText; SetBkMode (hdc, BM_TRANSPARENT); SetTextColor (hdc, PIXEL_lightwhite); OffsetRect (prcText, 2, 2); DrawText (hdc, pCtrl->spCaption, -1, prcText, uFormat); SetTextColor (hdc, PIXEL_darkgray); DrawText (hdc, pCtrl->spCaption, -1, &rc, uFormat); } else { SetBkMode (hdc, BM_TRANSPARENT); SetTextColor (hdc, PIXEL_black); OffsetRect (prcText, 1, 1); DrawText (hdc, pCtrl->spCaption, -1, prcText, uFormat); } } break; case BS_BITMAP: if (BUTTON_DATA(pCtrl)) { int x = prcText->left; int y = prcText->top; int w = RECTWP (prcText); int h = RECTHP (prcText); PBITMAP bmp = (PBITMAP)(BUTTON_DATA(pCtrl)); if (dwStyle & BS_REALSIZEIMAGE) { x += (w - bmp->bmWidth) >> 1; y += (h - bmp->bmHeight) >> 1; w = h = 0; } FillBoxWithBitmap (hdc, x, y, w, h, bmp); } break; case BS_ICON: if (BUTTON_DATA(pCtrl)) { int x = prcText->left; int y = prcText->top; int w = RECTWP (prcText); int h = RECTHP (prcText); HICON icon = (HICON)(BUTTON_DATA(pCtrl)); if (dwStyle & BS_REALSIZEIMAGE) { int iconw, iconh; GetIconSize (icon, &iconw, &iconh); x += (w - iconw) >> 1; y += (h - iconh) >> 1; w = h = 0; } DrawIcon (hdc, x, y, w, h, icon); }
static void slider_draw_bg (HDC hdc, skin_item_t *item) { FillBoxWithBitmap (hdc, item->x, item->y, 0, 0, &ITEMBMP(item)); }
static int AttPhotoProc(HWND hWnd, int message, WPARAM wParam, LPARAM lParam) { HDC hdc; static char keyupFlag=0; switch (message) { case MSG_CREATE: InitAttPhotoWindow(hWnd); UpdateWindow(hWnd, TRUE); SetFocusChild(AttPhotoItemWnd[0]); break; case MSG_PAINT: hdc = BeginPaint(hWnd); EndPaint(hWnd, hdc); return 0; case MSG_ERASEBKGND: { HDC hdc = (HDC)wParam; const RECT* clip = (const RECT*) lParam; BOOL fGetDC = FALSE; RECT rcTemp; if (hdc == 0) { hdc = GetClientDC(hWnd); fGetDC = TRUE; } if (clip) { rcTemp = *clip; ScreenToClient(hWnd, &rcTemp.left, &rcTemp.top); ScreenToClient(hWnd, &rcTemp.right, &rcTemp.bottom); IncludeClipRect(hdc, &rcTemp); } FillBoxWithBitmap(hdc, 0, 0, gOptions.LCDWidth, 0, get_submenubg_jgp()); if (fGetDC) ReleaseDC(hdc); return 0; } case MSG_KEYUP: { if(gOptions.TFTKeyLayout==3) { keyupFlag=1; } } break; case MSG_KEYDOWN: SetMenuTimeOut(time(NULL)); if(gOptions.TFTKeyLayout==3) { if(keyupFlag==1) { keyupFlag=0; } else break; } if(gOptions.KeyPadBeep) ExKeyBeep(); if (LOWORD(wParam)==SCANCODE_CURSORBLOCKDOWN) { if (++AttPhotoItem>9) { AttPhotoItem = 0; } SetFocus(AttPhotoItemWnd[AttPhotoItem]); return 0; } if (LOWORD(wParam)==SCANCODE_CURSORBLOCKUP) { if (--AttPhotoItem < 0) { AttPhotoItem=9; } SetFocus(AttPhotoItemWnd[AttPhotoItem]); return 0; } if (LOWORD(wParam)==SCANCODE_CURSORBLOCKRIGHT) { } if ((LOWORD(wParam)==SCANCODE_CURSORBLOCKLEFT) || (gOptions.TFTKeyLayout==3 && LOWORD(wParam)==SCANCODE_BACKSPACE)) { } if ((LOWORD(wParam)==SCANCODE_MENU)||(LOWORD(wParam)==SCANCODE_F10)) { if (isChangedPhotoOpt()) { if(PhotoOptOK(hWnd, AttPhotoItemWnd, 8) && !ismenutimeout) PostMessage(hWnd, MSG_CLOSE, 0, 0); else return 0; } else PostMessage(hWnd, MSG_CLOSE, 0, 0); return 0; } if(LOWORD(wParam) == SCANCODE_ENTER) { if(AttPhotoItem == 9) { PostMessage(hWnd, MSG_COMMAND, IDCANCEL, 0); return 0; } if(AttPhotoItem != 6) { PostMessage(hWnd, MSG_COMMAND, IDOK, 0); return 0; } } if (LOWORD(wParam)==SCANCODE_ESCAPE) { PostMessage(hWnd, MSG_COMMAND, IDCANCEL, 0); return 0; } break; case MSG_COMMAND: switch(LOWORD(wParam)) { case IDOK: if(PhotoOptOK(hWnd, AttPhotoItemWnd, 8) && !ismenutimeout) { MessageBox1 (hWnd, LoadStrByID(HIT_RIGHT),LoadStrByID(HIT_RUN), MB_OK| MB_ICONINFORMATION); PostMessage(hWnd, MSG_CLOSE,0,0); } else { PostMessage(hWnd, MSG_CLOSE,0,0); } break; case IDCANCEL: if(isChangedPhotoOpt()) { if(MessageBox1(hWnd, LoadStrByID(MID_SAVEDATA), LoadStrByID(MID_APPNAME), MB_OKCANCEL | MB_ICONQUESTION | MB_BASEDONPARENT) == IDOK) { if(PhotoOptOK(hWnd, AttPhotoItemWnd, 8)) { MessageBox1 (hWnd, LoadStrByID(HIT_RIGHT),LoadStrByID(HIT_RUN), MB_OK| MB_ICONINFORMATION); PostMessage(hWnd, MSG_CLOSE,0,0); } else { MessageBox1 (hWnd, LoadStrByID(HIT_ERR),LoadStrByID(HIT_RUN), MB_OK| MB_ICONINFORMATION); PostMessage(hWnd, MSG_CLOSE,0,0); } } else { if(!ismenutimeout) PostMessage(hWnd, MSG_CLOSE, 0, 0); } } else PostMessage(hWnd, MSG_CLOSE, 0, 0); break; case IDC_ATT_DEL: if(DelAttPhoto() == 0) { MessageBox1 (hWnd, LoadStrByID(HIT_RIGHT),LoadStrByID(HIT_RUN), MB_OK| MB_ICONINFORMATION); } else { MessageBox1 (hWnd, LoadStrByID(HIT_ERROR0),LoadStrByID(HIT_RUN), MB_OK| MB_ICONINFORMATION); } break; } break; case MSG_CLOSE: //UnloadBitmap(&system1bk); //MainWindowCleanup(hWnd); DestroyMainWindow(hWnd); return 0; } return DefaultMainWinProc(hWnd, message, wParam, lParam); }
static int WiegandWinProc(HWND hWnd, int message, WPARAM wParam, LPARAM lParam) { HDC hdc; int id,nc; //int i; static char keyupFlag=0; switch (message) { case MSG_CREATE: //if (LoadBitmap(HDC_SCREEN, &WGbkgbmp, GetBmpPath("submenubg.jpg"))) // return 0; InitWGWindow(hWnd); //add controls curindex = 0; SetFocusChild(WGWnd[curindex]); UpdateWindow(hWnd,TRUE); break; case MSG_ERASEBKGND: { HDC hdc = (HDC)wParam; const RECT* clip = (const RECT*)lParam; BOOL fGetDC = FALSE; RECT rcTemp; if(hdc == 0) { hdc = GetClientDC(hWnd); fGetDC = TRUE; } if(clip) { rcTemp = *clip; ScreenToClient(hWnd, &rcTemp.left, &rcTemp.top); ScreenToClient(hWnd,&rcTemp.right, &rcTemp.bottom); IncludeClipRect(hdc, &rcTemp); } FillBoxWithBitmap (hdc, 0, 0, gOptions.LCDWidth, 0, get_submenubg_jgp()); if(fGetDC) ReleaseDC (hdc); return 0; } case MSG_PAINT: hdc=BeginPaint(hWnd); EndPaint(hWnd,hdc); return 0; case MSG_KEYUP: if(3 == gOptions.TFTKeyLayout) { keyupFlag=1; } break; case MSG_KEYDOWN: SetMenuTimeOut(time(NULL)); if(3 == gOptions.TFTKeyLayout) { if(1==keyupFlag) keyupFlag=0; else break; } if (gOptions.KeyPadBeep) ExKeyBeep(); if ((LOWORD(wParam)==SCANCODE_ESCAPE)) PostMessage(hWnd, MSG_CLOSE, 0, 0); else if (LOWORD(wParam)==SCANCODE_CURSORBLOCKDOWN) { if (++curindex > 2) { curindex = 0; } SetFocusChild(WGWnd[curindex]); return 0; } else if (LOWORD(wParam)==SCANCODE_CURSORBLOCKUP) { if (--curindex < 0) { curindex = 2; } SetFocusChild(WGWnd[curindex]); return 0; } else if ((LOWORD(wParam)==SCANCODE_CURSORBLOCKLEFT) || (LOWORD(wParam)==SCANCODE_CURSORBLOCKRIGHT)) { return 0; } else if (LOWORD(wParam)==SCANCODE_F10) { if (curindex == 0) { PostMessage(hWnd, MSG_COMMAND, WG_SETIN, 0); } else if (curindex == 1) { PostMessage(hWnd, MSG_COMMAND, WG_SETOUT, 0); } else if (curindex == 2) { PostMessage(hWnd, MSG_CLOSE, 0, 0); } } break; case MSG_COMMAND: id = LOWORD(wParam); nc = HIWORD(wParam); if (id == WG_SETIN) { CreateWiegandInWindow(hWnd); //CreateWiegandOutWindow(hWnd, WG_IN_MODE); return 0; } else if (id == WG_SETOUT) { CreateWiegandOutWindow(hWnd, WG_OUT_MODE); return 0; } else if (id == WG_EXIT) { PostMessage(hWnd, MSG_CLOSE, 0, 0); } break; case MSG_CLOSE: //UnloadBitmap(&WGbkgbmp); //MainWindowCleanup(hWnd); DestroyMainWindow(hWnd); return 0; } return DefaultMainWinProc(hWnd,message,wParam,lParam); }
void UI_Out_640_480_Show_BigFont(int nEditAt, short sVal,BOOL Flag) { HDC hDC; RECT rt; short sBits[4]; int nFontW,nFontH; int x,y; hDC = GetDC(From_Handl); rt.left = rtEdit[nEditAt].left+2; rt.top = rtEdit[nEditAt].top+2; rt.right = rtEdit[nEditAt].right-2; rt.bottom = rtEdit[nEditAt].bottom-2; if (0x4000 == sVal) { sBits[0] = 10; sBits[1] = 10; sBits[2] = 10; sBits[3] = 10; } else { sBits[3] = 10; if (0 == (sVal/100)%10) { sBits[2] = 10; } else { sBits[2] = (sVal/100)%10; } if (0 == (sVal/10)%10) { if (sBits[2]==10) { sBits[1] = 10; } else { sBits[1] = 0; } } else { sBits[1] = sVal/10%10; } sBits[0] = sVal%10; } switch (nEditAt) { case 0://车型 nFontW = g_bmC[1].bmWidth; nFontH = g_bmC[1].bmHeight; if (sVal<10) { x = (rt.right-rt.left-nFontW)/2; x +=rt.left; y = rt.top + (rt.bottom-rt.top-nFontH)/2; FillBoxWithBitmap(hDC, x, y, 0, 0, &g_bmC[sBits[0]]); } else if (sVal<100) { x = (rt.right-rt.left-2*nFontW)/2; x +=rt.left; y = rt.top + (rt.bottom-rt.top-nFontH)/2; FillBoxWithBitmap(hDC, x, y, 0, 0, &g_bmC[sBits[1]]); x +=nFontW; FillBoxWithBitmap(hDC, x, y, 0, 0, &g_bmC[sBits[0]]); } else { x = rt.left -2;//(rt.right-rt.left-nFontW)/2; y = rt.top + (rt.bottom-rt.top-nFontH)/2; FillBoxWithBitmap(hDC, x, y, 0, 0, &g_bmC[sBits[2]]); //显示百位数 x += nFontW; FillBoxWithBitmap(hDC, x, y, 0, 0, &g_bmC[sBits[1]]); //显示十位数 x += nFontW; FillBoxWithBitmap(hDC, x, y, 0, 0, &g_bmC[sBits[0]]); } break; case 1://车种 nFontW = g_bmY[1].bmWidth; nFontH = g_bmY[1].bmHeight; x = rt.left + (rt.right-rt.left-nFontW)/2; y = rt.top + (rt.bottom-rt.top-nFontH)/2; FillBoxWithBitmap(hDC, x, y, 0, 0, &g_bmY[sBits[0]]); //显示车种 break; case 2://金额 nFontW = g_bmP[1].bmWidth; nFontH = g_bmP[1].bmHeight; if (Flag) { if (sVal<10) { x = (rt.right-rt.left-nFontW)/2; x +=rt.left; y = rt.top + (rt.bottom-rt.top-nFontH)/2; FillBoxWithBitmap(hDC, x, y, 0, 0, &g_bmP[sBits[0]]); } else if (sVal<100) { x = (rt.right-rt.left-2*nFontW)/2; x +=rt.left; y = rt.top + (rt.bottom-rt.top-nFontH)/2; FillBoxWithBitmap(hDC, x, y, 0, 0, &g_bmP[sBits[1]]); x +=nFontW; FillBoxWithBitmap(hDC, x, y, 0, 0, &g_bmP[sBits[0]]); } else { x = (rt.right-rt.left-3*nFontW)/2; x +=rt.left; y = rt.top + (rt.bottom-rt.top-nFontH)/2; FillBoxWithBitmap(hDC, x, y, 0, 0, &g_bmP[sBits[2]]); x +=nFontW; FillBoxWithBitmap(hDC, x, y, 0, 0, &g_bmP[sBits[1]]); x +=nFontW; FillBoxWithBitmap(hDC, x, y, 0, 0, &g_bmP[sBits[0]]); } } else { if (sVal<10) { x = (rt.right-rt.left-2*nFontW)/2; x +=rt.left; y = rt.top + (rt.bottom-rt.top-nFontH)/2; FillBoxWithBitmap(hDC, x, y, 0, 0, &g_bmP[sBits[0]]); x +=nFontW; FillBoxWithBitmap(hDC, x, y, 0, 0, &g_bmP[11]); } else if (sVal<100) { x = (rt.right-rt.left-3*nFontW)/2; x +=rt.left; y = rt.top + (rt.bottom-rt.top-nFontH)/2; FillBoxWithBitmap(hDC, x, y, 0, 0, &g_bmP[sBits[1]]); x +=nFontW; FillBoxWithBitmap(hDC, x, y, 0, 0, &g_bmP[sBits[0]]); x +=nFontW; FillBoxWithBitmap(hDC, x, y, 0, 0, &g_bmP[11]); } else { x = (rt.right-rt.left-4*nFontW)/2; x +=rt.left; y = rt.top + (rt.bottom-rt.top-nFontH)/2; FillBoxWithBitmap(hDC, x, y, 0, 0, &g_bmP[sBits[2]]); x +=nFontW; FillBoxWithBitmap(hDC, x, y, 0, 0, &g_bmP[sBits[1]]); x +=nFontW; FillBoxWithBitmap(hDC, x, y, 0, 0, &g_bmP[sBits[0]]); x +=nFontW; FillBoxWithBitmap(hDC, x, y, 0, 0, &g_bmP[11]); } } break; } ReleaseDC(hDC); }