From 2a71c1d299c4a2cf8522537ecf6d9a1f0c043f2b Mon Sep 17 00:00:00 2001 From: Danny Smith Date: Wed, 1 May 2002 01:10:51 +0000 Subject: * include/commctrl.h (SNDMSG): Define and use throughout in other macros instead of SendMessage. * include/commdlg.h (SNDMSG): Ditto. --- winsup/w32api/include/commdlg.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'winsup/w32api/include/commdlg.h') diff --git a/winsup/w32api/include/commdlg.h b/winsup/w32api/include/commdlg.h index a3e723080..85c609392 100644 --- a/winsup/w32api/include/commdlg.h +++ b/winsup/w32api/include/commdlg.h @@ -186,8 +186,12 @@ extern "C" { #define DN_DEFAULTPRN 1 #ifndef SNDMSG +#ifdef __cplusplus +#define SNDMSG ::SendMessage +#else #define SNDMSG SendMessage #endif +#endif /* ifndef SNDMSG */ #define CommDlg_OpenSave_GetSpec(d,s,m) (int)SNDMSG(d,CDM_GETSPEC,m,(LPARAM)s) #define CommDlg_OpenSave_GetSpecA CommDlg_OpenSave_GetSpec @@ -195,13 +199,13 @@ extern "C" { #define CommDlg_OpenSave_GetFilePath(d,s,m) (int)SNDMSG(d,CDM_GETFILEPATH,m,(LPARAM)s) #define CommDlg_OpenSave_GetFilePathA CommDlg_OpenSave_GetFilePath #define CommDlg_OpenSave_GetFilePathW CommDlg_OpenSave_GetFilePath -#define CommDlg_OpenSave_GetFolderPath(d,s,m) (int)SendMessage(d,CDM_GETFOLDERPATH,m,(LPARAM)(LPSTR)s) +#define CommDlg_OpenSave_GetFolderPath(d,s,m) (int)SNDMSG(d,CDM_GETFOLDERPATH,m,(LPARAM)(LPSTR)s) #define CommDlg_OpenSave_GetFolderPathA CommDlg_OpenSave_GetFolderPath #define CommDlg_OpenSave_GetFolderPathW CommDlg_OpenSave_GetFolderPath -#define CommDlg_OpenSave_GetFolderIDList(d,i,m) (int)SendMessage(d,CDM_GETFOLDERIDLIST,m,(LPARAM)i) -#define CommDlg_OpenSave_SetControlText(d,i,t) (void)SendMessage(d,CDM_SETCONTROLTEXT,i,(LPARAM)t) -#define CommDlg_OpenSave_HideControl(d,i) (void)SendMessage(d,CDM_HIDECONTROL,i,0) -#define CommDlg_OpenSave_SetDefExt(d,e) (void)SendMessage(d,CDM_SETDEFEXT,0,(LPARAM)e) +#define CommDlg_OpenSave_GetFolderIDList(d,i,m) (int)SNDMSG(d,CDM_GETFOLDERIDLIST,m,(LPARAM)i) +#define CommDlg_OpenSave_SetControlText(d,i,t) (void)SNDMSG(d,CDM_SETCONTROLTEXT,i,(LPARAM)t) +#define CommDlg_OpenSave_HideControl(d,i) (void)SNDMSG(d,CDM_HIDECONTROL,i,0) +#define CommDlg_OpenSave_SetDefExt(d,e) (void)SNDMSG(d,CDM_SETDEFEXT,0,(LPARAM)e) typedef UINT (APIENTRY *__CDHOOKPROC)(HWND,UINT,WPARAM,LPARAM); typedef __CDHOOKPROC LPCCHOOKPROC; -- cgit v1.2.3