- Timestamp:
- Sep 20, 1999, 5:59:27 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/hotkey.c
r983 r988 1 /* $Id: hotkey.c,v 1. 6 1999-09-19 13:27:09cbratschi Exp $ */1 /* $Id: hotkey.c,v 1.7 1999-09-20 15:59:27 cbratschi Exp $ */ 2 2 /* 3 3 * Hotkey control … … 22 22 23 23 static VOID 24 HOTKEY_UpdateHotKey(HWND hwnd); 24 HOTKEY_Refresh(HWND hwnd) 25 { 26 InvalidateRect(hwnd,NULL,FALSE); 27 } 28 25 29 26 30 static BYTE … … 49 53 infoPtr->bfMods = HOTKEY_Check(infoPtr,(wParam & 0xFF00)>>8); 50 54 51 HOTKEY_ UpdateHotKey(hwnd);55 HOTKEY_Refresh(hwnd); 52 56 53 57 return 0; … … 74 78 75 79 infoPtr->bfMods = HOTKEY_Check(infoPtr,infoPtr->bfMods); 76 if (infoPtr->bfMods != oldMods) HOTKEY_ UpdateHotKey(hwnd);80 if (infoPtr->bfMods != oldMods) HOTKEY_Refresh(hwnd); 77 81 78 82 return 0; … … 184 188 185 189 infoPtr->bfMods = newMods; 186 HOTKEY_ UpdateHotKey(hwnd);190 HOTKEY_Refresh(hwnd); 187 191 188 192 return TRUE; … … 274 278 DrawTextA(hdc,text,strlen(text),&newRect,DT_LEFT | DT_BOTTOM | DT_SINGLELINE | DT_CALCRECT); 275 279 if (infoPtr->hFont) SelectObject(hdc,oldFont); 276 infoPtr->cursorPos.x = (newRect.right >= rect.right)? -1:newRect.right;280 infoPtr->cursorPos.x = (newRect.right >= rect.right)? 3:newRect.right; 277 281 SetCaretPos(infoPtr->cursorPos.x,infoPtr->cursorPos.y); 278 282 ShowCaret(hwnd); … … 296 300 } 297 301 298 299 static VOID300 HOTKEY_UpdateHotKey(HWND hwnd)301 {302 HDC hdc;303 RECT rect;304 HBRUSH hBrush;305 306 GetClientRect(hwnd,&rect);307 InflateRect(&rect,2,2);308 hdc = GetDC(hwnd);309 hBrush = (HBRUSH)SendMessageA(GetParent(hwnd),WM_CTLCOLOREDIT,hdc,(LPARAM)hwnd);310 if (!hBrush) hBrush = (HBRUSH)GetStockObject(WHITE_BRUSH);311 FillRect(hdc,&rect,hBrush);312 HOTKEY_Draw(hwnd,hdc);313 ReleaseDC(hwnd,hdc);314 }315 302 316 303 static LRESULT … … 350 337 ReleaseDC (hwnd, hdc); 351 338 352 if (LOWORD(lParam)) HOTKEY_ UpdateHotKey(hwnd);339 if (LOWORD(lParam)) HOTKEY_Refresh(hwnd); 353 340 354 341 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.