![]() |
CXTTrayIcon |
Post Reply
|
| Author | |
manoj
Newbie
Joined: 26 October 2004 Location: India Status: Offline Points: 31 |
Post Options
Thanks(0)
Quote Reply
Topic: CXTTrayIconPosted: 26 October 2004 at 6:15am |
|
I am using CXTTrayIcon in my dialog based application. My version XTToolkit is 9 I want to Maximize my application by another instace of application. simply i dont want to multiple instance of application if first one is system tray then application should maximized. pls reply ASAP Manoj |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 October 2004 at 6:52am |
|
Something like: BOOL CYourApp::OneInstance(CCommandLineInfo& cmdInfo) if (GetLastError() == ERROR_ALREADY_EXISTS && CMainFrame::m_bOneInstance) HWND hWndPrevious = ::FindWindow("You_Dialog_Class", NULL); return TRUE; } in BOOL CYourApp::InitInstance():
CCommandLineInfo cmdInfo; if (!OneInstance(cmdInfo))
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
manoj
Newbie
Joined: 26 October 2004 Location: India Status: Offline Points: 31 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 October 2004 at 7:40am |
|
Above code is not working I am doing this in main dialog class //////////////////////////////////////////////////////////// ////////////// CXTTrayIcon m_TrayIcon;
In initInstanece Function { CString strClassName; strClassName.LoadString(IDS_APP_TITLE); HWND hWndPrevious = ::FindWindow("#32770", strClassName); if (hWndPrevious){ if (::IsIconic(hWndPrevious))::ShowWindow(hWndPrevious,SW_RESTORE ); ::SetForegroundWindow(::GetLastActivePopup (hWndPrevious)); } } return FALSE;this problem occur if i am using CXTTrayIcon If I use SDK then above function is working perfectly Please reply ASAP |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 October 2004 at 11:36pm |
|
What doesn't work? Set break after if (hWndPrevious) hWndPrevious != NULL ? |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 27 October 2004 at 2:08pm |
|
you need to override CreateMinimizeWnd. see sample. |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |