Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTPMenuBar - attach to non-MFC frame?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPMenuBar - attach to non-MFC frame?

 Post Reply Post Reply
Author
Message
Matchay View Drop Down
Newbie
Newbie


Joined: 25 May 2005
Location: Germany
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Matchay Quote  Post ReplyReply Direct Link To This Post Topic: CXTPMenuBar - attach to non-MFC frame?
    Posted: 01 June 2005 at 3:28am

Hello!

I'd like to implement CXTPMenuBar into our application. The thing is the main application window has been written long ago in API, pure C. It's got nothing to do with any of CFrameWnd classes. Now I am going to "modernize" the UI a little but it's not possible to rewrite the main window in MFC. Don't ask me why - there's a lot of old reasons. The menus are dynamic and they are implemented in a separate dll, using CreateMenu(),SetMenu(),... API set of functions.

My question is of course: is it at all possible to implement CXTPMenuBar in that enviroment? If I don't have a "proper" CXTPFrameWnd-derived window how can I initialize the whole environment which is normally done at OnCreate()?

Best regards!

Maciej

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 03 June 2005 at 1:35am
Sorry, CommandBars can't be used without CFrameWnd.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Matchay View Drop Down
Newbie
Newbie


Joined: 25 May 2005
Location: Germany
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Matchay Quote  Post ReplyReply Direct Link To This Post Posted: 06 June 2005 at 3:33am

A simple trick works. I created an object inherited from CXTPFrameWnd and then attached a main application window (with its handle) to the object. I had to manually initialize the environment (no OnCreate function) but it works. I got the whole XTPFrame at the main application window - menus, toolbars... We'll see!

Regards!

Maciej

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.033 seconds.