mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 06:00:45 +00:00
comdlg32: Use IS_INTRESOURCE instead of HIWORD to check a resource.
This commit is contained in:
parent
6b912966a9
commit
5b389bacc5
@ -1366,7 +1366,7 @@ BOOL WINAPI ChooseColorA( LPCHOOSECOLORA lpChCol )
|
||||
lpcc->lCustData = lpChCol->lCustData;
|
||||
lpcc->lpfnHook = lpChCol->lpfnHook;
|
||||
if ((lpcc->Flags & CC_ENABLETEMPLATE) && (lpChCol->lpTemplateName)) {
|
||||
if (HIWORD(lpChCol->lpTemplateName)) {
|
||||
if (!IS_INTRESOURCE(lpChCol->lpTemplateName)) {
|
||||
INT len = MultiByteToWideChar( CP_ACP, 0, lpChCol->lpTemplateName, -1, NULL, 0);
|
||||
template_name = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
|
||||
MultiByteToWideChar( CP_ACP, 0, lpChCol->lpTemplateName, -1, template_name, len );
|
||||
|
@ -778,7 +778,7 @@ void FD31_MapOfnStructA(const OPENFILENAMEA *ofnA, LPOPENFILENAMEW ofnW, BOOL op
|
||||
ofnW->lpstrDefExt = FD31_DupToW(ofnA->lpstrDefExt, 3);
|
||||
if ((ofnA->Flags & OFN_ENABLETEMPLATE) && (ofnA->lpTemplateName))
|
||||
{
|
||||
if (HIWORD(ofnA->lpTemplateName))
|
||||
if (!IS_INTRESOURCE(ofnA->lpTemplateName))
|
||||
{
|
||||
RtlCreateUnicodeStringFromAsciiz (&usBuffer,ofnA->lpTemplateName);
|
||||
ofnW->lpTemplateName = usBuffer.Buffer;
|
||||
@ -801,7 +801,7 @@ void FD31_FreeOfnW(OPENFILENAMEW *ofnW)
|
||||
HeapFree(GetProcessHeap(), 0, ofnW->lpstrFileTitle);
|
||||
HeapFree(GetProcessHeap(), 0, (LPWSTR) ofnW->lpstrInitialDir);
|
||||
HeapFree(GetProcessHeap(), 0, (LPWSTR) ofnW->lpstrTitle);
|
||||
if (HIWORD(ofnW->lpTemplateName))
|
||||
if (!IS_INTRESOURCE(ofnW->lpTemplateName))
|
||||
HeapFree(GetProcessHeap(), 0, (LPWSTR) ofnW->lpTemplateName);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user