Click here to Skip to main content
16,004,893 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to draw the gradient of 3 colors with rotation? Pin
Mircea Puiu11-Oct-05 0:54
Mircea Puiu11-Oct-05 0:54 
QuestionModeless dialog communicating with parent dialog Pin
fjlv200510-Oct-05 20:44
fjlv200510-Oct-05 20:44 
AnswerRe: Modeless dialog communicating with parent dialog Pin
karmendra_js10-Oct-05 21:11
karmendra_js10-Oct-05 21:11 
AnswerRe: Modeless dialog communicating with parent dialog Pin
fjlv200510-Oct-05 23:26
fjlv200510-Oct-05 23:26 
GeneralRe: Modeless dialog communicating with parent dialog Pin
karmendra_js10-Oct-05 23:58
karmendra_js10-Oct-05 23:58 
GeneralRe: Modeless dialog communicating with parent dialog Pin
karmendra_js11-Oct-05 0:11
karmendra_js11-Oct-05 0:11 
Questionfile filtering Pin
karmendra_js10-Oct-05 20:24
karmendra_js10-Oct-05 20:24 
AnswerRe: file filtering Pin
Mircea Puiu10-Oct-05 22:51
Mircea Puiu10-Oct-05 22:51 
Unless you are not willing to use any fancy database approach and run some queries,
you could go for an ASCII file, in which each line could contain text like:
22-Name
where the id is followed by a "-" and the name itself.
Then you use a CStdioFile object to read the file line by line.
Assuming now that you get the line info into some
char chText[256] variable, you go then for something like this:
<br />
  char chName[256];<br />
  unsigned int ID;<br />
  sscanf(chText, "%u-%s", &ID, chName);<br />

As soon you get the ID value you are looking for, you stop the process of reading the file, close the file and return chName

I'm pretty sure, some other ways exist as well Smile | :) )


SkyWalker
AnswerRe: file filtering Pin
ThatsAlok11-Oct-05 0:34
ThatsAlok11-Oct-05 0:34 
QuestionSerializing Data to file Pin
karmendra_js10-Oct-05 19:44
karmendra_js10-Oct-05 19:44 
AnswerRe: Serializing Data to file Pin
karmendra_js10-Oct-05 20:07
karmendra_js10-Oct-05 20:07 
GeneralRe: Serializing Data to file Pin
David Crow11-Oct-05 2:52
David Crow11-Oct-05 2:52 
QuestionVC++ query Pin
nams_pr10-Oct-05 18:41
nams_pr10-Oct-05 18:41 
AnswerRe: VC++ query Pin
Richard Jones12-Oct-05 8:08
Richard Jones12-Oct-05 8:08 
QuestionRe: VC++ query Pin
nams_pr12-Oct-05 18:38
nams_pr12-Oct-05 18:38 
QuestionAnimated Search Icon Pin
Ian Bowler10-Oct-05 15:45
Ian Bowler10-Oct-05 15:45 
AnswerRe: Animated Search Icon Pin
Max Santos10-Oct-05 15:55
Max Santos10-Oct-05 15:55 
GeneralRe: Animated Search Icon Pin
Ian Bowler10-Oct-05 16:33
Ian Bowler10-Oct-05 16:33 
QuestionRe: Animated Search Icon Pin
David Crow10-Oct-05 16:30
David Crow10-Oct-05 16:30 
AnswerRe: Animated Search Icon Pin
Ian Bowler10-Oct-05 16:33
Ian Bowler10-Oct-05 16:33 
QuestionCListCtrl - how to change VScroll max position ? Pin
Giora_gg10-Oct-05 14:06
Giora_gg10-Oct-05 14:06 
AnswerRe: CListCtrl - how to change VScroll max position ? Pin
Mircea Puiu10-Oct-05 23:01
Mircea Puiu10-Oct-05 23:01 
GeneralRe: CListCtrl - how to change VScroll max position ? Pin
Giora_gg10-Oct-05 23:26
Giora_gg10-Oct-05 23:26 
QuestionRead from chat/graphics Pin
fickludd10-Oct-05 12:56
fickludd10-Oct-05 12:56 
QuestionApplication supporting diff' languages Pin
jim45610-Oct-05 12:23
jim45610-Oct-05 12:23 

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.