Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Major drawing bug in v12.0.1!
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Major drawing bug in v12.0.1!

 Post Reply Post Reply
Author
Message
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 Topic: Major drawing bug in v12.0.1!
    Posted: 19 August 2008 at 3:00am

XTP 12.0.1.

When I add a toolbar to my "office 2007"-themed application and place it at the bottom right, the status bar is obscured. If I try resizing the window the status bar is screwed up.
 
 
Not to hard to reproduce. Just add a status bar and a toolbar and place it at the bottom right.
 
 
The same problem is encountered when the toolbar is attached at the bottom:
 
 <---
 
Looks weird, and when resize-dragging the status bar, you get the same effect...
 
Also worth mentioning; the window somehow repairs itself after playing around a bit. So, it seems this is an "initial state" bug.
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2008 at 4:35am
In which order do you create them? Try changing the order.

Codejock support
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: 19 August 2008 at 4:56am

No, the order has no effect. And even if it did, the bug would still be relevant.

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: 19 August 2008 at 4:58am
Hello,
 
Yes, its problem of order. Create statusBar before you call InitCommandBars.
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: 19 August 2008 at 5:54am
In any case, your code should yield an ASSERT when the above mistake is made!
 
Some thoughts...
I call InitCommandBars before CView::OnCreate, to be able to set the office 2007-colors (black) before any 2007-themed controls are created (reports etc). I want to do this, because I do not like this sequence:
 
1) Create windows with 2007-theme (BLUE)
2) Init Commandbars
3) Change image handle of Commandbars
4) Update all 2007-themed controls to BLACK
 
It should be possible to do this:
1) Create windows with 2007-theme (BLACK)
2) Init Commandbars
 
Do you see my point? :)
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2008 at 7:55am
Originally posted by znakeeye znakeeye wrote:

In any case, your code should yield an ASSERT when the above mistake is made!


InitCommandBars() has no idea about your statusbar, maybe you don't even want one? It's MFC 101 that the statusbar needs to be created before the other bars

Codejock support
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: 19 August 2008 at 9:01am
Damn this SP1! I believe MFC 10 is bloated with this ribbon sh*t from BCG
 
Anyway, my question remains:
How do I activate black theme before any windows are created using the blue theme?
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2008 at 10:25am
Originally posted by znakeeye znakeeye wrote:

Anyway, my question remains:
How do I activate black theme before any windows are created using the blue theme?


Only link statically against the black theme?

Codejock support
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: 19 August 2008 at 10:36am
Not sure if that would work, but I want to be able to switch between the color modes, so it's not an option!
 
All I want is to default to black, without having to repaint all controls one extra time.
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: 19 August 2008 at 3:42pm
Hi,
 
Add in constructor
 
XTPOffice2007Images()->SetImageHandle(AfxGetInstanceHandle(), "OFFICE2007BLACK.INI");
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.157 seconds.