From: <ag...@us...> - 2011-10-31 03:12:02
|
Revision: 2601 http://zoolib.svn.sourceforge.net/zoolib/?rev=2601&view=rev Author: agreen Date: 2011-10-31 03:11:56 +0000 (Mon, 31 Oct 2011) Log Message: ----------- Use locale-specific dialog templates when they're available. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZWinWND.cpp Modified: trunk/zoolib/source/cxx/zoolib/ZWinWND.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZWinWND.cpp 2011-10-30 23:05:36 UTC (rev 2600) +++ trunk/zoolib/source/cxx/zoolib/ZWinWND.cpp 2011-10-31 03:11:56 UTC (rev 2601) @@ -251,8 +251,23 @@ HWND sCreateDialog(LPCWSTR lpTemplate, HWND hWndParent, ZRef<Callable_Dialog> iCallable) { + HMODULE theHMODULE = ZUtil_Win::sGetModuleHandle(); + + LCID theLCID = ::GetThreadLocale(); + + if (HRSRC theHRSRC = ::FindResourceExW(theHMODULE, (LPCWSTR)RT_DIALOG, lpTemplate, theLCID)) + { + HGLOBAL theHGLOBAL = ::LoadResource(theHMODULE, theHRSRC); + return ::CreateDialogIndirectParam + (theHMODULE, + (LPCDLGTEMPLATE)::LockResource(theHGLOBAL), + hWndParent, + spDialogProcW, + (LPARAM)iCallable.Get()); + } + return ::CreateDialogParamW - (ZUtil_Win::sGetModuleHandle(), + (theHMODULE, lpTemplate, hWndParent, spDialogProcW, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |