Print Page | Close Window

StatusBar Indicators

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=18020
Printed Date: 01 October 2024 at 10:36pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: StatusBar Indicators
Posted By: Kenneth
Subject: StatusBar Indicators
Date Posted: 08 March 2011 at 11:01am

The 1502 version of ToolKitPro causes failure on the following:

if(!m_wndStatusBar.Create(this) || !m_wndStatusBar.SetIndicators(indicators,sizeof(indicators)/sizeof(UINT)))
      {
      TRACE0("Failed to create status bar\n");
      return -1;      // fail to create
      }
 
where:
static UINT indicators[] =
     {
     ID_SEPARATOR,           // status line indicator
     ID_INDICATOR_LINE,
     ID_INDICATOR_CP,
     ID_INDICATOR_OVR,
     ID_INDICATOR_CAPS,
     ID_INDICATOR_NUM,
     ID_INDICATOR_SCRL,
     };
and
 
#define ID_INDICATOR_LINE               61452
#define ID_INDICATOR_CP                 61453
 
This worked on previous versions.
 
The following appears in the debugging log:
 
Warning: failed to load indicator string 0xF00C.
Failed to create status bar
 
Has something changed in how the ID's should be defined?
 
Ken
 
 



Replies:
Posted By: Simon HB9DRV
Date Posted: 08 March 2011 at 12:45pm
Interesting - I saw similar with 12.0.1 on just one customer site using that avast antivirus software.
 
I suggest using the CString member to format the string and see that the text resource hasn't been removed.


-------------
Simon HB9DRV


Posted By: Kenneth
Date Posted: 08 March 2011 at 1:44pm
Debuging indicates that the StatusBar SetIndicator() function is failing trying to load the resource.  As I stated, the only change made was compiling with verison 1502 instead of previous versions.  I did however check the .rc file and the strings are in fact there.  The .rc is static linked to the app.
 
Its almost as though the pointer to the resouces have been messed up, but if I do not call SetIndicator() then everything works ok (except of cource the app does not have the indicators on the StatusBar.


Posted By: Simon HB9DRV
Date Posted: 08 March 2011 at 2:24pm
Same here, but what I did was you actually load the resources to see if the string still existed. Not this was happening on one of 1,000 users and he was using this anti-virus.

FWIW My string was A/D Overload.
 
I did the test when the program started in the CWinApp before anything else.


-------------
Simon HB9DRV


Posted By: Kenneth
Date Posted: 08 March 2011 at 3:45pm
I changed the resource values of the strings in question and that resolved the problem.  I suspect Codejock added/changed some things that may have duplicated what I was using.  In any case, everything works again.



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