Fisheye: Tag d0d46e0ace97519c52eefcd66e1cab5b586dcac1 refers to a dead (removed) revision in file `src/libictranslate/HelpLngDialog.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag d0d46e0ace97519c52eefcd66e1cab5b586dcac1 refers to a dead (removed) revision in file `src/libictranslate/HelpLngDialog.h'. Fisheye: No comparison available. Pass `N' to diff? Index: src/libictranslate/LanguageDialog.cpp =================================================================== diff -u -rbee51aca3d5d9b67ecac4f528a3203738cc63455 -rd0d46e0ace97519c52eefcd66e1cab5b586dcac1 --- src/libictranslate/LanguageDialog.cpp (.../LanguageDialog.cpp) (revision bee51aca3d5d9b67ecac4f528a3203738cc63455) +++ src/libictranslate/LanguageDialog.cpp (.../LanguageDialog.cpp) (revision d0d46e0ace97519c52eefcd66e1cab5b586dcac1) @@ -247,6 +247,13 @@ ///////////////////////////////////////////////////////////////////////////// // CLanguageDialog dialog +BEGIN_MESSAGE_MAP(CLanguageDialog, CDialog) + ON_WM_HELPINFO() + ON_WM_CONTEXTMENU() + ON_BN_CLICKED(IDHELP, OnHelpButton) +END_MESSAGE_MAP() + + CResourceManager *CLanguageDialog::m_prm=NULL; /////////////////////////////////////////////////////////////// @@ -269,7 +276,8 @@ m_bLockInstance=false; m_iBaseX=m_iBaseY=0; _ASSERT(m_prm); // make sure the CLanguageDialog::SetResManager() has been called aready - m_prm->m_lhDialogs.push_back(this); + if(m_prm) + m_prm->m_lhDialogs.push_back(this); } /////////////////////////////////////////////////////////////// @@ -295,7 +303,8 @@ m_bLockInstance=false; m_iBaseX=m_iBaseY=0; _ASSERT(m_prm); // make sure the CLanguageDialog::SetResManager() has been called aready - m_prm->m_lhDialogs.push_back(this); + if(m_prm) + m_prm->m_lhDialogs.push_back(this); } /////////////////////////////////////////////////////////////// @@ -318,7 +327,8 @@ m_bLockInstance=false; m_iBaseX=m_iBaseY=0; _ASSERT(m_prm); // make sure the CLanguageDialog::SetResManager() has been called aready - m_prm->m_lhDialogs.push_back(this); + if(m_prm) + m_prm->m_lhDialogs.push_back(this); } /////////////////////////////////////////////////////////////// @@ -677,4 +687,34 @@ ::ReleaseDC(NULL, hDC); } +BOOL CLanguageDialog::OnHelpInfo(HELPINFO* pHelpInfo) +{ + if (pHelpInfo->iContextType == HELPINFO_WINDOW) + { + pHelpInfo->dwContextId=(m_uiResID << 16) | pHelpInfo->iCtrlId; + AfxGetApp()->HtmlHelp((DWORD_PTR)pHelpInfo, HH_DISPLAY_TEXT_POPUP); + return true; + } + else + return false; +} + +void CLanguageDialog::OnContextMenu(CWnd* pWnd, CPoint point) +{ + HELPINFO hi; + hi.cbSize=sizeof(HELPINFO); + hi.iCtrlId=pWnd->GetDlgCtrlID(); + hi.dwContextId=(m_uiResID << 16) | hi.iCtrlId; + hi.hItemHandle=pWnd->m_hWnd; + hi.iContextType=HELPINFO_WINDOW; + hi.MousePos=point; + + AfxGetApp()->HtmlHelp((DWORD_PTR)&hi, HH_DISPLAY_TEXT_POPUP); +} + +void CLanguageDialog::OnHelpButton() +{ + AfxGetApp()->HtmlHelp(m_uiResID+0x20000, HH_HELP_CONTEXT); +} + END_ICTRANSLATE_NAMESPACE Index: src/libictranslate/LanguageDialog.h =================================================================== diff -u -rbee51aca3d5d9b67ecac4f528a3203738cc63455 -rd0d46e0ace97519c52eefcd66e1cab5b586dcac1 --- src/libictranslate/LanguageDialog.h (.../LanguageDialog.h) (revision bee51aca3d5d9b67ecac4f528a3203738cc63455) +++ src/libictranslate/LanguageDialog.h (.../LanguageDialog.h) (revision d0d46e0ace97519c52eefcd66e1cab5b586dcac1) @@ -170,6 +170,10 @@ void MapRect(RECT* pRect); CFont* GetFont() { return m_pFont ? m_pFont : ((CDialog*)this)->GetFont(); }; + BOOL OnHelpInfo(HELPINFO* pHelpInfo); + void OnContextMenu(CWnd* pWnd, CPoint point); + void OnHelpButton(); + protected: void UpdateLanguage(WORD wOldLang, WORD wNewLang); virtual UINT GetLanguageUpdateOptions() { return 0; }; @@ -183,6 +187,7 @@ virtual void PostNcDestroy(); virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); + DECLARE_MESSAGE_MAP() private: void CalcBaseUnits(PCTSTR pszFacename, WORD wPointSize); Index: src/libictranslate/ResourceManager.cpp =================================================================== diff -u -rbee51aca3d5d9b67ecac4f528a3203738cc63455 -rd0d46e0ace97519c52eefcd66e1cab5b586dcac1 --- src/libictranslate/ResourceManager.cpp (.../ResourceManager.cpp) (revision bee51aca3d5d9b67ecac4f528a3203738cc63455) +++ src/libictranslate/ResourceManager.cpp (.../ResourceManager.cpp) (revision d0d46e0ace97519c52eefcd66e1cab5b586dcac1) @@ -21,7 +21,6 @@ #include "ResourceManager.h" #include "../libicpf/cfg.h" #include -#include "messages.h" #ifdef _DEBUG #define new DEBUG_NEW @@ -396,6 +395,23 @@ _tcscpy(*ppszDst, pszLast); } +CResourceManager::CResourceManager() : + m_pfnCallback(NULL), + m_hRes(NULL) +{ + InitializeCriticalSection(&m_cs); +} + +CResourceManager::~CResourceManager() +{ + DeleteCriticalSection(&m_cs); +} + +void CResourceManager::Init(HMODULE hrc) +{ + m_hRes=hrc; +} + // requires the param with ending '\\' void CResourceManager::Scan(LPCTSTR pszFolder, vector* pvData) { @@ -450,7 +466,7 @@ // send the notification stuff to the others if (m_pfnCallback) - (*m_pfnCallback)(ROT_EVERYWHERE, WM_RMNOTIFY, RMNT_LANGCHANGE, (LPARAM)(wOldLang << 16 | wNewLang)); + (*m_pfnCallback)(RMNT_LANGCHANGE, (wOldLang << 16 | wNewLang)); return bRet; } Index: src/libictranslate/ResourceManager.h =================================================================== diff -u -rbee51aca3d5d9b67ecac4f528a3203738cc63455 -rd0d46e0ace97519c52eefcd66e1cab5b586dcac1 --- src/libictranslate/ResourceManager.h (.../ResourceManager.h) (revision bee51aca3d5d9b67ecac4f528a3203738cc63455) +++ src/libictranslate/ResourceManager.h (.../ResourceManager.h) (revision d0d46e0ace97519c52eefcd66e1cab5b586dcac1) @@ -32,10 +32,12 @@ ///////////////////////////////////////////////////////////////////////// // types of notifications +#define WM_RMNOTIFY (WM_USER + 2) + // RMNT_LANGCHANGE, LPARAM - HIWORD - old language, LOWORD - new language #define RMNT_LANGCHANGE 0x0001 -typedef void(*PFNNOTIFYCALLBACK)(ull_t, uint_t, WPARAM, LPARAM); +typedef void(*PFNNOTIFYCALLBACK)(uint_t, uint_t); /////////////////////////////////////////////////////////// // language description structure @@ -123,10 +125,10 @@ class LIBICTRANSLATE_API CResourceManager { public: - CResourceManager() { m_pfnCallback=NULL; m_hRes=NULL; InitializeCriticalSection(&m_cs); }; - ~CResourceManager() { DeleteCriticalSection(&m_cs); }; + CResourceManager(); + ~CResourceManager(); - void Init(HMODULE hrc) { m_hRes=hrc; }; + void Init(HMODULE hrc); void SetCallback(PFNNOTIFYCALLBACK pfn) { m_pfnCallback=pfn; }; @@ -154,6 +156,7 @@ CLangData m_ld; // current language data list m_lhDialogs; // currently displayed dialog boxes (even hidden) + uint_t m_uiNotificationMsgID; // window message to send to windows HMODULE m_hRes; PFNNOTIFYCALLBACK m_pfnCallback; // UINT m_uiMsg; Index: src/libictranslate/libictranslate.vc90.vcproj =================================================================== diff -u -rbee51aca3d5d9b67ecac4f528a3203738cc63455 -rd0d46e0ace97519c52eefcd66e1cab5b586dcac1 --- src/libictranslate/libictranslate.vc90.vcproj (.../libictranslate.vc90.vcproj) (revision bee51aca3d5d9b67ecac4f528a3203738cc63455) +++ src/libictranslate/libictranslate.vc90.vcproj (.../libictranslate.vc90.vcproj) (revision d0d46e0ace97519c52eefcd66e1cab5b586dcac1) @@ -74,7 +74,6 @@ OutputFile="$(OutDir)\libictranslate32ud.dll" LinkIncremental="2" AdditionalLibraryDirectories=""$(OutDir)"" - ModuleDefinitionFile=".\libictranslate.def" GenerateDebugInformation="true" SubSystem="2" TargetMachine="1" @@ -157,7 +156,6 @@ OutputFile="$(OutDir)\libictranslate64ud.dll" LinkIncremental="2" AdditionalLibraryDirectories=""$(OutDir)"" - ModuleDefinitionFile=".\libictranslate.def" GenerateDebugInformation="true" SubSystem="2" TargetMachine="17" @@ -239,7 +237,6 @@ OutputFile="$(OutDir)\libictranslate32u.dll" LinkIncremental="1" AdditionalLibraryDirectories=""$(OutDir)"" - ModuleDefinitionFile=".\libictranslate.def" GenerateDebugInformation="true" SubSystem="2" OptimizeReferences="2" @@ -324,7 +321,6 @@ OutputFile="$(OutDir)\libictranslate64u.dll" LinkIncremental="1" AdditionalLibraryDirectories=""$(OutDir)"" - ModuleDefinitionFile=".\libictranslate.def" GenerateDebugInformation="true" SubSystem="2" OptimizeReferences="2" @@ -403,10 +399,6 @@ - - @@ -465,10 +457,6 @@ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" > - - @@ -477,10 +465,6 @@ > - - Fisheye: Tag d0d46e0ace97519c52eefcd66e1cab5b586dcac1 refers to a dead (removed) revision in file `src/libictranslate/messages.h'. Fisheye: No comparison available. Pass `N' to diff?