MyApp.h:
class CMyApp : public CWinApp
{
private:
friend class CHotKeyManager& GetHotKeyManager();
static CHotKeyManager m_hotkeyManager;
...
};
MyApp.cpp:
CHotKeyManager CMyApp::m_hotkeyManager;
CHotKeyManager& GetHotKeyManager()
{
return CMyApp::m_hotkeyManager;
}
GetHotKeyManager not recognized by Visual Assist!
GetHotKeyManager().DoSomeStuff();