Print Page | Close Window

Compile error in wizard created code

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: General Discussion
Forum Description: Topics Related to Visual C++ MFC Development in General
URL: http://forum.codejock.com/forum_posts.asp?TID=6511
Printed Date: 20 September 2024 at 7:04pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Compile error in wizard created code
Posted By: kr5730
Subject: Compile error in wizard created code
Date Posted: 26 February 2007 at 1:25pm
I downloaded the Toolkit Pro 2006 Q4 for evaluation. When I create a skeleton app using the toolkit wizard, code is missing in the generated MainFrm.cpp.  From looking at sample apps, I gather the missing code should be:
 
// Initialize the Command Bars
if (!InitCommandBars())
  return -1;

// Get a pointer to the Command Bars object.

CXTPCommandBars* pCommandBars = GetCommandBars();
if (pCommandBars == NULL)
{
  TRACE0("Failed to create command bars object.\n");
  return -1; // fail to create
}
 
It's repeatable. Is this a known problem?
 
Kevin



Replies:
Posted By: kr5730
Date Posted: 26 February 2007 at 1:28pm
Xtreme ToolkitPro v10.4.2
VC 7.1


Posted By: Oleg
Date Posted: 27 February 2007 at 1:05am
Hello,
 
What settings do  you change in Wizards pages? I can't reproduce it :(


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


Posted By: kr5730
Date Posted: 27 February 2007 at 11:16am
Oleg,
 
Here's what I did:
 
Add New Project... type:MFC template:Toolkit Pro Application
 
Xtreme Toolkit Pro Application Wizard...
 
Application Type
  Single document
  Document/View support
  English(US)
  MFC Standard
  Use MFC in shared DLL
 
Compound Document Support: None
 
Doc Template Strings
  File extension: xdp
  everything else, defaults
 
Database Support: None
 
User Interface Features
  Thick Frame
  Minimize box
  Maximize box
  System menu
  Initial status bar
  Toolbars: Standard docking (Browser style)
 
Advanced Features
  Context sensitice help (html)
  Printing and print preview
  ActiveX controls
  Windows sockets
  Common Control Mnifest
  4 MRU
 
Toolkit Pro Features
  Menu bar
  Docking pane
  Intelligent menus
  Office 2003 look
  Toolbars and menus customization
 
Generated Classes
  base class for view class: CView
 
 
I think the culprit is adding the Browser Style attribute to standard docking toolbars.


Posted By: Oleg
Date Posted: 28 February 2007 at 1:26am
Hello,
 
Yes, don't check "Browser Style" if you want use CommandBars.


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


Posted By: znakeeye
Date Posted: 05 March 2007 at 6:40pm
I have seen this problem since Q1. Haven't bothered to post it here though. Any wizard-created project will, in many cases, be missing the GetCommandBars-line etc.
 
Please double-check this until next version.


Posted By: znakeeye
Date Posted: 05 March 2007 at 6:41pm
... and as far as I remeber, I usually don't check "Browser Style".


Posted By: kr5730
Date Posted: 07 March 2007 at 4:24pm
If it's not a valid combination, the wizard shouldn't allow you to choose it.
 
If it is a valid and reasonable thing to choose, then the code generated should be correct.



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