CXTTrayIcon does not send commands to propsheet |
Post Reply |
Author | |
evoX
Senior Member Joined: 25 July 2007 Status: Offline Points: 207 |
Post Options
Thanks(0)
Posted: 06 January 2009 at 8:05pm |
I have a CXTPPropertySheet dialog as main application window and I use CXTTrayIcon to minimize as tray icon. The problem is that the menu commands from CXTTrayIcon are not sent to CXTPPropertySheet, only ID_APP_EXIT and SC_RESTORE is working.
Am I doing something wrong or this is a bug in CXTTrayIcon ?
Thanks !
|
|
Product: Xtreme ToolkitPro 19.30
Platform: Windows 10 64bit Language: Visual C++ (VS 2019) |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
When you call m_TrayIcon.Create method do you have your propertySheet created ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
evoX
Senior Member Joined: 25 July 2007 Status: Offline Points: 207 |
Post Options
Thanks(0)
|
I call it in the OnInitDialog of the propertysheet, after the commandbars initialization, and the commandbars toolbar is working.
// Create the tray icon.
if (!m_TrayIcon.Create(
_T( "Application Title"), // Toolktip text this, // Parent windowIDR_MAINFRAME, // Icon resource IDIDR_POPUP, // Resource ID of popup menuIDR_RESTORE, // Default menu item for popup menu false)) // True if default menu item is located by position{ TRACE0( "Failed to create tray icon\n"); return -1;} |
|
Product: Xtreme ToolkitPro 19.30
Platform: Windows 10 64bit Language: Visual C++ (VS 2019) |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Do you show Standard Menu or our CXTPPopupBar ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
evoX
Senior Member Joined: 25 July 2007 Status: Offline Points: 207 |
Post Options
Thanks(0)
|
Hi,
Standard menu
|
|
Product: Xtreme ToolkitPro 19.30
Platform: Windows 10 64bit Language: Visual C++ (VS 2019) |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
evoX
Senior Member Joined: 25 July 2007 Status: Offline Points: 207 |
Post Options
Thanks(0)
|
Hi,
The sample cannot be compiled....
1>d:\trayicon\trayicondlg\samplesheet.cpp(36) : error C2440: 'static_cast' : cannot convert from 'BOOL (__thiscall CSampleSheet::* )(void)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)' 1> None of the functions with this name in scope match the target type 1>d:\trayicon\trayicondlg\samplesheet.cpp(68) : error C2665: 'AfxMessageBox' : none of the 2 overloads could convert all the argument types 1> d:\vs\vc\atlmfc\include\afxwin.h(5372): could be 'int AfxMessageBox(LPCTSTR,UINT,UINT)' 1> d:\vs\vc\atlmfc\include\afxwin.h(5374): or 'int AfxMessageBox(UINT,UINT,UINT)' 1> while trying to match the argument list '(const char [4])' 1>d:\trayicon\trayicondlg\samplesheet.cpp(74) : error C2665: 'AfxMessageBox' : none of the 2 overloads could convert all the argument types 1> d:\vs\vc\atlmfc\include\afxwin.h(5372): could be 'int AfxMessageBox(LPCTSTR,UINT,UINT)' 1> d:\vs\vc\atlmfc\include\afxwin.h(5374): or 'int AfxMessageBox(UINT,UINT,UINT)' 1> while trying to match the argument list '(const char [5])' 1>TrayIconDlg.cpp 1>d:\trayicon\trayicondlg\trayicondlg.cpp(82) : error C2664: 'CSampleSheet::CSampleSheet(UINT,CWnd *,UINT)' : cannot convert parameter 1 from 'const char [6]' to 'UINT' 1> There is no context in which this conversion is possible |
|
Product: Xtreme ToolkitPro 19.30
Platform: Windows 10 64bit Language: Visual C++ (VS 2019) |
|
evoX
Senior Member Joined: 25 July 2007 Status: Offline Points: 207 |
Post Options
Thanks(0)
|
Is it possible that in my application does not work because I am using a CommandBars toolbar in the propertyseet ? which also sends commands to propertysheet
|
|
Product: Xtreme ToolkitPro 19.30
Platform: Windows 10 64bit Language: Visual C++ (VS 2019) |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
No. It can't be reason.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
evoX
Senior Member Joined: 25 July 2007 Status: Offline Points: 207 |
Post Options
Thanks(0)
|
Hi,
I have deleted the entire project files and recompiled and now it works :)
It also was a problem with IDM_ABOUTBOX message which now I have added to ON_COMMAND and display the box instead of using the OnSysCommand to display it.
|
|
Product: Xtreme ToolkitPro 19.30
Platform: Windows 10 64bit Language: Visual C++ (VS 2019) |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
good :)
|
|
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 |