Reading values from a string table..

This is a discussion on Reading values from a string table.. within the Windows Programming forums, part of the Platform Specific Boards category; How can I retrive values from a string table in a resource associated with my project? For example, I have ...

  1. #1
    Registered User Dual-Catfish's Avatar
    Join Date
    Sep 2001
    Posts
    802

    Reading values from a string table..

    How can I retrive values from a string table in a resource associated with my project? For example, I have a value IDS_TITLEBAR in my string table, how can I get the string value?
    I tried TEXT(MAKEINTRESOURCE(IDS_TITLEBAR)) but that's crashing my program.

    This is where I'm using it:

    Code:
    hwnd = CreateWindow(	
    
    			szAppName,
    			MAKEINTRESOURCE(IDS_TITLEBAR),
    			WS_OVERLAPPEDWINDOW,
    			CW_USEDEFAULT,
    			CW_USEDEFAULT,
    			CW_USEDEFAULT,
    			CW_USEDEFAULT,
    			NULL,
    			NULL,
    			hInstance,
    			NULL
    					);

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    try..

    Code:
    LoadString(GetModuleHandle(NULL),IDS_STRING2,buff,BUFF_SIZE);

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Inheritance Hierarchy for a Package class
    By twickre in forum C++ Programming
    Replies: 7
    Last Post: 12-08-2007, 04:13 PM
  2. Message class ** Need help befor 12am tonight**
    By TransformedBG in forum C++ Programming
    Replies: 1
    Last Post: 11-29-2006, 11:03 PM
  3. RicBot
    By John_ in forum C++ Programming
    Replies: 8
    Last Post: 06-13-2006, 07:52 PM
  4. Compile Error that i dont understand
    By bobthebullet990 in forum C++ Programming
    Replies: 5
    Last Post: 05-05-2006, 10:19 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21