please explain how to use STRINGTABLE in a resource file?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: please explain how to use STRINGTABLE in a resource file?

  1. #1
    Join Date
    Apr 2007
    Posts
    13

    please explain how to use STRINGTABLE in a resource file?

    I have been having SO MUCH trouble finding an answer to this. And I've tried a hundred different thigns in code. I want to have a string table in my .res file, and then when my program executes put them into a TStringList (BCB). But I can't figure out how to do it and I have been very very unsuccessful trying to find a place that can tell me how.

    Here's how the code is in a .RC file, just for kicks

    STRINGTABLE
    BEGIN
    1000,"&DevX"
    1010,"&Saved"
    1020,"&MY"
    1030,"&Life"
    END

  2. #2
    Join Date
    Dec 2003
    Posts
    3,366
    I am not sure of the exact syntax myself, but you can load a list box with default strings using the editor and then look at the resource file that it generates or just use that list box (you can use hidden items, its handy sometimes!) as a string table instead.

  3. #3
    Join Date
    Apr 2007
    Posts
    13
    TRuthfully, I was looking for the code, because I was trying to load it into a string table and it just wasn't working.

  4. #4
    Join Date
    Dec 2007
    Posts
    12
    Hello,

    Have you tried LoadString() function??

    The LoadString function loads a string resource from the executable file associated with a specified module, copies the string into a buffer, and appends a terminating NULL character.
    Code:
    int LoadString(HINSTANCE hInstance,
        UINT uID,
        LPTSTR lpBuffer,
        int nBufferMax
    ) ;
    All the Best.

    Yours,
    Palem Gopalakrishna http://www.geocities.com/krishnapg/

Similar Threads

  1. Replies: 6
    Last Post: 08-16-2006, 11:32 PM
  2. Using Image from a resource File
    By LABYRNTH in forum VB Classic
    Replies: 1
    Last Post: 07-28-2006, 01:39 PM
  3. Replies: 1
    Last Post: 01-28-2002, 07:15 AM
  4. NullPointerException when reading text file
    By Andrew McLellan in forum Java
    Replies: 3
    Last Post: 05-09-2001, 06:34 PM
  5. Replies: 0
    Last Post: 08-22-2000, 11:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center