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->lCustData = lpChCol->lCustData;
|
||||||
lpcc->lpfnHook = lpChCol->lpfnHook;
|
lpcc->lpfnHook = lpChCol->lpfnHook;
|
||||||
if ((lpcc->Flags & CC_ENABLETEMPLATE) && (lpChCol->lpTemplateName)) {
|
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);
|
INT len = MultiByteToWideChar( CP_ACP, 0, lpChCol->lpTemplateName, -1, NULL, 0);
|
||||||
template_name = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
|
template_name = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
|
||||||
MultiByteToWideChar( CP_ACP, 0, lpChCol->lpTemplateName, -1, template_name, len );
|
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);
|
ofnW->lpstrDefExt = FD31_DupToW(ofnA->lpstrDefExt, 3);
|
||||||
if ((ofnA->Flags & OFN_ENABLETEMPLATE) && (ofnA->lpTemplateName))
|
if ((ofnA->Flags & OFN_ENABLETEMPLATE) && (ofnA->lpTemplateName))
|
||||||
{
|
{
|
||||||
if (HIWORD(ofnA->lpTemplateName))
|
if (!IS_INTRESOURCE(ofnA->lpTemplateName))
|
||||||
{
|
{
|
||||||
RtlCreateUnicodeStringFromAsciiz (&usBuffer,ofnA->lpTemplateName);
|
RtlCreateUnicodeStringFromAsciiz (&usBuffer,ofnA->lpTemplateName);
|
||||||
ofnW->lpTemplateName = usBuffer.Buffer;
|
ofnW->lpTemplateName = usBuffer.Buffer;
|
||||||
|
@ -801,7 +801,7 @@ void FD31_FreeOfnW(OPENFILENAMEW *ofnW)
|
||||||
HeapFree(GetProcessHeap(), 0, ofnW->lpstrFileTitle);
|
HeapFree(GetProcessHeap(), 0, ofnW->lpstrFileTitle);
|
||||||
HeapFree(GetProcessHeap(), 0, (LPWSTR) ofnW->lpstrInitialDir);
|
HeapFree(GetProcessHeap(), 0, (LPWSTR) ofnW->lpstrInitialDir);
|
||||||
HeapFree(GetProcessHeap(), 0, (LPWSTR) ofnW->lpstrTitle);
|
HeapFree(GetProcessHeap(), 0, (LPWSTR) ofnW->lpstrTitle);
|
||||||
if (HIWORD(ofnW->lpTemplateName))
|
if (!IS_INTRESOURCE(ofnW->lpTemplateName))
|
||||||
HeapFree(GetProcessHeap(), 0, (LPWSTR) ofnW->lpTemplateName);
|
HeapFree(GetProcessHeap(), 0, (LPWSTR) ofnW->lpTemplateName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue