Changeset 1801 for trunk/src/user32/static.cpp
- Timestamp:
- Nov 21, 1999, 6:07:52 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/static.cpp
r1797 r1801 1 /* $Id: static.cpp,v 1.1 0 1999-11-21 14:37:17 achimhaExp $ */1 /* $Id: static.cpp,v 1.11 1999-11-21 17:07:51 cbratschi Exp $ */ 2 2 /* 3 3 * Static control … … 14 14 15 15 #include <stdlib.h> 16 #include <string.h> 16 17 #include <os2win.h> 17 18 #include "controls.h" … … 321 322 UpdateWindow(hwnd); 322 323 323 return 0; 324 return TRUE; 325 } 326 327 LRESULT STATIC_GetText(HWND hwnd,WPARAM wParam,LPARAM lParam) 328 { 329 DWORD style = GetWindowLongA(hwnd,GWL_STYLE) & SS_TYPEMASK; 330 331 if (style == SS_ICON) 332 { 333 STATICINFO* infoPtr = (STATICINFO*)GetInfoPtr(hwnd); 334 335 if (wParam < 4 || !lParam) return 0; 336 memcpy((VOID*)lParam,&infoPtr->hIcon,4); 337 338 return 4; 339 } else return DefWindowProcA(hwnd,WM_GETTEXT,wParam,lParam); 340 } 341 342 LRESULT STATIC_GetTextLength(HWND hwnd,WPARAM wParam,LPARAM lParam) 343 { 344 DWORD style = GetWindowLongA(hwnd,GWL_STYLE) & SS_TYPEMASK; 345 346 if (style == SS_ICON) return 4; 347 else return DefWindowProcA(hwnd,WM_GETTEXTLENGTH,wParam,lParam); 324 348 } 325 349 … … 479 503 case WM_SETTEXT: 480 504 return STATIC_SetText(hwnd,wParam,lParam); 505 506 case WM_GETTEXT: 507 return STATIC_GetText(hwnd,wParam,lParam); 508 509 case WM_GETTEXTLENGTH: 510 return STATIC_GetTextLength(hwnd,wParam,lParam); 481 511 482 512 case WM_SETFONT: … … 722 752 switch (dwStyle & SS_TYPEMASK) 723 753 { 724 725 726 727 728 729 754 case SS_ETCHEDHORZ: 755 DrawEdge(hdc,&rc,EDGE_ETCHED,BF_TOP|BF_BOTTOM); 756 break; 757 case SS_ETCHEDVERT: 758 DrawEdge(hdc,&rc,EDGE_ETCHED,BF_LEFT|BF_RIGHT); 759 break; 730 760 case SS_ETCHEDFRAME: 731 761 DrawEdge (hdc, &rc, EDGE_ETCHED, BF_RECT);
Note:
See TracChangeset
for help on using the changeset viewer.