Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > General Discussion
  New Posts New Posts RSS Feed - Compile error in wizard created code
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Compile error in wizard created code

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


Joined: 26 February 2007
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote kr5730 Quote  Post ReplyReply Direct Link To This Post Topic: Compile error in wizard created code
    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
Back to Top
kr5730 View Drop Down
Newbie
Newbie


Joined: 26 February 2007
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote kr5730 Quote  Post ReplyReply Direct Link To This Post Posted: 26 February 2007 at 1:28pm
Xtreme ToolkitPro v10.4.2
VC 7.1
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 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
Back to Top
kr5730 View Drop Down
Newbie
Newbie


Joined: 26 February 2007
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote kr5730 Quote  Post ReplyReply Direct Link To This Post 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.
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 February 2007 at 1:26am
Hello,
 
Yes, don't check "Browser Style" if you want use CommandBars.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 05 March 2007 at 6:41pm
... and as far as I remeber, I usually don't check "Browser Style".
Back to Top
kr5730 View Drop Down
Newbie
Newbie


Joined: 26 February 2007
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote kr5730 Quote  Post ReplyReply Direct Link To This Post 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.
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.