Commit 5b389bac authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

comdlg32: Use IS_INTRESOURCE instead of HIWORD to check a resource.

parent 6b912966
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment