Print Page | Close Window

CXTTrayIcon

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=1319
Printed Date: 06 November 2025 at 11:22pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTTrayIcon
Posted By: manoj
Subject: CXTTrayIcon
Date Posted: 26 October 2004 at 7:55am

I want to Maximize my application from system tray by another instance of application.

in main dialog class

//////////////////////////////////////////////////////////// //////////////
//System Tray

CXTTrayIcon m_TrayIcon;


m_TrayIcon.Create( LoadString(IDS_APP_NAME),
this ,IDR_MAINFRAME,IDR_MENU_SYSTEMTRAY,ID_SYSTEMTRAY_SHOWMAINWIN DOW);
m_TrayIcon.HideIcon();

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




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net