Stringtable string in MessageBox 
Author Message
 Stringtable string in MessageBox

Bonjour!

Having a stringtable with some strings like TEST, how can I use it in
MessageBox?

MessageBox(hdlg, MAKESTRINGFROMSTRINGTABLEINTVALUEMACRO(TEST), "Test",
MB_OK);

Sth. like this?

Robert

-----------------------------------------
Robert Fink

Germany



Sat, 03 Aug 2002 03:00:00 GMT  
 Stringtable string in MessageBox
I'll do more like that :
   str.LoadString(TEST);
   MessageBox(str);


Sat, 03 Aug 2002 03:00:00 GMT  
 Stringtable string in MessageBox
Robert,

Quote:
> Having a stringtable with some strings like TEST, how can I use it in
> MessageBox?

> MessageBox(hdlg, MAKESTRINGFROMSTRINGTABLEINTVALUEMACRO(TEST), "Test",
> MB_OK);

I assume you are not using MFC (because it's trivial with MFC's
AfxMessageBox()).
What you have to do is load the string yourself using LoadString(). Sort of
like
TCHAR str[1000];
LoadString ( GetModuleHandle ( NULL ), TEST, str, 1000 );
MessageBox ( ....., str, ... );

(add, of course, a proper buffer size and error checking <g>)
--
Tomas Restrepo
http://members.xoom.com/trestrep/



Sat, 03 Aug 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Bug: Adding a new string in stringtable creates duplicates in resource.h

2. Howto Conditionlise strings in stringtable???

3. Using strings from the Resource StringTable

4. Displaying non strings using MessageBox

5. How to display the WCHAR string on MessageBox ???

6. Change font for Status string and MessageBox

7. MessageBox(_T("string"));

8. StringTable API

9. include containing STRINGTABLE in RC file

10. non english STRINGTABLE editing

11. How to choose which STRINGTABLE resource will be compiled

12. 1 StringTable Resource, multiple lines?

 

 
Powered by phpBB® Forum Software