![]() |
Bug or command bar go crazy? |
Post Reply
|
| Author | |
mikexyz
Newbie
Joined: 03 May 2005 Location: United States Status: Offline Points: 16 |
Post Options
Thanks(0)
Quote Reply
Topic: Bug or command bar go crazy?Posted: 18 May 2005 at 8:29pm |
|
Hello:
I encounter this crazy behavior. On a same command bar, I create three custom button. The first button have mutiple selections of Line size (LIKE VISIO LINE SIZE). The second button have mutiple selections of Line Style (LIKE VISIO LINE STYLE). The third button have drop down list of icon, and selection like color select. * NOTE: I took the code from one of the Codejock example for the 1st button & 2nd button. The problem is when all three buttons in a same command bar, the LoadCommandBars(...) load bad result into First and Second Button. ------------------- EXAMPLE CODE --------------------------------------- CXTPToolBar* pFontBar; if (!(pFontBar = (CXTPToolBar*)pCommandBars->Add(_T("Font Bar"), xtpBarTop)) || !pFontBar->LoadToolBar(IDR_EASY_FONT_BAR)) { TRACE0("Failed to create font toolbar\n"); return -1; } // Load the previous state for toolbars and menus. LoadCommandBars(_T("CommandBars")); <---------- CAUSE BAD INFORMATION LOAD UP ---------------------------------------------------------- ----------------------------------- But when I COMMENT this codes out. The First and Second button appear OK. //------------------------ Draw Popup Link Line ------------------------ if (lpCreateControl->nID == ID_EASY_LINK_LINE && pToolBar->GetBarID() == IDR_EASY_FONT_BAR) { lpCreateControl->controlType = xtpControlSplitButtonPopup; lpCreateControl->buttonStyle = xtpButtonIcon; // only icon return TRUE; } //---------------------------------------------------------- ------------ Edited by mikexyz |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 19 May 2005 at 5:38am |
|
It is strange. Try to comment LoadCommandBars, run it and uncomment, may be it loads old state from registry. |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
mikexyz
Newbie
Joined: 03 May 2005 Location: United States Status: Offline Points: 16 |
Post Options
Thanks(0)
Quote Reply
Posted: 19 May 2005 at 10:14am |
|
Oleg,
It is appear that information storage in the registry is not properly. This took several hours to track down this bugs. Mike |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 20 May 2005 at 7:55am |
|
So the problem is gone now?
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
mikexyz
Newbie
Joined: 03 May 2005 Location: United States Status: Offline Points: 16 |
Post Options
Thanks(0)
Quote Reply
Posted: 20 May 2005 at 6:25pm |
|
I work around the problem by comment out this:
LoadCommandBars(_T("CommandBars")); <---------- CAUSE BAD INFORMATION LOAD UP Mike |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |