Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Button text replaced by toolkitpro text
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Button text replaced by toolkitpro text

 Post Reply Post Reply
Author
Message
fleg View Drop Down
Groupie
Groupie


Joined: 11 July 2012
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote fleg Quote  Post ReplyReply Direct Link To This Post Topic: Button text replaced by toolkitpro text
    Posted: 12 December 2018 at 4:25am
Hi,

When upgrading from toolkipro version 18.4 to 18.6, I noticed a problem when creating a ribbon bar button that is using an standard window command ID (like ID_APP_EXIT, ID_FILE_NEW...)

For instance when doing
pXTPRibbonGroup->Add(xtpControlButton, ID_APP_EXIT);

With 18.4, it was getting the text from my own resource file, where I defined the corresponding text.
With 18.6, it seems now to get the text from a new resource file "prompts.rc" added to ...\Source\Common\res\mfc\

Is there a way to prevent that to happen, maybe with a magic _XTP_xxx macro?
I would prefer to avoid loading explicitely the text from my resource file.

Maybe commenting out some includes as suggested here could work:

This is quite annoying as for some languages (spanish, portuguese...), I get english text instead of localized text

Any help would be very welcome.

Fabien
Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 626
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Posted: 15 June 2019 at 11:29am
Hi fleg,

I have had this sort of issue before with other resources. The issue was a failure to make our resource handle the active handle (AfxSetResource...). MFC has a chain of extension DLLs and when searching for a resource, it first looks in the active resource. If it doesn't find it there, it then walks the list of extension DLLs looking for the first one that has a string with the input resource ID.

We just had to make sure we swapped the afx module data with our module data (usually we only set the afx resource handle). Perhaps, that is the issue here.
Back to Top
astoyan View Drop Down
Admin Group
Admin Group
Avatar

Joined: 24 August 2013
Status: Offline
Points: 193
Post Options Post Options   Thanks (0) Thanks(0)   Quote astoyan Quote  Post ReplyReply Direct Link To This Post Posted: 15 hours 14 minutes ago at 10:46am
This should be completely fixed in 19.0 beta 1 that is currently available for active subscribers. If possible please re-test it with the latest beta and confirm if it's fixed for you.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.078 seconds.