Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - StatusBar Indicators
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

StatusBar Indicators

 Post Reply Post Reply
Author
Message
Kenneth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 May 2004
Location: United States
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kenneth Quote  Post ReplyReply Direct Link To This Post Topic: StatusBar Indicators
    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
 
 
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Kenneth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 May 2004
Location: United States
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kenneth Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Kenneth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 May 2004
Location: United States
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kenneth Quote  Post ReplyReply Direct Link To This Post 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.
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.