Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
e3d681ba
Commit
e3d681ba
authored
Apr 29, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of the COMMDLG_hInstance variables.
parent
e743e091
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
29 additions
and
63 deletions
+29
-63
cdlg.h
dlls/commdlg/cdlg.h
+0
-6
colordlg.c
dlls/commdlg/colordlg.c
+5
-5
filedlg.c
dlls/commdlg/filedlg.c
+4
-4
filedlg95.c
dlls/commdlg/filedlg95.c
+7
-7
finddlg.c
dlls/commdlg/finddlg.c
+2
-2
fontdlg.c
dlls/commdlg/fontdlg.c
+8
-8
generic.c
dlls/commdlg/generic.c
+0
-28
printdlg.c
dlls/commdlg/printdlg.c
+3
-3
No files found.
dlls/commdlg/cdlg.h
View file @
e3d681ba
...
...
@@ -26,12 +26,6 @@
#include "wine/windef16.h"
#include "wownt32.h"
/*---------------- 16-bit ----------------*/
extern
HINSTANCE16
COMMDLG_hInstance
;
extern
HINSTANCE
COMMDLG_hInstance32
;
/*---------------- 32-bit ----------------*/
/* Common dialogs implementation globals */
#define COMDLG32_Atom ((ATOM)0xa000)
/* MS uses this one to identify props */
...
...
dlls/commdlg/colordlg.c
View file @
e3d681ba
...
...
@@ -1407,12 +1407,12 @@ BOOL16 WINAPI ChooseColor16( LPCHOOSECOLOR16 lpChCol )
HGLOBAL
hDlgTmpl32
;
LPCVOID
template32
;
DWORD
size
;
if
(
!
(
hResInfo
=
FindResourceA
(
COM
MDLG_hInstance32
,
"CHOOSE_COLOR"
,
RT_DIALOGA
)))
if
(
!
(
hResInfo
=
FindResourceA
(
COM
DLG32_hInstance
,
"CHOOSE_COLOR"
,
RT_DIALOGA
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_FINDRESFAILURE
);
return
FALSE
;
}
if
(
!
(
hDlgTmpl32
=
LoadResource
(
COM
MDLG_hInstance32
,
hResInfo
))
||
if
(
!
(
hDlgTmpl32
=
LoadResource
(
COM
DLG32_hInstance
,
hResInfo
))
||
!
(
template32
=
LockResource
(
hDlgTmpl32
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_LOADRESFAILURE
);
...
...
@@ -1492,12 +1492,12 @@ BOOL WINAPI ChooseColorW( LPCHOOSECOLORW lpChCol )
{
HRSRC
hResInfo
;
HGLOBAL
hDlgTmpl
;
if
(
!
(
hResInfo
=
FindResourceA
(
COM
MDLG_hInstance32
,
"CHOOSE_COLOR"
,
RT_DIALOGA
)))
if
(
!
(
hResInfo
=
FindResourceA
(
COM
DLG32_hInstance
,
"CHOOSE_COLOR"
,
RT_DIALOGA
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_FINDRESFAILURE
);
return
FALSE
;
}
if
(
!
(
hDlgTmpl
=
LoadResource
(
COM
MDLG_hInstance32
,
hResInfo
))
||
if
(
!
(
hDlgTmpl
=
LoadResource
(
COM
DLG32_hInstance
,
hResInfo
))
||
!
(
template
=
LockResource
(
hDlgTmpl
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_LOADRESFAILURE
);
...
...
@@ -1505,7 +1505,7 @@ BOOL WINAPI ChooseColorW( LPCHOOSECOLORW lpChCol )
}
}
bRet
=
DialogBoxIndirectParamW
(
COM
MDLG_hInstance32
,
template
,
lpChCol
->
hwndOwner
,
bRet
=
DialogBoxIndirectParamW
(
COM
DLG32_hInstance
,
template
,
lpChCol
->
hwndOwner
,
ColorDlgProc
,
(
DWORD
)
lpChCol
);
return
bRet
;
}
...
...
dlls/commdlg/filedlg.c
View file @
e3d681ba
...
...
@@ -174,13 +174,13 @@ BOOL Get32BitsTemplate(LFSPRIVATE lfs)
}
}
else
{
/* get it from internal Wine resource */
HRSRC
hResInfo
;
if
(
!
(
hResInfo
=
FindResourceA
(
COM
MDLG_hInstance32
,
if
(
!
(
hResInfo
=
FindResourceA
(
COM
DLG32_hInstance
,
lfs
->
open
?
"OPEN_FILE"
:
"SAVE_FILE"
,
RT_DIALOGA
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_FINDRESFAILURE
);
return
FALSE
;
}
if
(
!
(
hDlgTmpl
=
LoadResource
(
COM
MDLG_hInstance32
,
hResInfo
))
||
if
(
!
(
hDlgTmpl
=
LoadResource
(
COM
DLG32_hInstance
,
hResInfo
))
||
!
(
lfs
->
template
=
LockResource
(
hDlgTmpl
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_LOADRESFAILURE
);
...
...
@@ -230,13 +230,13 @@ BOOL Get16BitsTemplate(LFSPRIVATE lfs)
LPCVOID
template32
;
DWORD
size
;
if
(
!
(
hResInfo
=
FindResourceA
(
COM
MDLG_hInstance32
,
if
(
!
(
hResInfo
=
FindResourceA
(
COM
DLG32_hInstance
,
lfs
->
open
?
"OPEN_FILE"
:
"SAVE_FILE"
,
RT_DIALOGA
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_FINDRESFAILURE
);
return
FALSE
;
}
if
(
!
(
hDlgTmpl32
=
LoadResource
(
COM
MDLG_hInstance32
,
hResInfo
))
||
if
(
!
(
hDlgTmpl32
=
LoadResource
(
COM
DLG32_hInstance
,
hResInfo
))
||
!
(
template32
=
LockResource
(
hDlgTmpl32
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_LOADRESFAILURE
);
...
...
dlls/commdlg/filedlg95.c
View file @
e3d681ba
...
...
@@ -248,12 +248,12 @@ BOOL WINAPI GetFileName95(FileOpenDlgInfos *fodInfos)
/* Create the dialog from a template */
if
(
!
(
hRes
=
FindResourceA
(
COM
MDLG_hInstance32
,
MAKEINTRESOURCEA
(
NEWFILEOPENORD
),
RT_DIALOGA
)))
if
(
!
(
hRes
=
FindResourceA
(
COM
DLG32_hInstance
,
MAKEINTRESOURCEA
(
NEWFILEOPENORD
),
RT_DIALOGA
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_FINDRESFAILURE
);
return
FALSE
;
}
if
(
!
(
hDlgTmpl
=
LoadResource
(
COM
MDLG_hInstance32
,
hRes
))
||
if
(
!
(
hDlgTmpl
=
LoadResource
(
COM
DLG32_hInstance
,
hRes
))
||
!
(
template
=
LockResource
(
hDlgTmpl
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_LOADRESFAILURE
);
...
...
@@ -269,7 +269,7 @@ BOOL WINAPI GetFileName95(FileOpenDlgInfos *fodInfos)
fodInfos
->
HookMsg
.
sharevistring
=
RegisterWindowMessageA
(
SHAREVISTRINGA
);
}
lRes
=
DialogBoxIndirectParamA
(
COM
MDLG_hInstance32
,
lRes
=
DialogBoxIndirectParamA
(
COM
DLG32_hInstance
,
(
LPDLGTEMPLATEA
)
template
,
fodInfos
->
ofnInfos
->
hwndOwner
,
FileOpenDlgProc95
,
...
...
@@ -990,7 +990,7 @@ INT_PTR CALLBACK FileOpenDlgProc95(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l
default:
stringId
=
0
;
}
lpdi
->
hinst
=
COM
MDLG_hInstance32
;
lpdi
->
hinst
=
COM
DLG32_hInstance
;
lpdi
->
lpszText
=
(
LPSTR
)
stringId
;
}
return
FALSE
;
...
...
@@ -1070,7 +1070,7 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
fodInfos
->
DlgInfos
.
hwndTB
=
CreateWindowExA
(
0
,
TOOLBARCLASSNAMEA
,
NULL
,
WS_CHILD
|
WS_GROUP
|
TBSTYLE_TOOLTIPS
|
CCS_NODIVIDER
|
CCS_NORESIZE
,
0
,
0
,
150
,
26
,
hwnd
,
(
HMENU
)
IDC_TOOLBAR
,
COM
MDLG_hInstance32
,
NULL
);
0
,
0
,
150
,
26
,
hwnd
,
(
HMENU
)
IDC_TOOLBAR
,
COM
DLG32_hInstance
,
NULL
);
SetWindowPos
(
fodInfos
->
DlgInfos
.
hwndTB
,
0
,
rectTB
.
left
,
rectTB
.
top
,
rectTB
.
right
-
rectTB
.
left
,
rectTB
.
bottom
-
rectTB
.
top
,
...
...
@@ -1521,8 +1521,8 @@ BOOL FILEDLG95_OnOpenMultipleFiles(HWND hwnd, LPWSTR lpstrFileList, UINT nFileCo
WCHAR
tmp
[
400
];
WCHAR
nl
[]
=
{
'\n'
,
0
};
LoadStringW
(
COM
MDLG_hInstance32
,
IDS_FILENOTFOUND
,
lpstrNotFound
,
100
);
LoadStringW
(
COM
MDLG_hInstance32
,
IDS_VERIFYFILE
,
lpstrMsg
,
100
);
LoadStringW
(
COM
DLG32_hInstance
,
IDS_FILENOTFOUND
,
lpstrNotFound
,
100
);
LoadStringW
(
COM
DLG32_hInstance
,
IDS_VERIFYFILE
,
lpstrMsg
,
100
);
strcpyW
(
tmp
,
lpstrTemp
);
strcatW
(
tmp
,
nl
);
...
...
dlls/commdlg/finddlg.c
View file @
e3d681ba
...
...
@@ -102,7 +102,7 @@ BOOL FINDDLG_Get16BitsTemplate(LFRPRIVATE lfr)
DWORD
size
;
HGLOBAL16
hGlobal16
;
if
(
!
(
hResInfo
=
FindResourceA
(
COM
MDLG_hInstance32
,
if
(
!
(
hResInfo
=
FindResourceA
(
COM
DLG32_hInstance
,
lfr
->
find
?
MAKEINTRESOURCEA
(
FINDDLGORD
)
:
MAKEINTRESOURCEA
(
REPLACEDLGORD
),
RT_DIALOGA
)))
...
...
@@ -110,7 +110,7 @@ BOOL FINDDLG_Get16BitsTemplate(LFRPRIVATE lfr)
COMDLG32_SetCommDlgExtendedError
(
CDERR_FINDRESFAILURE
);
return
FALSE
;
}
if
(
!
(
hDlgTmpl32
=
LoadResource
(
COM
MDLG_hInstance32
,
hResInfo
))
||
if
(
!
(
hDlgTmpl32
=
LoadResource
(
COM
DLG32_hInstance
,
hResInfo
))
||
!
(
template32
=
LockResource
(
hDlgTmpl32
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_LOADRESFAILURE
);
...
...
dlls/commdlg/fontdlg.c
View file @
e3d681ba
...
...
@@ -242,12 +242,12 @@ BOOL16 WINAPI ChooseFont16(LPCHOOSEFONT16 lpChFont)
HGLOBAL
hDlgTmpl32
;
LPCVOID
template32
;
DWORD
size
;
if
(
!
(
hResInfo
=
FindResourceA
(
COM
MDLG_hInstance32
,
"CHOOSE_FONT"
,
RT_DIALOGA
)))
if
(
!
(
hResInfo
=
FindResourceA
(
COM
DLG32_hInstance
,
"CHOOSE_FONT"
,
RT_DIALOGA
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_FINDRESFAILURE
);
return
FALSE
;
}
if
(
!
(
hDlgTmpl32
=
LoadResource
(
COM
MDLG_hInstance32
,
hResInfo
))
||
if
(
!
(
hDlgTmpl32
=
LoadResource
(
COM
DLG32_hInstance
,
hResInfo
))
||
!
(
template32
=
LockResource
(
hDlgTmpl32
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_LOADRESFAILURE
);
...
...
@@ -336,7 +336,7 @@ BOOL WINAPI ChooseFontA(LPCHOOSEFONTA lpChFont)
}
}
else
{
hDlginst
=
COM
MDLG_hInstance32
;
hDlginst
=
COM
DLG32_hInstance
;
if
(
!
(
hResInfo
=
FindResourceA
(
hDlginst
,
"CHOOSE_FONT"
,
RT_DIALOGA
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_FINDRESFAILURE
);
...
...
@@ -356,7 +356,7 @@ BOOL WINAPI ChooseFontA(LPCHOOSEFONTA lpChFont)
if
(
lpChFont
->
Flags
&
(
CF_SELECTSCRIPT
|
CF_NOVERTFONTS
))
FIXME
(
": unimplemented flag (ignored)
\n
"
);
return
DialogBoxIndirectParamA
(
COM
MDLG_hInstance32
,
template
,
return
DialogBoxIndirectParamA
(
COM
DLG32_hInstance
,
template
,
lpChFont
->
hwndOwner
,
FormatCharDlgProcA
,
(
LPARAM
)
lpChFont
);
}
...
...
@@ -485,12 +485,12 @@ BOOL WINAPI ChooseFontW(LPCHOOSEFONTW lpChFont)
if (TRACE_ON(commdlg))
_dump_cf_flags(lpChFont->Flags);
if (!(hResInfo = FindResourceA(COM
MDLG_hInstance32
, "CHOOSE_FONT", RT_DIALOGA)))
if (!(hResInfo = FindResourceA(COM
DLG32_hInstance
, "CHOOSE_FONT", RT_DIALOGA)))
{
COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE);
return FALSE;
}
if (!(hDlgTmpl = LoadResource(COM
MDLG_hInstance32
, hResInfo )) ||
if (!(hDlgTmpl = LoadResource(COM
DLG32_hInstance
, hResInfo )) ||
!(template = LockResource( hDlgTmpl )))
{
COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
...
...
@@ -508,7 +508,7 @@ BOOL WINAPI ChooseFontW(LPCHOOSEFONTW lpChFont)
cf32a.lpLogFont=&lf32a;
cf32a.lpszStyle=HEAP_strdupWtoA(GetProcessHeap(), 0, lpChFont->lpszStyle);
lpChFont->lpTemplateName=(LPWSTR)&cf32a;
bRet = DialogBoxIndirectParamW(COM
MDLG_hInstance32
, template,
bRet = DialogBoxIndirectParamW(COM
DLG32_hInstance
, template,
lpChFont->hwndOwner, FormatCharDlgProcW, (LPARAM)lpChFont );
HeapFree(GetProcessHeap(), 0, cf32a.lpszStyle);
lpChFont->lpTemplateName=(LPWSTR)cf32a.lpTemplateName;
...
...
@@ -805,7 +805,7 @@ static LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam,
{
char
name
[
30
];
if
(
LoadStringA
(
COM
MDLG_hInstance32
,
IDS_COLOR_BLACK
+
i
,
name
,
if
(
LoadStringA
(
COM
DLG32_hInstance
,
IDS_COLOR_BLACK
+
i
,
name
,
sizeof
(
name
)
/
sizeof
(
*
name
)
)
==
0
)
{
strcpy
(
name
,
"[color name]"
);
...
...
dlls/commdlg/generic.c
View file @
e3d681ba
...
...
@@ -29,10 +29,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
#include "cdlg.h"
HINSTANCE16
COMMDLG_hInstance
=
0
;
HINSTANCE
COMMDLG_hInstance32
=
0
;
static
int
COMMDLG_Attach
=
0
;
/***********************************************************************
* DllEntryPoint [COMMDLG.32]
*
...
...
@@ -43,30 +39,6 @@ static int COMMDLG_Attach = 0;
BOOL
WINAPI
COMMDLG_DllEntryPoint
(
DWORD
Reason
,
HINSTANCE16
hInst
,
WORD
ds
,
WORD
HeapSize
,
DWORD
res1
,
WORD
res2
)
{
TRACE
(
"(%08lx, %04x, %04x, %04x, %08lx, %04x)
\n
"
,
Reason
,
hInst
,
ds
,
HeapSize
,
res1
,
res2
);
switch
(
Reason
)
{
case
DLL_PROCESS_ATTACH
:
if
(
COMMDLG_Attach
++
)
break
;
COMMDLG_hInstance
=
hInst
;
if
(
!
COMMDLG_hInstance32
)
{
if
(
!
(
COMMDLG_hInstance32
=
LoadLibraryA
(
"comdlg32.dll"
)))
{
ERR
(
"Could not load sibling comdlg32.dll
\n
"
);
return
FALSE
;
}
}
break
;
case
DLL_PROCESS_DETACH
:
if
(
!--
COMMDLG_Attach
)
{
COMMDLG_hInstance
=
0
;
if
(
COMMDLG_hInstance32
)
FreeLibrary
(
COMMDLG_hInstance32
);
}
break
;
}
return
TRUE
;
}
...
...
dlls/commdlg/printdlg.c
View file @
e3d681ba
...
...
@@ -2109,19 +2109,19 @@ static HGLOBAL16 PRINTDLG_Get16TemplateFrom32(char *PrintResourceName)
HGLOBAL16
hGlobal16
;
LPVOID
template
;
if
(
!
(
hResInfo
=
FindResourceA
(
COM
MDLG_hInstance32
,
if
(
!
(
hResInfo
=
FindResourceA
(
COM
DLG32_hInstance
,
PrintResourceName
,
RT_DIALOGA
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_FINDRESFAILURE
);
return
0
;
}
if
(
!
(
hDlgTmpl32
=
LoadResource
(
COM
MDLG_hInstance32
,
hResInfo
))
||
if
(
!
(
hDlgTmpl32
=
LoadResource
(
COM
DLG32_hInstance
,
hResInfo
))
||
!
(
template32
=
LockResource
(
hDlgTmpl32
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_LOADRESFAILURE
);
return
0
;
}
size
=
SizeofResource
(
COM
MDLG_hInstance32
,
hResInfo
);
size
=
SizeofResource
(
COM
DLG32_hInstance
,
hResInfo
);
hGlobal16
=
GlobalAlloc16
(
0
,
size
);
if
(
!
hGlobal16
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment