From 1d48e6ce7866d0f19c72fd2882f88b97e10ac6dc Mon Sep 17 00:00:00 2001 From: oro06 Date: Sat, 14 Jan 2006 16:11:48 +0000 Subject: [PATCH] +wince : dialogbox git-svn-id: trunk@2289 - --- rtl/wince/wininc/commctrl.inc | 2 +- rtl/wince/wininc/defines.inc | 4 ++-- rtl/wince/wininc/unidef.inc | 21 +++++++++++++++------ 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/rtl/wince/wininc/commctrl.inc b/rtl/wince/wininc/commctrl.inc index cbaec0dd35..c99d4e3b35 100644 --- a/rtl/wince/wininc/commctrl.inc +++ b/rtl/wince/wininc/commctrl.inc @@ -150,7 +150,7 @@ const TBSTYLE_LIST = $1000; TBSTYLE_CUSTOMERASE = $2000; TBSTYLE_TRANSPARENT = $8000; - I_IMAGENONE = -2; // Desktop listview uses this same value for I_IMAGENONE when (_WIN32_IE >= 0x0501) + I_IMAGENONE = -2; // Desktop listview uses this same value for I_IMAGENONE when (_WIN32_IE >= 0x0501) //***************************************************************************** // types diff --git a/rtl/wince/wininc/defines.inc b/rtl/wince/wininc/defines.inc index 136857f7ef..188ad7ce68 100644 --- a/rtl/wince/wininc/defines.inc +++ b/rtl/wince/wininc/defines.inc @@ -724,8 +724,8 @@ WS_MINIMIZEBOX = $20000; WS_OVERLAPPED = 0; WS_OVERLAPPEDWINDOW = $cf0000; - WS_POPUP = LONG($80000000); - WS_POPUPWINDOW = LONG($80880000); + WS_POPUP = $80000000; + WS_POPUPWINDOW = $80880000; WS_SIZEBOX = $40000; WS_SYSMENU = $80000; WS_TABSTOP = $10000; diff --git a/rtl/wince/wininc/unidef.inc b/rtl/wince/wininc/unidef.inc index 9298b9a904..638b950838 100644 --- a/rtl/wince/wininc/unidef.inc +++ b/rtl/wince/wininc/unidef.inc @@ -90,6 +90,7 @@ function CreateWindowEx(dwExStyle:DWORD; lpClassName:LPCWSTR; lpWindowName:LPCWS function DeleteFile(lpFileName:LPCWSTR):WINBOOL; external KernelDLL name 'DeleteFileW'; function DefDlgProc(hDlg:HWND; Msg:UINT; wParam:WPARAM; lParam:LPARAM):LRESULT; external UserDLLCore name 'DefDlgProcW'; function DefWindowProc(hWnd:HWND; Msg:UINT; wParam:WPARAM; lParam:LPARAM):LRESULT; external UserDLLCore name 'DefWindowProcW'; +function DialogBox(hInstance:HINST; lpTemplate:LPCWSTR; hWndParent:HWND; lpDialogFunc:DLGPROC):Integer; function DialogBoxIndirect(hInstance:HINST; lpTemplate:LPCDLGTEMPLATEW; hWndParent:HWND; lpDialogFunc:DLGPROC):Integer; function DialogBoxIndirectParam(hInstance:HINST; hDialogTemplate:LPCDLGTEMPLATEW; hWndParent:HWND; lpDialogFunc:DLGPROC; dwInitParam:LPARAM):Integer; external UserDLLCore name 'DialogBoxIndirectParamW'; function DispatchMessage(lpMsg:LPMSG):LONG; external UserDLLCore name 'DispatchMessageW'; @@ -228,6 +229,7 @@ function wvsprintf(_para1:LPWSTR; _para2:LPCWSTR; arglist:va_list):Integer; exte //'ChooseColorW' not exported but 'ChooseColor' yes function ChooseColor(_para1:LPCHOOSECOLOR):WINBOOL; external ComdlgDLL name 'ChooseColor'; +function DialogBoxParam(hInstance:HINST; lpTemplateName:LPCWSTR; hWndParent:HWND; lpDialogFunc:DLGPROC; dwInitParam:LPARAM):Integer; //'EnumDisplaySettingsW' not exported but 'EnumDisplaySettings' with widechar header is function EnumDisplaySettings(lpszDeviceName:LPCWSTR; iModeNum:DWORD; lpDevMode:LPDEVMODEW):WINBOOL; external UserDLLCore name 'EnumDisplaySettings'; //'EnumPropsExW' not exported but 'EnumPropsEx' with widechar header is @@ -309,7 +311,6 @@ function DdeQueryString(_para1:DWORD; _para2:HSZ; _para3:LPCWSTR; _para4:DWORD; function DefineDosDevice(dwFlags:DWORD; lpDeviceName:LPCWSTR; lpTargetPath:LPCWSTR):WINBOOL; external 'kernel32' name 'DefineDosDeviceW'; function DefFrameProc(hWnd:HWND; hWndMDIClient:HWND; uMsg:UINT; wParam:WPARAM; lParam:LPARAM):LRESULT; external 'user32' name 'DefFrameProcW'; function DefMDIChildProc(hWnd:HWND; uMsg:UINT; wParam:WPARAM; lParam:LPARAM):LRESULT; external 'user32' name 'DefMDIChildProcW'; -function DialogBox(hInstance:HINST; lpTemplate:LPCWSTR; hWndParent:HWND; lpDialogFunc:DLGPROC):Integer; function DialogBoxParam(hInstance:HINST; lpTemplateName:LPCWSTR; hWndParent:HWND; lpDialogFunc:DLGPROC; dwInitParam:LPARAM):Integer; external 'user32' name 'DialogBoxParamW'; function DlgDirList(hDlg:HWND; lpPathSpec:LPWSTR; nIDListBox:Integer; nIDStaticPath:Integer; uFileType:UINT):Integer; external 'user32' name 'DlgDirListW'; function DlgDirSelectEx(hDlg:HWND; lpString:LPWSTR; nCount:Integer; nIDListBox:Integer):WINBOOL; external 'user32' name 'DlgDirSelectExW'; @@ -556,6 +557,11 @@ begin CreateDialogIndirect:=CreateDialogIndirectParam(hInstance,lpTemplate,hWndParent,lpDialogFunc,0); end; +function DialogBox(hInstance:HINST; lpTemplate:LPCWSTR; hWndParent:HWND; lpDialogFunc:DLGPROC):Integer; +begin + DialogBox:=DialogBoxParam(hInstance,lpTemplate,hWndParent,lpDialogFunc,0); +end; + function DialogBoxIndirect(hInstance:HINST; lpTemplate:LPCDLGTEMPLATEW; hWndParent:HWND; lpDialogFunc:DLGPROC):Integer; begin DialogBoxIndirect:=DialogBoxIndirectParam(hInstance,lpTemplate,hWndParent,lpDialogFunc,0); @@ -565,6 +571,14 @@ end; {$ifdef WINCE} //begin wince only +function DialogBoxParam(hInstance:HINST; lpTemplateName:LPCWSTR; hWndParent:HWND; lpDialogFunc:DLGPROC; dwInitParam:LPARAM):Integer; +begin + DialogBoxParam:=DialogBoxIndirectParam( hInstance, + LPCDLGTEMPLATEW(LoadResource(hInstance, FindResource(hInstance, lpTemplateName, RT_DIALOG))), + hWndParent, + lpDialogFunc, + dwInitParam); +end; //end wince only {$endif WINCE} @@ -577,11 +591,6 @@ begin CreateDialog:=CreateDialogParam(hInstance,lpName,hWndParent,lpDialogFunc,0); end; -function DialogBox(hInstance:HINST; lpTemplate:LPCWSTR; hWndParent:HWND; lpDialogFunc:DLGPROC):Integer; -begin - DialogBox:=DialogBoxParam(hInstance,lpTemplate,hWndParent,lpDialogFunc,0); -end; - //end win32 only