LoadString problems

James Hawkins truiken at gmail.com
Sat Jul 30 02:06:50 CDT 2005


Hey,

I'm trying to load strings from the hhctrl.ocx resource file to use as
the text for tabs and toolbar buttons, but I can't get it to work. 
I've tried to get LoadString to work a couple ways, but it just won't
work for me.  I've attached the resource files and Makefile.in. Maybe
something is wrong with the way those are set up.  The following code
is one of the (failing) places where I call LoadString:

   TCITEMA tie;
   char text[MAX_PATH];

   LoadStringA(NULL, IDS_CONTENTS, text, MAX_PATH);
   /* text should be '&Contents', but we get a GetLastError() */

   tie.mask = TCIF_TEXT;
   tie.pszText = text;

   TabCtrl_InsertItemA(hwndTabCtrl, dwIndex, &tie);

I should note that the code works when compiled with Visual Studio and
run on Windows.

-- 
James Hawkins
-------------- next part --------------
A non-text attachment was scrubbed...
Name: En.rc
Type: application/octet-stream
Size: 1029 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20050730/f44ffe7e/En.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hhctrl.rc
Type: application/octet-stream
Size: 1009 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20050730/f44ffe7e/hhctrl.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile.in
Type: application/octet-stream
Size: 324 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20050730/f44ffe7e/Makefile.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: resource.h
Type: text/x-chdr
Size: 919 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20050730/f44ffe7e/resource.h


More information about the wine-devel mailing list