Changeset 9370 for trunk/src/comctl32/updown.c
- Timestamp:
- Oct 29, 2002, 1:19:36 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/updown.c
r8382 r9370 1 /* 1 /* 2 2 * Updown control 3 3 * … … 18 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 * 20 * NOTE 21 * 22 * This code was audited for completeness against the documented features 23 * of Comctl32.dll version 6.0 on Sep. 9, 2002, by Dimitrie O. Paun. 24 * 25 * Unless otherwise noted, we believe this code to be complete, as per 26 * the specification mentioned above. 27 * If you discover missing features, or bugs, please note them below. 28 * 20 29 */ 21 30 … … 30 39 #include "commctrl.h" 31 40 #include "winnls.h" 32 #include " ntddk.h"41 #include "wine/unicode.h" 33 42 #include "wine/debug.h" 34 #ifdef __WIN32OS2__35 #include "comctl32.h"36 #endif37 43 38 44 WINE_DEFAULT_DEBUG_CHANNEL(updown); … … 87 93 #define BUDDY_SUPERCLASS_WNDPROC "buddySupperClassWndProc" 88 94 89 #define UNKNOWN_PARAM(msg, wParam, lParam) WARN(\90 "Unknown parameter(s) for message " #msg \91 "(%04x): wp=%04x lp=%08lx\n", msg, wParam, lParam);92 93 95 #define UPDOWN_GetInfoPtr(hwnd) ((UPDOWN_INFO *)GetWindowLongA (hwnd,0)) 94 96 #define COUNT_OF(a) (sizeof(a)/sizeof(a[0])) … … 155 157 */ 156 158 static BOOL UPDOWN_HasBuddyBorder(UPDOWN_INFO* infoPtr) 157 { 159 { 158 160 DWORD dwStyle = GetWindowLongW (infoPtr->Self, GWL_STYLE); 159 161 … … 185 187 else 186 188 rect->right -= DEFAULT_BUDDYBORDER; 187 189 188 190 InflateRect(rect, 0, -DEFAULT_BUDDYBORDER); 189 191 } … … 194 196 else rect->left += DEFAULT_BUDDYSPACER; 195 197 } 196 198 197 199 /* 198 200 * We're calculating the midpoint to figure-out where the … … 203 205 int len = rect->right - rect->left + 1; /* compute the width */ 204 206 if (arrow & FLAG_INCR) 205 rect->left = rect->left + len/2; 207 rect->left = rect->left + len/2; 206 208 if (arrow & FLAG_DECR) 207 209 rect->right = rect->left + len/2 - 1; … … 271 273 if (!GetWindowTextW(infoPtr->Buddy, txt, COUNT_OF(txt))) return FALSE; 272 274 273 sep = UPDOWN_GetThousandSep(); 275 sep = UPDOWN_GetThousandSep(); 274 276 275 277 /* now get rid of the separators */ … … 279 281 280 282 /* try to convert the number and validate it */ 281 newVal = wcstol(txt, &src, infoPtr->Base);283 newVal = strtolW(txt, &src, infoPtr->Base); 282 284 if(*src || !UPDOWN_InBounds (infoPtr, newVal)) return FALSE; 283 285 } 284 286 285 287 TRACE("new value(%d) from buddy (old=%d)\n", newVal, infoPtr->CurVal); 286 288 infoPtr->CurVal = newVal; … … 310 312 return SendMessageW(infoPtr->Buddy, LB_SETCURSEL, infoPtr->CurVal, 0) != LB_ERR; 311 313 } 312 314 313 315 /* Regular window, so set caption to the number */ 314 316 if (infoPtr->Base == 16) fmt[1] = 'X'; 315 len = swprintf(txt, fmt, infoPtr->CurVal);317 len = wsprintfW(txt, fmt, infoPtr->CurVal); 316 318 317 319 … … 321 323 WCHAR sep = UPDOWN_GetThousandSep(); 322 324 int start = len % 3; 323 325 324 326 memcpy(tmp, txt, sizeof(txt)); 325 327 if (start == 0) start = 3; … … 332 334 *dst = 0; 333 335 } 334 336 335 337 return SetWindowTextW(infoPtr->Buddy, txt); 336 } 338 } 337 339 338 340 /*********************************************************************** … … 350 352 if (UPDOWN_HasBuddyBorder(infoPtr)) { 351 353 GetClientRect(infoPtr->Self, &rect); 352 DrawEdge(hdc, &rect, EDGE_SUNKEN, 353 BF_BOTTOM | BF_TOP | 354 DrawEdge(hdc, &rect, EDGE_SUNKEN, 355 BF_BOTTOM | BF_TOP | 354 356 (dwStyle & UDS_ALIGNLEFT ? BF_LEFT : BF_RIGHT)); 355 357 } 356 358 357 359 /* Draw the incr button */ 358 360 UPDOWN_GetArrowRect (infoPtr, &rect, FLAG_INCR); 359 361 pressed = (infoPtr->Flags & FLAG_PRESSED) && (infoPtr->Flags & FLAG_INCR); 360 362 hot = (infoPtr->Flags & FLAG_INCR) && (infoPtr->Flags & FLAG_MOUSEIN); 361 DrawFrameControl(hdc, &rect, DFC_SCROLL, 363 DrawFrameControl(hdc, &rect, DFC_SCROLL, 362 364 (dwStyle & UDS_HORZ ? DFCS_SCROLLRIGHT : DFCS_SCROLLUP) | 363 365 ((dwStyle & UDS_HOTTRACK) && hot ? DFCS_HOT : 0) | … … 369 371 pressed = (infoPtr->Flags & FLAG_PRESSED) && (infoPtr->Flags & FLAG_DECR); 370 372 hot = (infoPtr->Flags & FLAG_DECR) && (infoPtr->Flags & FLAG_MOUSEIN); 371 DrawFrameControl(hdc, &rect, DFC_SCROLL, 373 DrawFrameControl(hdc, &rect, DFC_SCROLL, 372 374 (dwStyle & UDS_HORZ ? DFCS_SCROLLLEFT : DFCS_SCROLLDOWN) | 373 375 ((dwStyle & UDS_HOTTRACK) && hot ? DFCS_HOT : 0) | … … 402 404 { 403 405 int arrow; 404 406 405 407 if (key == VK_UP) arrow = FLAG_INCR; 406 408 else if (key == VK_DOWN) arrow = FLAG_DECR; 407 409 else return 1; 408 410 409 411 UPDOWN_GetBuddyInt (infoPtr); 410 412 infoPtr->Flags &= ~FLAG_ARROW; … … 417 419 418 420 /*********************************************************************** 419 * UPDOWN_Buddy_SubclassProc used to handle messages sent to the buddy 421 * UPDOWN_Buddy_SubclassProc used to handle messages sent to the buddy 420 422 * control. 421 423 */ 422 static LRESULT CALLBACK 424 static LRESULT CALLBACK 423 425 UPDOWN_Buddy_SubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) 424 426 { 425 427 WNDPROC superClassWndProc = (WNDPROC)GetPropA(hwnd, BUDDY_SUPERCLASS_WNDPROC); 426 TRACE("hwnd=% 04x, wndProc=%d, uMsg=%04x, wParam=%d, lParam=%d\n",428 TRACE("hwnd=%p, wndProc=%d, uMsg=%04x, wParam=%d, lParam=%d\n", 427 429 hwnd, (INT)superClassWndProc, uMsg, wParam, (UINT)lParam); 428 430 429 431 if (uMsg == WM_KEYDOWN) { 430 432 HWND upDownHwnd = GetPropA(hwnd, BUDDY_UPDOWN_HWND); 431 433 432 434 UPDOWN_KeyPressed(UPDOWN_GetInfoPtr(upDownHwnd), (int)wParam); 433 435 } … … 440 442 * Tests if 'bud' is a valid window handle. If not, returns FALSE. 441 443 * Else, sets it as a new Buddy. 442 * Then, it should subclass the buddy 444 * Then, it should subclass the buddy 443 445 * If window has the UDS_ARROWKEYS, it subcalsses the buddy window to 444 446 * process the UP/DOWN arrow keys. … … 451 453 RECT budRect; /* new coord for the buddy */ 452 454 int x, width; /* new x position and width for the up-down */ 453 WNDPROC baseWndProc , currWndProc;455 WNDPROC baseWndProc; 454 456 CHAR buddyClass[40]; 455 457 456 458 /* Is it a valid bud? */ 457 459 if(!IsWindow(bud)) return FALSE; 458 460 459 TRACE("(hwnd=% 04x, bud=%04x)\n", infoPtr->Self, bud);460 461 TRACE("(hwnd=%p, bud=%p)\n", infoPtr->Self, bud); 462 461 463 /* there is already a body assigned */ 462 464 if (infoPtr->Buddy) RemovePropA(infoPtr->Buddy, BUDDY_UPDOWN_HWND); 463 465 464 466 /* Store buddy window handle */ 465 infoPtr->Buddy = bud; 466 467 /* keep upDown ctrl hwnd in a buddy property */ 468 SetPropA( bud, BUDDY_UPDOWN_HWND, infoPtr->Self); 467 infoPtr->Buddy = bud; 468 469 /* keep upDown ctrl hwnd in a buddy property */ 470 SetPropA( bud, BUDDY_UPDOWN_HWND, infoPtr->Self); 469 471 470 472 /* Store buddy window class type */ … … 478 480 479 481 if(dwStyle & UDS_ARROWKEYS){ 480 /* Note that I don't clear the BUDDY_SUPERCLASS_WNDPROC property 481 when we reset the upDown ctrl buddy to another buddy because it is not 482 /* Note that I don't clear the BUDDY_SUPERCLASS_WNDPROC property 483 when we reset the upDown ctrl buddy to another buddy because it is not 482 484 good to break the window proc chain. */ 483 currWndProc = (WNDPROC) GetWindowLongW(bud, GWL_WNDPROC); 484 if (currWndProc != UPDOWN_Buddy_SubclassProc) { 485 baseWndProc = (WNDPROC)SetWindowLongW(bud, GWL_WNDPROC, (LPARAM)UPDOWN_Buddy_SubclassProc); 485 if (!GetPropA(bud, BUDDY_SUPERCLASS_WNDPROC)) { 486 baseWndProc = (WNDPROC)SetWindowLongW(bud, GWL_WNDPROC, (LPARAM)UPDOWN_Buddy_SubclassProc); 486 487 SetPropA(bud, BUDDY_SUPERCLASS_WNDPROC, (HANDLE)baseWndProc); 487 488 } … … 505 506 /* first adjust the buddy to accomodate the up/down */ 506 507 SetWindowPos(infoPtr->Buddy, 0, budRect.left, budRect.top, 507 budRect.right - budRect.left, budRect.bottom - budRect.top, 508 budRect.right - budRect.left, budRect.bottom - budRect.top, 508 509 SWP_NOACTIVATE|SWP_NOZORDER); 509 510 … … 515 516 /* 516 517 * If the updown has a buddy border, it has to overlap with the buddy 517 * to look as if it is integrated with the buddy control. 518 * to look as if it is integrated with the buddy control. 518 519 * We nudge the control or change it size to overlap. 519 520 */ … … 525 526 } 526 527 527 SetWindowPos(infoPtr->Self, infoPtr->Buddy, x, 528 budRect.top - DEFAULT_ADDTOP, width, 528 SetWindowPos(infoPtr->Self, infoPtr->Buddy, x, 529 budRect.top - DEFAULT_ADDTOP, width, 529 530 budRect.bottom - budRect.top + DEFAULT_ADDTOP + DEFAULT_ADDBOT, 530 531 SWP_NOACTIVATE); 531 532 532 533 return TRUE; 533 } 534 } 534 535 535 536 /*********************************************************************** 536 537 * UPDOWN_DoAction 537 538 * 538 * This function increments/decrements the CurVal by the 539 * This function increments/decrements the CurVal by the 539 540 * 'delta' amount according to the 'action' flag which can be a 540 541 * combination of FLAG_INCR and FLAG_DECR … … 559 560 ni.hdr.hwndFrom = infoPtr->Self; 560 561 ni.hdr.idFrom = GetWindowLongW (infoPtr->Self, GWL_ID); 561 ni.hdr.code = UDN_DELTAPOS; 562 ni.hdr.code = UDN_DELTAPOS; 562 563 if (!SendMessageW(GetParent (infoPtr->Self), WM_NOTIFY, 563 564 (WPARAM)ni.hdr.idFrom, (LPARAM)&ni)) { … … 570 571 } 571 572 } 572 573 573 574 /* Also, notify it. This message is sent in any case. */ 574 SendMessageW( GetParent(infoPtr->Self), 575 dwStyle & UDS_HORZ ? WM_HSCROLL : WM_VSCROLL, 576 MAKELONG(SB_THUMBPOSITION, infoPtr->CurVal), infoPtr->Self); 575 SendMessageW( GetParent(infoPtr->Self), 576 dwStyle & UDS_HORZ ? WM_HSCROLL : WM_VSCROLL, 577 MAKELONG(SB_THUMBPOSITION, infoPtr->CurVal), 578 (LPARAM)infoPtr->Self); 577 579 } 578 580 … … 597 599 * Deletes any timers, releases the mouse and does redraw if necessary. 598 600 * If the control is not in "capture" mode, it does nothing. 599 * If the control was not in cancel mode, it returns FALSE. 601 * If the control was not in cancel mode, it returns FALSE. 600 602 * If the control was in cancel mode, it returns TRUE. 601 603 */ … … 603 605 { 604 606 if (!(infoPtr->Flags & FLAG_PRESSED)) return FALSE; 605 607 606 608 KillTimer (infoPtr->Self, TIMER_AUTOREPEAT); 607 609 KillTimer (infoPtr->Self, TIMER_ACCEL); 608 610 KillTimer (infoPtr->Self, TIMER_AUTOPRESS); 609 611 610 612 if (GetCapture() == infoPtr->Self) { 611 613 NMHDR hdr; … … 616 618 ReleaseCapture(); 617 619 } 618 620 619 621 infoPtr->Flags &= ~FLAG_PRESSED; 620 622 InvalidateRect (infoPtr->Self, NULL, FALSE); 621 623 622 624 return TRUE; 623 625 } … … 628 630 * Handle a mouse event for the updown. 629 631 * 'pt' is the location of the mouse event in client or 630 * windows coordinates. 631 */ 632 static void UPDOWN_HandleMouseEvent (UPDOWN_INFO *infoPtr, UINT msg, POINT pt)632 * windows coordinates. 633 */ 634 static void UPDOWN_HandleMouseEvent (UPDOWN_INFO *infoPtr, UINT msg, POINTS pts) 633 635 { 634 636 DWORD dwStyle = GetWindowLongW (infoPtr->Self, GWL_STYLE); 637 POINT pt = { pts.x, pts.y }; 635 638 RECT rect; 636 639 int temp, arrow; … … 650 653 /* Update the CurVal if necessary */ 651 654 if (dwStyle & UDS_SETBUDDYINT) UPDOWN_GetBuddyInt (infoPtr); 652 655 653 656 /* Set up the correct flags */ 654 infoPtr->Flags |= FLAG_PRESSED; 655 657 infoPtr->Flags |= FLAG_PRESSED; 658 656 659 /* repaint the control */ 657 660 InvalidateRect (infoPtr->Self, NULL, FALSE); … … 682 685 if(infoPtr->AccelIndex != -1) infoPtr->AccelIndex = 0; 683 686 } 684 687 685 688 /* If state changed, redraw the control */ 686 689 if(temp != infoPtr->Flags) … … 703 706 DWORD dwStyle = GetWindowLongW (hwnd, GWL_STYLE); 704 707 int temp; 705 708 706 709 if (!infoPtr && (message != WM_CREATE)) 707 return DefWindowProcW (hwnd, message, wParam, lParam); 710 return DefWindowProcW (hwnd, message, wParam, lParam); 708 711 709 712 switch(message) … … 719 722 infoPtr->AccelVect = 0; 720 723 infoPtr->AccelIndex = -1; 721 infoPtr->CurVal = 0; 722 infoPtr->MinVal = 0; 724 infoPtr->CurVal = 0; 725 infoPtr->MinVal = 0; 723 726 infoPtr->MaxVal = 9999; 724 727 infoPtr->Base = 10; /* Default to base 10 */ … … 729 732 if (dwStyle & UDS_AUTOBUDDY) 730 733 UPDOWN_SetBuddy (infoPtr, GetWindow (hwnd, GW_HWNDPREV)); 731 732 TRACE("UpDown Ctrl creation, hwnd=% 04x\n", hwnd);733 break; 734 734 735 TRACE("UpDown Ctrl creation, hwnd=%p\n", hwnd); 736 break; 737 735 738 case WM_DESTROY: 736 739 if(infoPtr->AccelVect) COMCTL32_Free (infoPtr->AccelVect); … … 740 743 COMCTL32_Free (infoPtr); 741 744 SetWindowLongW (hwnd, 0, 0); 742 TRACE("UpDown Ctrl destruction, hwnd=% 04x\n", hwnd);743 break; 744 745 TRACE("UpDown Ctrl destruction, hwnd=%p\n", hwnd); 746 break; 747 745 748 case WM_ENABLE: 746 749 if (dwStyle & WS_DISABLED) UPDOWN_CancelMode (infoPtr); … … 774 777 temp = infoPtr->AccelIndex == -1 ? 1 : infoPtr->AccelVect[infoPtr->AccelIndex].nInc; 775 778 UPDOWN_DoAction(infoPtr, temp, infoPtr->Flags & FLAG_ARROW); 776 779 777 780 if(infoPtr->AccelIndex != -1 && infoPtr->AccelIndex < infoPtr->AccelCount-1) { 778 781 KillTimer(hwnd, TIMER_ACCEL); … … 780 783 temp = infoPtr->AccelVect[infoPtr->AccelIndex].nSec * 1000 + 1; 781 784 /* make sure we have at least 1ms intervals */ 782 SetTimer(hwnd, TIMER_ACCEL, temp, 0); 785 SetTimer(hwnd, TIMER_ACCEL, temp, 0); 783 786 } 784 787 } … … 790 793 case WM_LBUTTONUP: 791 794 if (GetCapture() != infoPtr->Self) break; 792 795 793 796 if ( (infoPtr->Flags & FLAG_MOUSEIN) && 794 797 (infoPtr->Flags & FLAG_ARROW) ) { 795 796 SendMessageW( GetParent(hwnd), 798 799 SendMessageW( GetParent(hwnd), 797 800 dwStyle & UDS_HORZ ? WM_HSCROLL : WM_VSCROLL, 798 MAKELONG(SB_ENDSCROLL, infoPtr->CurVal), hwnd); 801 MAKELONG(SB_ENDSCROLL, infoPtr->CurVal), 802 (LPARAM)hwnd); 799 803 if (UPDOWN_IsBuddyEdit(infoPtr)) 800 804 SendMessageW(infoPtr->Buddy, EM_SETSEL, 0, MAKELONG(0, -1)); … … 802 806 UPDOWN_CancelMode(infoPtr); 803 807 break; 804 808 805 809 case WM_LBUTTONDOWN: 806 810 case WM_MOUSEMOVE: 807 if(UPDOWN_IsEnabled(infoPtr)){ 808 POINT pt; 809 pt.x = SLOWORD(lParam); 810 pt.y = SHIWORD(lParam); 811 UPDOWN_HandleMouseEvent (infoPtr, message, pt ); 812 } 811 if(UPDOWN_IsEnabled(infoPtr)) 812 UPDOWN_HandleMouseEvent (infoPtr, message, MAKEPOINTS(lParam)); 813 813 break; 814 814 815 815 case WM_KEYDOWN: 816 if((dwStyle & UDS_ARROWKEYS) && UPDOWN_IsEnabled(infoPtr)) {816 if((dwStyle & UDS_ARROWKEYS) && UPDOWN_IsEnabled(infoPtr)) 817 817 return UPDOWN_KeyPressed(infoPtr, (int)wParam); 818 } 819 break; 820 818 break; 819 821 820 case WM_PAINT: 822 821 return UPDOWN_Paint (infoPtr, (HDC)wParam); 823 822 824 823 case UDM_GETACCEL: 825 824 if (wParam==0 && lParam==0) return infoPtr->AccelCount; … … 829 828 return temp; 830 829 } 831 UNKNOWN_PARAM(UDM_GETACCEL, wParam, lParam);832 830 return 0; 833 831 834 832 case UDM_SETACCEL: 835 TRACE("UpDown Ctrl new accel info, hwnd=% 04x\n", hwnd);833 TRACE("UpDown Ctrl new accel info, hwnd=%p\n", hwnd); 836 834 if(infoPtr->AccelVect) { 837 835 COMCTL32_Free (infoPtr->AccelVect); … … 846 844 847 845 case UDM_GETBASE: 848 if (wParam || lParam) UNKNOWN_PARAM(UDM_GETBASE, wParam, lParam);849 846 return infoPtr->Base; 850 847 851 848 case UDM_SETBASE: 852 TRACE("UpDown Ctrl new base(%d), hwnd=%04x\n", wParam, hwnd); 853 if ( !(wParam==10 || wParam==16) || lParam) 854 UNKNOWN_PARAM(UDM_SETBASE, wParam, lParam); 849 TRACE("UpDown Ctrl new base(%d), hwnd=%p\n", wParam, hwnd); 855 850 if (wParam==10 || wParam==16) { 856 851 temp = infoPtr->Base; … … 861 856 862 857 case UDM_GETBUDDY: 863 if (wParam || lParam) UNKNOWN_PARAM(UDM_GETBUDDY, wParam, lParam); 864 return infoPtr->Buddy; 858 return (LRESULT)infoPtr->Buddy; 865 859 866 860 case UDM_SETBUDDY: 867 if (lParam) UNKNOWN_PARAM(UDM_SETBUDDY, wParam, lParam); 868 temp = infoPtr->Buddy; 869 UPDOWN_SetBuddy (infoPtr, wParam); 861 temp = (int)infoPtr->Buddy; 862 UPDOWN_SetBuddy (infoPtr, (HWND)wParam); 870 863 return temp; 871 864 872 865 case UDM_GETPOS: 873 if (wParam || lParam) UNKNOWN_PARAM(UDM_GETPOS, wParam, lParam);874 866 temp = UPDOWN_GetBuddyInt (infoPtr); 875 867 return MAKELONG(infoPtr->CurVal, temp ? 0 : 1); 876 868 877 869 case UDM_SETPOS: 878 if (wParam || HIWORD(lParam)) UNKNOWN_PARAM(UDM_GETPOS, wParam, lParam);879 870 temp = SLOWORD(lParam); 880 TRACE("UpDown Ctrl new value(%d), hwnd=% 04x\n", temp, hwnd);871 TRACE("UpDown Ctrl new value(%d), hwnd=%p\n", temp, hwnd); 881 872 if(!UPDOWN_InBounds(infoPtr, temp)) { 882 873 if(temp < infoPtr->MinVal) temp = infoPtr->MinVal; … … 887 878 if(dwStyle & UDS_SETBUDDYINT) UPDOWN_SetBuddyInt (infoPtr); 888 879 return wParam; /* return prev value */ 889 880 890 881 case UDM_GETRANGE: 891 if (wParam || lParam) UNKNOWN_PARAM(UDM_GETRANGE, wParam, lParam);892 882 return MAKELONG(infoPtr->MaxVal, infoPtr->MinVal); 893 883 894 884 case UDM_SETRANGE: 895 if (wParam) UNKNOWN_PARAM(UDM_SETRANGE, wParam, lParam);896 885 /* we must have: */ 897 886 infoPtr->MaxVal = SLOWORD(lParam); /* UD_MINVAL <= Max <= UD_MAXVAL */ 898 887 infoPtr->MinVal = SHIWORD(lParam); /* UD_MINVAL <= Min <= UD_MAXVAL */ 899 888 /* |Max-Min| <= UD_MAXVAL */ 900 TRACE("UpDown Ctrl new range(%d to %d), hwnd=% 04x\n",889 TRACE("UpDown Ctrl new range(%d to %d), hwnd=%p\n", 901 890 infoPtr->MinVal, infoPtr->MaxVal, hwnd); 902 break; 891 break; 903 892 904 893 case UDM_GETRANGE32: … … 912 901 if (infoPtr->MaxVal <= infoPtr->MinVal) 913 902 infoPtr->MaxVal = infoPtr->MinVal + 1; 914 TRACE("UpDown Ctrl new range(%d to %d), hwnd=% 04x\n",903 TRACE("UpDown Ctrl new range(%d to %d), hwnd=%p\n", 915 904 infoPtr->MinVal, infoPtr->MaxVal, hwnd); 916 905 break; … … 931 920 932 921 case UDM_GETUNICODEFORMAT: 933 if (wParam || lParam) UNKNOWN_PARAM(UDM_GETUNICODEFORMAT, wParam, lParam);934 922 /* we lie a bit here, we're always using Unicode internally */ 935 923 return infoPtr->UnicodeFormat; 936 924 937 925 case UDM_SETUNICODEFORMAT: 938 if (lParam) UNKNOWN_PARAM(UDM_SETUNICODEFORMAT, wParam, lParam);939 926 /* do we really need to honour this flag? */ 940 927 temp = infoPtr->UnicodeFormat; 941 928 infoPtr->UnicodeFormat = (BOOL)wParam; 942 929 return temp; 943 944 default: 945 if ( message >= WM_USER)930 931 default: 932 if ((message >= WM_USER) && (message < WM_APP)) 946 933 ERR("unknown msg %04x wp=%04x lp=%08lx\n", message, wParam, lParam); 947 return DefWindowProcW (hwnd, message, wParam, lParam); 948 } 934 return DefWindowProcW (hwnd, message, wParam, lParam); 935 } 949 936 950 937 return 0; … … 956 943 * Registers the updown window class. 957 944 */ 958 959 VOID 960 UPDOWN_Register(void) 945 void UPDOWN_Register(void) 961 946 { 962 947 WNDCLASSW wndClass; … … 970 955 wndClass.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1); 971 956 wndClass.lpszClassName = UPDOWN_CLASSW; 972 957 973 958 RegisterClassW( &wndClass ); 974 959 } … … 980 965 * Unregisters the updown window class. 981 966 */ 982 983 VOID 984 UPDOWN_Unregister (void) 967 void UPDOWN_Unregister (void) 985 968 { 986 969 UnregisterClassW (UPDOWN_CLASSW, (HINSTANCE)NULL); 987 970 } 988
Note:
See TracChangeset
for help on using the changeset viewer.