Proper handling for GWL_STYLE.

Minor cleanups.
This commit is contained in:
Dimitrie O. Paun 2005-03-25 10:27:11 +00:00 committed by Alexandre Julliard
parent ecc850c460
commit 0ac16713fd
1 changed files with 42 additions and 40 deletions

View File

@ -49,6 +49,7 @@ typedef struct
{ {
HWND Self; /* Handle to this up-down control */ HWND Self; /* Handle to this up-down control */
HWND Notify; /* Handle to the parent window */ HWND Notify; /* Handle to the parent window */
DWORD dwStyle; /* The GWL_STYLE for this window */
UINT AccelCount; /* Number of elements in AccelVect */ UINT AccelCount; /* Number of elements in AccelVect */
UDACCEL* AccelVect; /* Vector containing AccelCount elements */ UDACCEL* AccelVect; /* Vector containing AccelCount elements */
INT AccelIndex; /* Current accel index, -1 if not accel'ing */ INT AccelIndex; /* Current accel index, -1 if not accel'ing */
@ -140,7 +141,7 @@ static BOOL UPDOWN_OffsetVal(UPDOWN_INFO *infoPtr, int delta)
{ {
/* check if we can do the modification first */ /* check if we can do the modification first */
if(!UPDOWN_InBounds (infoPtr, infoPtr->CurVal+delta)) { if(!UPDOWN_InBounds (infoPtr, infoPtr->CurVal+delta)) {
if (GetWindowLongW (infoPtr->Self, GWL_STYLE) & UDS_WRAP) { if (infoPtr->dwStyle & UDS_WRAP) {
delta += (delta < 0 ? -1 : 1) * delta += (delta < 0 ? -1 : 1) *
(infoPtr->MaxVal < infoPtr->MinVal ? -1 : 1) * (infoPtr->MaxVal < infoPtr->MinVal ? -1 : 1) *
(infoPtr->MinVal - infoPtr->MaxVal) + (infoPtr->MinVal - infoPtr->MaxVal) +
@ -160,9 +161,7 @@ static BOOL UPDOWN_OffsetVal(UPDOWN_INFO *infoPtr, int delta)
*/ */
static BOOL UPDOWN_HasBuddyBorder(UPDOWN_INFO* infoPtr) static BOOL UPDOWN_HasBuddyBorder(UPDOWN_INFO* infoPtr)
{ {
DWORD dwStyle = GetWindowLongW (infoPtr->Self, GWL_STYLE); return ( ((infoPtr->dwStyle & (UDS_ALIGNLEFT | UDS_ALIGNRIGHT)) != 0) &&
return ( ((dwStyle & (UDS_ALIGNLEFT | UDS_ALIGNRIGHT)) != 0) &&
UPDOWN_IsBuddyEdit(infoPtr) ); UPDOWN_IsBuddyEdit(infoPtr) );
} }
@ -176,8 +175,6 @@ static BOOL UPDOWN_HasBuddyBorder(UPDOWN_INFO* infoPtr)
*/ */
static void UPDOWN_GetArrowRect (UPDOWN_INFO* infoPtr, RECT *rect, int arrow) static void UPDOWN_GetArrowRect (UPDOWN_INFO* infoPtr, RECT *rect, int arrow)
{ {
DWORD dwStyle = GetWindowLongW (infoPtr->Self, GWL_STYLE);
GetClientRect (infoPtr->Self, rect); GetClientRect (infoPtr->Self, rect);
/* /*
@ -185,7 +182,7 @@ static void UPDOWN_GetArrowRect (UPDOWN_INFO* infoPtr, RECT *rect, int arrow)
* border. * border.
*/ */
if (UPDOWN_HasBuddyBorder(infoPtr)) { if (UPDOWN_HasBuddyBorder(infoPtr)) {
if (dwStyle & UDS_ALIGNLEFT) if (infoPtr->dwStyle & UDS_ALIGNLEFT)
rect->left += DEFAULT_BUDDYBORDER; rect->left += DEFAULT_BUDDYBORDER;
else else
rect->right -= DEFAULT_BUDDYBORDER; rect->right -= DEFAULT_BUDDYBORDER;
@ -195,7 +192,7 @@ static void UPDOWN_GetArrowRect (UPDOWN_INFO* infoPtr, RECT *rect, int arrow)
/* now figure out if we need a space away from the buddy */ /* now figure out if we need a space away from the buddy */
if ( IsWindow(infoPtr->Buddy) ) { if ( IsWindow(infoPtr->Buddy) ) {
if (dwStyle & UDS_ALIGNLEFT) rect->right -= DEFAULT_BUDDYSPACER; if (infoPtr->dwStyle & UDS_ALIGNLEFT) rect->right -= DEFAULT_BUDDYSPACER;
else rect->left += DEFAULT_BUDDYSPACER; else rect->left += DEFAULT_BUDDYSPACER;
} }
@ -204,7 +201,7 @@ static void UPDOWN_GetArrowRect (UPDOWN_INFO* infoPtr, RECT *rect, int arrow)
* separation between the buttons will lay. We make sure that we * separation between the buttons will lay. We make sure that we
* round the uneven numbers by adding 1. * round the uneven numbers by adding 1.
*/ */
if (dwStyle & UDS_HORZ) { if (infoPtr->dwStyle & UDS_HORZ) {
int len = rect->right - rect->left + 1; /* compute the width */ int len = rect->right - rect->left + 1; /* compute the width */
if (arrow & FLAG_INCR) if (arrow & FLAG_INCR)
rect->left = rect->left + len/2; rect->left = rect->left + len/2;
@ -264,7 +261,7 @@ static BOOL UPDOWN_GetBuddyInt (UPDOWN_INFO *infoPtr)
WCHAR txt[20], sep, *src, *dst; WCHAR txt[20], sep, *src, *dst;
int newVal; int newVal;
if (!IsWindow(infoPtr->Buddy)) if (!((infoPtr->dwStyle & UDS_SETBUDDYINT) && IsWindow(infoPtr->Buddy)))
return FALSE; return FALSE;
/*if the buddy is a list window, we must set curr index */ /*if the buddy is a list window, we must set curr index */
@ -309,7 +306,8 @@ static BOOL UPDOWN_SetBuddyInt (UPDOWN_INFO *infoPtr)
WCHAR txt[20]; WCHAR txt[20];
int len; int len;
if (!IsWindow(infoPtr->Buddy)) return FALSE; if (!((infoPtr->dwStyle & UDS_SETBUDDYINT) && IsWindow(infoPtr->Buddy)))
return FALSE;
TRACE("set new value(%d) to buddy.\n", infoPtr->CurVal); TRACE("set new value(%d) to buddy.\n", infoPtr->CurVal);
@ -324,7 +322,7 @@ static BOOL UPDOWN_SetBuddyInt (UPDOWN_INFO *infoPtr)
/* Do thousands separation if necessary */ /* Do thousands separation if necessary */
if (!(GetWindowLongW (infoPtr->Self, GWL_STYLE) & UDS_NOTHOUSANDS) && (len > 3)) { if (!(infoPtr->dwStyle & UDS_NOTHOUSANDS) && (len > 3)) {
WCHAR tmp[COUNT_OF(txt)], *src = tmp, *dst = txt; WCHAR tmp[COUNT_OF(txt)], *src = tmp, *dst = txt;
WCHAR sep = UPDOWN_GetThousandSep(); WCHAR sep = UPDOWN_GetThousandSep();
int start = len % 3; int start = len % 3;
@ -350,7 +348,6 @@ static BOOL UPDOWN_SetBuddyInt (UPDOWN_INFO *infoPtr)
*/ */
static LRESULT UPDOWN_Draw (UPDOWN_INFO *infoPtr, HDC hdc) static LRESULT UPDOWN_Draw (UPDOWN_INFO *infoPtr, HDC hdc)
{ {
DWORD dwStyle = GetWindowLongW (infoPtr->Self, GWL_STYLE);
BOOL pressed, hot; BOOL pressed, hot;
RECT rect; RECT rect;
@ -359,7 +356,7 @@ static LRESULT UPDOWN_Draw (UPDOWN_INFO *infoPtr, HDC hdc)
GetClientRect(infoPtr->Self, &rect); GetClientRect(infoPtr->Self, &rect);
DrawEdge(hdc, &rect, EDGE_SUNKEN, DrawEdge(hdc, &rect, EDGE_SUNKEN,
BF_BOTTOM | BF_TOP | BF_BOTTOM | BF_TOP |
(dwStyle & UDS_ALIGNLEFT ? BF_LEFT : BF_RIGHT)); (infoPtr->dwStyle & UDS_ALIGNLEFT ? BF_LEFT : BF_RIGHT));
} }
/* Draw the incr button */ /* Draw the incr button */
@ -367,20 +364,20 @@ static LRESULT UPDOWN_Draw (UPDOWN_INFO *infoPtr, HDC hdc)
pressed = (infoPtr->Flags & FLAG_PRESSED) && (infoPtr->Flags & FLAG_INCR); pressed = (infoPtr->Flags & FLAG_PRESSED) && (infoPtr->Flags & FLAG_INCR);
hot = (infoPtr->Flags & FLAG_INCR) && (infoPtr->Flags & FLAG_MOUSEIN); hot = (infoPtr->Flags & FLAG_INCR) && (infoPtr->Flags & FLAG_MOUSEIN);
DrawFrameControl(hdc, &rect, DFC_SCROLL, DrawFrameControl(hdc, &rect, DFC_SCROLL,
(dwStyle & UDS_HORZ ? DFCS_SCROLLRIGHT : DFCS_SCROLLUP) | (infoPtr->dwStyle & UDS_HORZ ? DFCS_SCROLLRIGHT : DFCS_SCROLLUP) |
((dwStyle & UDS_HOTTRACK) && hot ? DFCS_HOT : 0) | ((infoPtr->dwStyle & UDS_HOTTRACK) && hot ? DFCS_HOT : 0) |
(pressed ? DFCS_PUSHED : 0) | (pressed ? DFCS_PUSHED : 0) |
(dwStyle & WS_DISABLED ? DFCS_INACTIVE : 0) ); (infoPtr->dwStyle & WS_DISABLED ? DFCS_INACTIVE : 0) );
/* Draw the decr button */ /* Draw the decr button */
UPDOWN_GetArrowRect(infoPtr, &rect, FLAG_DECR); UPDOWN_GetArrowRect(infoPtr, &rect, FLAG_DECR);
pressed = (infoPtr->Flags & FLAG_PRESSED) && (infoPtr->Flags & FLAG_DECR); pressed = (infoPtr->Flags & FLAG_PRESSED) && (infoPtr->Flags & FLAG_DECR);
hot = (infoPtr->Flags & FLAG_DECR) && (infoPtr->Flags & FLAG_MOUSEIN); hot = (infoPtr->Flags & FLAG_DECR) && (infoPtr->Flags & FLAG_MOUSEIN);
DrawFrameControl(hdc, &rect, DFC_SCROLL, DrawFrameControl(hdc, &rect, DFC_SCROLL,
(dwStyle & UDS_HORZ ? DFCS_SCROLLLEFT : DFCS_SCROLLDOWN) | (infoPtr->dwStyle & UDS_HORZ ? DFCS_SCROLLLEFT : DFCS_SCROLLDOWN) |
((dwStyle & UDS_HOTTRACK) && hot ? DFCS_HOT : 0) | ((infoPtr->dwStyle & UDS_HOTTRACK) && hot ? DFCS_HOT : 0) |
(pressed ? DFCS_PUSHED : 0) | (pressed ? DFCS_PUSHED : 0) |
(dwStyle & WS_DISABLED ? DFCS_INACTIVE : 0) ); (infoPtr->dwStyle & WS_DISABLED ? DFCS_INACTIVE : 0) );
return 0; return 0;
} }
@ -458,7 +455,6 @@ static HWND UPDOWN_SetBuddy (UPDOWN_INFO* infoPtr, HWND bud)
{ {
static const WCHAR editW[] = { 'E', 'd', 'i', 't', 0 }; static const WCHAR editW[] = { 'E', 'd', 'i', 't', 0 };
static const WCHAR listboxW[] = { 'L', 'i', 's', 't', 'b', 'o', 'x', 0 }; static const WCHAR listboxW[] = { 'L', 'i', 's', 't', 'b', 'o', 'x', 0 };
DWORD dwStyle = GetWindowLongW (infoPtr->Self, GWL_STYLE);
RECT budRect; /* new coord for the buddy */ RECT budRect; /* new coord for the buddy */
int x, width; /* new x position and width for the up-down */ int x, width; /* new x position and width for the up-down */
WNDPROC baseWndProc; WNDPROC baseWndProc;
@ -492,7 +488,7 @@ static HWND UPDOWN_SetBuddy (UPDOWN_INFO* infoPtr, HWND bud)
infoPtr->BuddyType = BUDDY_TYPE_LISTBOX; infoPtr->BuddyType = BUDDY_TYPE_LISTBOX;
} }
if(dwStyle & UDS_ARROWKEYS){ if(infoPtr->dwStyle & UDS_ARROWKEYS){
/* Note that I don't clear the BUDDY_SUPERCLASS_WNDPROC property /* Note that I don't clear the BUDDY_SUPERCLASS_WNDPROC property
when we reset the upDown ctrl buddy to another buddy because it is not when we reset the upDown ctrl buddy to another buddy because it is not
good to break the window proc chain. */ good to break the window proc chain. */
@ -507,10 +503,10 @@ static HWND UPDOWN_SetBuddy (UPDOWN_INFO* infoPtr, HWND bud)
MapWindowPoints(HWND_DESKTOP, GetParent(infoPtr->Buddy), (POINT *)(&budRect.left), 2); MapWindowPoints(HWND_DESKTOP, GetParent(infoPtr->Buddy), (POINT *)(&budRect.left), 2);
/* now do the positioning */ /* now do the positioning */
if (dwStyle & UDS_ALIGNLEFT) { if (infoPtr->dwStyle & UDS_ALIGNLEFT) {
x = budRect.left; x = budRect.left;
budRect.left += DEFAULT_WIDTH + DEFAULT_XSEP; budRect.left += DEFAULT_WIDTH + DEFAULT_XSEP;
} else if (dwStyle & UDS_ALIGNRIGHT) { } else if (infoPtr->dwStyle & UDS_ALIGNRIGHT) {
budRect.right -= DEFAULT_WIDTH + DEFAULT_XSEP; budRect.right -= DEFAULT_WIDTH + DEFAULT_XSEP;
x = budRect.right+DEFAULT_XSEP; x = budRect.right+DEFAULT_XSEP;
} else { } else {
@ -534,7 +530,7 @@ static HWND UPDOWN_SetBuddy (UPDOWN_INFO* infoPtr, HWND bud)
* We nudge the control or change its size to overlap. * We nudge the control or change its size to overlap.
*/ */
if (UPDOWN_HasBuddyBorder(infoPtr)) { if (UPDOWN_HasBuddyBorder(infoPtr)) {
if(dwStyle & UDS_ALIGNLEFT) if(infoPtr->dwStyle & UDS_ALIGNLEFT)
width += DEFAULT_BUDDYBORDER; width += DEFAULT_BUDDYBORDER;
else else
x -= DEFAULT_BUDDYBORDER; x -= DEFAULT_BUDDYBORDER;
@ -566,7 +562,6 @@ static HWND UPDOWN_SetBuddy (UPDOWN_INFO* infoPtr, HWND bud)
*/ */
static void UPDOWN_DoAction (UPDOWN_INFO *infoPtr, int delta, int action) static void UPDOWN_DoAction (UPDOWN_INFO *infoPtr, int delta, int action)
{ {
DWORD dwStyle = GetWindowLongW (infoPtr->Self, GWL_STYLE);
NM_UPDOWN ni; NM_UPDOWN ni;
TRACE("%d by %d\n", action, delta); TRACE("%d by %d\n", action, delta);
@ -591,12 +586,12 @@ static void UPDOWN_DoAction (UPDOWN_INFO *infoPtr, int delta, int action)
TRACE("new %d, delta: %d\n", infoPtr->CurVal, ni.iDelta); TRACE("new %d, delta: %d\n", infoPtr->CurVal, ni.iDelta);
/* Now take care about our buddy */ /* Now take care about our buddy */
if (dwStyle & UDS_SETBUDDYINT) UPDOWN_SetBuddyInt (infoPtr); UPDOWN_SetBuddyInt (infoPtr);
} }
} }
/* Also, notify it. This message is sent in any case. */ /* Also, notify it. This message is sent in any case. */
SendMessageW( infoPtr->Notify, dwStyle & UDS_HORZ ? WM_HSCROLL : WM_VSCROLL, SendMessageW( infoPtr->Notify, (infoPtr->dwStyle & UDS_HORZ) ? WM_HSCROLL : WM_VSCROLL,
MAKELONG(SB_THUMBPOSITION, infoPtr->CurVal), (LPARAM)infoPtr->Self); MAKELONG(SB_THUMBPOSITION, infoPtr->CurVal), (LPARAM)infoPtr->Self);
} }
@ -655,7 +650,6 @@ static BOOL UPDOWN_CancelMode (UPDOWN_INFO *infoPtr)
*/ */
static void UPDOWN_HandleMouseEvent (UPDOWN_INFO *infoPtr, UINT msg, INT x, INT y) static void UPDOWN_HandleMouseEvent (UPDOWN_INFO *infoPtr, UINT msg, INT x, INT y)
{ {
DWORD dwStyle = GetWindowLongW (infoPtr->Self, GWL_STYLE);
POINT pt = { x, y }; POINT pt = { x, y };
RECT rect; RECT rect;
int temp, arrow; int temp, arrow;
@ -682,7 +676,7 @@ static void UPDOWN_HandleMouseEvent (UPDOWN_INFO *infoPtr, UINT msg, INT x, INT
if (infoPtr->Flags & FLAG_ARROW) { if (infoPtr->Flags & FLAG_ARROW) {
/* Update the CurVal if necessary */ /* Update the CurVal if necessary */
if (dwStyle & UDS_SETBUDDYINT) UPDOWN_GetBuddyInt (infoPtr); UPDOWN_GetBuddyInt (infoPtr);
/* Set up the correct flags */ /* Set up the correct flags */
infoPtr->Flags |= FLAG_PRESSED; infoPtr->Flags |= FLAG_PRESSED;
@ -734,7 +728,6 @@ static void UPDOWN_HandleMouseEvent (UPDOWN_INFO *infoPtr, UINT msg, INT x, INT
static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{ {
UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr (hwnd); UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr (hwnd);
DWORD dwStyle = GetWindowLongW (hwnd, GWL_STYLE);
int temp; int temp;
TRACE("hwnd=%p msg=%04x wparam=%08x lparam=%08lx\n", hwnd, message, wParam, lParam); TRACE("hwnd=%p msg=%04x wparam=%08x lparam=%08lx\n", hwnd, message, wParam, lParam);
@ -745,13 +738,13 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L
switch(message) switch(message)
{ {
case WM_CREATE: case WM_CREATE:
SetWindowLongW (hwnd, GWL_STYLE, dwStyle & ~WS_BORDER);
infoPtr = (UPDOWN_INFO*)Alloc (sizeof(UPDOWN_INFO)); infoPtr = (UPDOWN_INFO*)Alloc (sizeof(UPDOWN_INFO));
SetWindowLongPtrW (hwnd, 0, (DWORD_PTR)infoPtr); SetWindowLongPtrW (hwnd, 0, (DWORD_PTR)infoPtr);
/* initialize the info struct */ /* initialize the info struct */
infoPtr->Self = hwnd; infoPtr->Self = hwnd;
infoPtr->Notify = ((LPCREATESTRUCTA)lParam)->hwndParent; infoPtr->Notify = ((LPCREATESTRUCTW)lParam)->hwndParent;
infoPtr->dwStyle = ((LPCREATESTRUCTW)lParam)->style;
infoPtr->AccelCount = 0; infoPtr->AccelCount = 0;
infoPtr->AccelVect = 0; infoPtr->AccelVect = 0;
infoPtr->AccelIndex = -1; infoPtr->AccelIndex = -1;
@ -762,8 +755,10 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L
infoPtr->Buddy = 0; /* No buddy window yet */ infoPtr->Buddy = 0; /* No buddy window yet */
infoPtr->Flags = 0; /* And no flags */ infoPtr->Flags = 0; /* And no flags */
SetWindowLongW (hwnd, GWL_STYLE, infoPtr->dwStyle & ~WS_BORDER);
/* Do we pick the buddy win ourselves? */ /* Do we pick the buddy win ourselves? */
if (dwStyle & UDS_AUTOBUDDY) if (infoPtr->dwStyle & UDS_AUTOBUDDY)
UPDOWN_SetBuddy (infoPtr, GetWindow (hwnd, GW_HWNDPREV)); UPDOWN_SetBuddy (infoPtr, GetWindow (hwnd, GW_HWNDPREV));
TRACE("UpDown Ctrl creation, hwnd=%p\n", hwnd); TRACE("UpDown Ctrl creation, hwnd=%p\n", hwnd);
@ -780,10 +775,17 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L
break; break;
case WM_ENABLE: case WM_ENABLE:
if (dwStyle & WS_DISABLED) UPDOWN_CancelMode (infoPtr); if (infoPtr->dwStyle & WS_DISABLED) UPDOWN_CancelMode (infoPtr);
InvalidateRect (infoPtr->Self, NULL, FALSE); InvalidateRect (infoPtr->Self, NULL, FALSE);
break; break;
case WM_STYLECHANGED:
if (wParam == GWL_STYLE) {
infoPtr->dwStyle = ((LPSTYLESTRUCT)lParam)->styleNew;
InvalidateRect (infoPtr->Self, NULL, FALSE);
}
break;
case WM_TIMER: case WM_TIMER:
/* is this the auto-press timer? */ /* is this the auto-press timer? */
if(wParam == TIMER_AUTOPRESS) { if(wParam == TIMER_AUTOPRESS) {
@ -831,7 +833,7 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L
(infoPtr->Flags & FLAG_ARROW) ) { (infoPtr->Flags & FLAG_ARROW) ) {
SendMessageW( infoPtr->Notify, SendMessageW( infoPtr->Notify,
dwStyle & UDS_HORZ ? WM_HSCROLL : WM_VSCROLL, (infoPtr->dwStyle & UDS_HORZ) ? WM_HSCROLL : WM_VSCROLL,
MAKELONG(SB_ENDSCROLL, infoPtr->CurVal), MAKELONG(SB_ENDSCROLL, infoPtr->CurVal),
(LPARAM)hwnd); (LPARAM)hwnd);
if (UPDOWN_IsBuddyEdit(infoPtr)) if (UPDOWN_IsBuddyEdit(infoPtr))
@ -847,7 +849,7 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L
break; break;
case WM_KEYDOWN: case WM_KEYDOWN:
if((dwStyle & UDS_ARROWKEYS) && UPDOWN_IsEnabled(infoPtr)) if((infoPtr->dwStyle & UDS_ARROWKEYS) && UPDOWN_IsEnabled(infoPtr))
return UPDOWN_KeyPressed(infoPtr, (int)wParam); return UPDOWN_KeyPressed(infoPtr, (int)wParam);
break; break;
@ -913,7 +915,7 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L
} }
wParam = infoPtr->CurVal; wParam = infoPtr->CurVal;
infoPtr->CurVal = temp; infoPtr->CurVal = temp;
if(dwStyle & UDS_SETBUDDYINT) UPDOWN_SetBuddyInt (infoPtr); UPDOWN_SetBuddyInt (infoPtr);
return wParam; /* return prev value */ return wParam; /* return prev value */
case UDM_GETRANGE: case UDM_GETRANGE:
@ -953,7 +955,7 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L
} }
temp = infoPtr->CurVal; /* save prev value */ temp = infoPtr->CurVal; /* save prev value */
infoPtr->CurVal = (int)lParam; /* set the new value */ infoPtr->CurVal = (int)lParam; /* set the new value */
if(dwStyle & UDS_SETBUDDYINT) UPDOWN_SetBuddyInt (infoPtr); UPDOWN_SetBuddyInt (infoPtr);
return temp; /* return prev value */ return temp; /* return prev value */
case UDM_GETUNICODEFORMAT: case UDM_GETUNICODEFORMAT: