Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Menu Tracking - Windows 95/98/ME
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Menu Tracking - Windows 95/98/ME

 Post Reply Post Reply
Author
Message
Kenneth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 May 2004
Location: United States
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kenneth Quote  Post ReplyReply Direct Link To This Post Topic: Menu Tracking - Windows 95/98/ME
    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);
 }

Back to Top
Kenneth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 May 2004
Location: United States
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kenneth Quote  Post ReplyReply Direct Link To This Post 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.

 

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Kenneth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 May 2004
Location: United States
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kenneth Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Kenneth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 May 2004
Location: United States
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kenneth Quote  Post ReplyReply Direct Link To This Post Posted: 28 October 2004 at 9:35am

Oleg

Yes, that does work.

 

 

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.031 seconds.