StatusBar Indicators |
Post Reply |
Author | |
Kenneth
Senior Member Joined: 23 May 2004 Location: United States Status: Offline Points: 256 |
Post Options
Thanks(0)
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
|
|
Simon HB9DRV
Senior Member Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
Post Options
Thanks(0)
|
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
|
|
Kenneth
Senior Member Joined: 23 May 2004 Location: United States Status: Offline Points: 256 |
Post Options
Thanks(0)
|
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.
|
|
Simon HB9DRV
Senior Member Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
Post Options
Thanks(0)
|
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
|
|
Kenneth
Senior Member Joined: 23 May 2004 Location: United States Status: Offline Points: 256 |
Post Options
Thanks(0)
|
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.
|
|
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 |