Click here to Skip to main content
15,905,587 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How modifie string table in Run tIme. Pin
toxcct1-Aug-07 2:55
toxcct1-Aug-07 2:55 
GeneralRe: How modifie string table in Run tIme. Pin
birajendu1-Aug-07 3:02
birajendu1-Aug-07 3:02 
GeneralRe: How modifie string table in Run tIme. Pin
toxcct1-Aug-07 3:03
toxcct1-Aug-07 3:03 
GeneralRe: How modifie string table in Run tIme. Pin
birajendu1-Aug-07 3:07
birajendu1-Aug-07 3:07 
GeneralRe: How modifie string table in Run tIme. Pin
toxcct1-Aug-07 3:12
toxcct1-Aug-07 3:12 
GeneralRe: How modifie string table in Run tIme. Pin
birajendu1-Aug-07 3:17
birajendu1-Aug-07 3:17 
GeneralRe: How modifie string table in Run tIme. Pin
toxcct1-Aug-07 3:20
toxcct1-Aug-07 3:20 
GeneralRe: How modifie string table in Run tIme. Pin
James R. Twine1-Aug-07 3:19
James R. Twine1-Aug-07 3:19 
   You do not search at runtime, you bring them all into memory at startup.  Even if you had 32767 strings with a length of 64 each, that would only require 2MB of memory - not a lot in today's world especially when it is only needs to be managed once at startup and once at shutdown.

  If you design the file correctly, each string has a specific index, you store offsets into the file for each index, place the index at the start of the file, and you store the strings with their terminating NUL characters.

   So at startup, you memory-map the strings file, read the index to determine the start of each (indexed) string, and since it contains its terminating NUL, you can use normal string-handling code to copy the strings where needed for display just by starting the copy operation from its offset using the address of the view of the MM file.

   This would require a separate app to edit the strings file, but it would be worth it, IMHO.

   Peace!

-=- James
Please rate this message - let me know if I helped or not!<HR>If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFiles

GeneralRe: How modifie string table in Run tIme. Pin
birajendu1-Aug-07 3:40
birajendu1-Aug-07 3:40 
GeneralRe: How modifie string table in Run tIme. Pin
James R. Twine1-Aug-07 4:04
James R. Twine1-Aug-07 4:04 
QuestionAppearance of available methods Pin
WolveFred1-Aug-07 2:30
WolveFred1-Aug-07 2:30 
AnswerRe: Appearance of available methods Pin
toxcct1-Aug-07 2:54
toxcct1-Aug-07 2:54 
AnswerRe: Appearance of available methods Pin
David Crow1-Aug-07 2:54
David Crow1-Aug-07 2:54 
AnswerRe: Appearance of available methods Pin
Mike Dimmick1-Aug-07 2:54
Mike Dimmick1-Aug-07 2:54 
QuestionVC++ program in web page Pin
SnaKeBeD1-Aug-07 2:23
SnaKeBeD1-Aug-07 2:23 
AnswerRe: VC++ program in web page Pin
Randor 1-Aug-07 2:42
professional Randor 1-Aug-07 2:42 
GeneralRe: VC++ program in web page Pin
#realJSOP1-Aug-07 2:45
professional#realJSOP1-Aug-07 2:45 
AnswerRe: VC++ program in web page Pin
#realJSOP1-Aug-07 2:47
professional#realJSOP1-Aug-07 2:47 
GeneralRe: VC++ program in web page Pin
ThatsAlok5-Aug-07 23:16
ThatsAlok5-Aug-07 23:16 
QuestionGet Sub-directories Pin
Programm3r1-Aug-07 2:22
Programm3r1-Aug-07 2:22 
AnswerRe: Get Sub-directories Pin
Jonathan [Darka]1-Aug-07 2:39
professionalJonathan [Darka]1-Aug-07 2:39 
GeneralRe: Get Sub-directories [modified] Pin
Programm3r1-Aug-07 3:13
Programm3r1-Aug-07 3:13 
GeneralRe: Get Sub-directories Pin
Jonathan [Darka]1-Aug-07 3:37
professionalJonathan [Darka]1-Aug-07 3:37 
GeneralRe: Get Sub-directories Pin
Programm3r1-Aug-07 3:43
Programm3r1-Aug-07 3:43 
AnswerRe: Get Sub-directories Pin
Randor 1-Aug-07 2:40
professional Randor 1-Aug-07 2:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.