Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Can’t add event handlers to CMainFrame
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Can’t add event handlers to CMainFrame

 Post Reply Post Reply
Author
Message
bevpet View Drop Down
Newbie
Newbie
Avatar

Joined: 01 April 2005
Location: Canada
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote bevpet Quote  Post ReplyReply Direct Link To This Post Topic: Can’t add event handlers to CMainFrame
    Posted: 01 April 2005 at 1:03pm

Hi all,

strange problem...i think.

just created a new project (vc2003/w2kpro) using the xtreme toolkit with basic options. When i goto add a menu event handler to my cmainframe class, it won't let me, every other class allows the event to be created..

then i created a stand mfc project with no xtreme template, and tried to add a menu event to the cmainframe and it allowed me to !!

is it just me still asleep or just stupid, any suggestions greatly appreciated.

Thanks

Peter

Back to Top
bevpet View Drop Down
Newbie
Newbie
Avatar

Joined: 01 April 2005
Location: Canada
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote bevpet Quote  Post ReplyReply Direct Link To This Post Posted: 04 April 2005 at 9:27am

Addendum:

just noticed, that every extreme sample program also exhibits the same problem with the mainframe class, in which you can't access/add to the class.

if change public CXTPMDIFrameWnd back to public MDIFrameWnd, the class overrides and messages are accessible again.

is their something wrong with my installation or files ??

thanks, any help appreciated

Peter

Back to Top
ICBM View Drop Down
Groupie
Groupie


Joined: 15 January 2004
Location: New Zealand
Status: Offline
Points: 57
Post Options Post Options   Thanks (0) Thanks(0)   Quote ICBM Quote  Post ReplyReply Direct Link To This Post Posted: 04 April 2005 at 4:41pm

This is 'normal' behaviour for Visual Studio. As soon as you change the base class to something that is not part of standard MFC, various useful functions are disabled including adding command handlers.

I believe it used to be possible (with VC6) to make some changes to a config file to add your own classes, but it's been a long time...

Anyhoo, this is not a fault of the codejock libraries.

 

 

Back to Top
markr View Drop Down
Senior Member
Senior Member


Joined: 01 August 2004
Status: Offline
Points: 442
Post Options Post Options   Thanks (0) Thanks(0)   Quote markr Quote  Post ReplyReply Direct Link To This Post Posted: 04 April 2005 at 6:55pm
If anonyone knows of a workaround for this, I'd love to hear about it. It's a bit of a pain in the arse, in my opinion.

- MR

Back to Top
bevpet View Drop Down
Newbie
Newbie
Avatar

Joined: 01 April 2005
Location: Canada
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote bevpet Quote  Post ReplyReply Direct Link To This Post Posted: 04 April 2005 at 8:37pm

thanks for clarifying that ICBM

yes in vc6 its possible.

just started using vc2003 past month or so.

  thanks Microsoft

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: 06 April 2005 at 3:55am

As workaround  you can add Toolkit project to solution, rebuild your application, and remove it again (if you want).

 

 

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
dennisV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 October 2004
Location: Australia
Status: Offline
Points: 242
Post Options Post Options   Thanks (0) Thanks(0)   Quote dennisV Quote  Post ReplyReply Direct Link To This Post Posted: 06 April 2005 at 7:18am
Originally posted by oleg oleg wrote:

As workaround  you can add Toolkit project to solution, rebuild your application, and remove it again (if you want).

I actually always add the XTP to the solution, because it then allows me to get Intellisense working as well, plus I might want to do some weird optimizations

// W7 64 Ultimate SP1
// VS 2008
// CodeJock 16.2.3 (MFC)
Back to Top
bevpet View Drop Down
Newbie
Newbie
Avatar

Joined: 01 April 2005
Location: Canada
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote bevpet Quote  Post ReplyReply Direct Link To This Post Posted: 06 April 2005 at 9:27am

Hi Guys,

thank's for the info, that worked like a charm.

 

Thanks again,

Peter

 

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