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

This commit is contained in:
Michael Stefaniuc 2010-01-27 12:07:28 +01:00 committed by Alexandre Julliard
parent 6b912966a9
commit 5b389bacc5
2 changed files with 3 additions and 3 deletions

View File

@ -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 );

View File

@ -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);
}