comctl32/monthcal: Get/set unicode format flag using MCM_[GET|SET]UNICODEFORMAT.
This commit is contained in:
parent
baac2a6c59
commit
cbdc99cdba
@ -100,6 +100,8 @@ typedef struct
|
|||||||
stored in SYSTEMTIME format */
|
stored in SYSTEMTIME format */
|
||||||
BOOL firstDaySet; /* first week day differs from locale defined */
|
BOOL firstDaySet; /* first week day differs from locale defined */
|
||||||
|
|
||||||
|
BOOL isUnicode; /* value set with MCM_SETUNICODE format */
|
||||||
|
|
||||||
int monthRange;
|
int monthRange;
|
||||||
MONTHDAYSTATE *monthdayState;
|
MONTHDAYSTATE *monthdayState;
|
||||||
SYSTEMTIME todaysDate;
|
SYSTEMTIME todaysDate;
|
||||||
@ -2412,6 +2414,7 @@ MONTHCAL_Create(HWND hwnd, LPCREATESTRUCTW lpcs)
|
|||||||
infoPtr->minSel = infoPtr->todaysDate;
|
infoPtr->minSel = infoPtr->todaysDate;
|
||||||
infoPtr->maxSel = infoPtr->todaysDate;
|
infoPtr->maxSel = infoPtr->todaysDate;
|
||||||
infoPtr->curSel = infoPtr->todaysDate;
|
infoPtr->curSel = infoPtr->todaysDate;
|
||||||
|
infoPtr->isUnicode = TRUE;
|
||||||
|
|
||||||
/* call MONTHCAL_UpdateSize to set all of the dimensions */
|
/* call MONTHCAL_UpdateSize to set all of the dimensions */
|
||||||
/* of the control */
|
/* of the control */
|
||||||
@ -2465,6 +2468,20 @@ MONTHCAL_Notify(MONTHCAL_INFO *infoPtr, NMHDR *hdr)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline BOOL
|
||||||
|
MONTHCAL_SetUnicodeFormat(MONTHCAL_INFO *infoPtr, BOOL isUnicode)
|
||||||
|
{
|
||||||
|
BOOL prev = infoPtr->isUnicode;
|
||||||
|
infoPtr->isUnicode = isUnicode;
|
||||||
|
return prev;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline BOOL
|
||||||
|
MONTHCAL_GetUnicodeFormat(const MONTHCAL_INFO *infoPtr)
|
||||||
|
{
|
||||||
|
return infoPtr->isUnicode;
|
||||||
|
}
|
||||||
|
|
||||||
static LRESULT WINAPI
|
static LRESULT WINAPI
|
||||||
MONTHCAL_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
MONTHCAL_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
@ -2540,6 +2557,12 @@ MONTHCAL_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
case MCM_GETMAXTODAYWIDTH:
|
case MCM_GETMAXTODAYWIDTH:
|
||||||
return MONTHCAL_GetMaxTodayWidth(infoPtr);
|
return MONTHCAL_GetMaxTodayWidth(infoPtr);
|
||||||
|
|
||||||
|
case MCM_SETUNICODEFORMAT:
|
||||||
|
return MONTHCAL_SetUnicodeFormat(infoPtr, (BOOL)wParam);
|
||||||
|
|
||||||
|
case MCM_GETUNICODEFORMAT:
|
||||||
|
return MONTHCAL_GetUnicodeFormat(infoPtr);
|
||||||
|
|
||||||
case WM_GETDLGCODE:
|
case WM_GETDLGCODE:
|
||||||
return DLGC_WANTARROWS | DLGC_WANTCHARS;
|
return DLGC_WANTARROWS | DLGC_WANTCHARS;
|
||||||
|
|
||||||
|
@ -901,14 +901,12 @@ static void test_monthcal_unicode(void)
|
|||||||
|
|
||||||
/* current setting is 1, so, should return 1 */
|
/* current setting is 1, so, should return 1 */
|
||||||
res = SendMessage(hwnd, MCM_GETUNICODEFORMAT, 0, 0);
|
res = SendMessage(hwnd, MCM_GETUNICODEFORMAT, 0, 0);
|
||||||
todo_wine
|
|
||||||
ok(1 == res ||
|
ok(1 == res ||
|
||||||
broken(0 == res), /* comctl32 <= 4.70 */
|
broken(0 == res), /* comctl32 <= 4.70 */
|
||||||
"Expected 1, got %d\n", res);
|
"Expected 1, got %d\n", res);
|
||||||
|
|
||||||
/* setting to 0, should return previous settings */
|
/* setting to 0, should return previous settings */
|
||||||
res = SendMessage(hwnd, MCM_SETUNICODEFORMAT, 0, 0);
|
res = SendMessage(hwnd, MCM_SETUNICODEFORMAT, 0, 0);
|
||||||
todo_wine
|
|
||||||
ok(1 == res ||
|
ok(1 == res ||
|
||||||
broken(0 == res), /* comctl32 <= 4.70 */
|
broken(0 == res), /* comctl32 <= 4.70 */
|
||||||
"Expected 1, got %d\n", res);
|
"Expected 1, got %d\n", res);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user