Print Page | Close Window

Can’t add event handlers to CMainFrame

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=2068
Printed Date: 14 July 2025 at 6:10pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Can’t add event handlers to CMainFrame
Posted By: bevpet
Subject: Can’t add event handlers to CMainFrame
Date 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




Replies:
Posted By: bevpet
Date 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



Posted By: ICBM
Date 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.

 

 



Posted By: markr
Date 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



Posted By: bevpet
Date 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



Posted By: Oleg
Date 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


Posted By: dennisV
Date 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)


Posted By: bevpet
Date Posted: 06 April 2005 at 9:27am

Hi Guys,

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

 

Thanks again,

Peter

 




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