Print Page | Close Window

Menu Tracking - Windows 95/98/ME

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=1333
Printed Date: 16 September 2025 at 1:47pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Menu Tracking - Windows 95/98/ME
Posted By: Kenneth
Subject: Menu Tracking - Windows 95/98/ME
Date Posted: 27 October 2004 at 2:22pm

When you compile an app using Unicows, the ability to properly close the menu is lost on Windows 95/98 and ME.  The only way to close an expanded menu is to left mouse click on the title bar.  I added the following code to the application, which resolves the problem.  However, adding the OnWndMsg override prevents any ON_XTP_EXECUTE to work.  Is there a solution to this?

Added code:

BOOL CMainFrame::OnWndMsg(UINT message,WPARAM wParam,LPARAM lParam,LRESULT* pResult)
 {
 // Handles Menu problem on Windows 9x when using UNICODE/UNICOWS
 if(XTPMouseManager()->IsTrackedLock())
      {
      switch(message)
           {
           case WM_ACTIVATEAPP:
                          if(!wParam)
                               XTPMouseManager()->SendTrackLost();
                          return(FALSE);
           case WM_SYSCOMMAND:
                          if(wParam == 0 || LOWORD(wParam) != 0)
                               XTPMouseManager()->SendTrackLost();
                          return(FALSE);
           case WM_COMMAND:
                          if(wParam == 0 || (LOWORD(wParam) != 0 && HIWORD(wParam) == 0))
                               XTPMouseManager()->SendTrackLost();
                          return(FALSE);
           }
      }
 return CWnd::OnWndMsg(message,wParam,lParam,pResult);
 }




Replies:
Posted By: Kenneth
Date Posted: 27 October 2004 at 6:17pm

I found a better and more reliable method to take care of this problem.  Boy, Unicows/Unicode and this Tookkit Pro sure does clash a lot!  Never had these problems with Xtreme toolkit.

 



Posted By: Oleg
Date Posted: 27 October 2004 at 11:44pm

copy code from XTPFrameWnd.h.

What is base class for CMainFrame? Why you call CWnd::OnWndMsg(message,wParam,lParam,pResult); instead of CFrameWnd I think it is cause of your problem.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Kenneth
Date Posted: 28 October 2004 at 12:07am

Oleg

I had CFrameWnd before, and changed to CWnd just to see if it made any difference.  But I had the same problem.  The logic works as far as resolving the Windows 95/98/Me menu problem, but prevents ON_XTP_EXECUTE from working on all systems, including XP.  However keep in mind that I believe this only affects programs compiled with Unicode with Unicows support.



Posted By: Oleg
Date Posted: 28 October 2004 at 6:39am

call CXTPFrameWnd::OnWndMsg instead of CWnd::OnWndMsg. I think it must solve your problem.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Kenneth
Date Posted: 28 October 2004 at 9:35am

Oleg

Yes, that does work.

 

 




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