Click here to Skip to main content
15,902,832 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How can i destroy a window that doesn't want to? ;) Pin
Ernest Laurentin25-Apr-02 5:02
Ernest Laurentin25-Apr-02 5:02 
GeneralRe: How can i destroy a window that doesn't want to? ;) Pin
argaleen25-Apr-02 5:09
argaleen25-Apr-02 5:09 
GeneralRe: How can i destroy a window that doesn't want to? ;) Pin
Ernest Laurentin25-Apr-02 5:37
Ernest Laurentin25-Apr-02 5:37 
GeneralRe: How can i destroy a window that doesn't want to? ;) Pin
argaleen25-Apr-02 23:08
argaleen25-Apr-02 23:08 
AnswerRe: How can i destroy a window that doesn't want to? ;) Pin
Ollie25-Apr-02 5:12
Ollie25-Apr-02 5:12 
Generalthe "PostMessage" function Pin
Aviv Halperin25-Apr-02 3:56
Aviv Halperin25-Apr-02 3:56 
GeneralRe: the "PostMessage" function Pin
Jeremy Falcon25-Apr-02 4:04
professionalJeremy Falcon25-Apr-02 4:04 
QuestionRead string at a certain point? Pin
Aoife25-Apr-02 3:48
Aoife25-Apr-02 3:48 
Hello,

I need to read the following two lines from a .txt file.

Name John Doe
Number +12345

Then I must extract "John Doe" and "+12345" and send them to an edit box.
I tried using strtok() but it didn't work the way I want it to. Is there a way of starting at a particular point in the string? eg in "Name John Doe" at position 6.

Thanks,
Aoife

/********************************************/

FILE *stream;
stream = fopen( "number", "r" );

char bufLine1[30], bufLine2[30];

fgets(bufLine1, 30, stream);
fgets(bufLine2, 30, stream);

char *pNext1 = ?????(bufLine1, ??);
char *pNext2 = ?????(bufLine2, ??);

strcpy(bufLine1, pNext1);
strcpy(bufLine2, pNext2);

SendDlgItemMessage(IDC_BOX1, EM_REPLACESEL, FALSE, (LPARAM)bufLine1);
SendDlgItemMessage(IDC_BOX2, EM_REPLACESEL, FALSE, (LPARAM)bufLine2);

fclose( stream );
AnswerRe: Read string at a certain point? Pin
Michael P Butler25-Apr-02 3:50
Michael P Butler25-Apr-02 3:50 
AnswerRe: Read string at a certain point? Pin
Alexandru Savescu25-Apr-02 3:54
Alexandru Savescu25-Apr-02 3:54 
AnswerRe: Read string at a certain point? Pin
Tim Smith25-Apr-02 3:57
Tim Smith25-Apr-02 3:57 
GeneralRe: Read string at a certain point? Pin
Aoife25-Apr-02 4:49
Aoife25-Apr-02 4:49 
Questionwho can help me? Pin
Atilla Selem25-Apr-02 3:08
Atilla Selem25-Apr-02 3:08 
AnswerRe: who can help me? Pin
Michael P Butler25-Apr-02 3:28
Michael P Butler25-Apr-02 3:28 
GeneralRe: who can help me? Pin
Atilla Selem25-Apr-02 3:54
Atilla Selem25-Apr-02 3:54 
Generaldifference between handle & instance Pin
Aviv Halperin25-Apr-02 3:02
Aviv Halperin25-Apr-02 3:02 
GeneralRe: difference between handle & instance Pin
Tim Smith25-Apr-02 3:31
Tim Smith25-Apr-02 3:31 
GeneralRe: difference between handle & instance Pin
moliate25-Apr-02 4:44
moliate25-Apr-02 4:44 
GeneralSetPixelColor for 8-bit bmp Pin
chen25-Apr-02 2:41
chen25-Apr-02 2:41 
GeneralRe: SetPixelColor for 8-bit bmp Pin
Mike Zinni25-Apr-02 3:14
Mike Zinni25-Apr-02 3:14 
GeneralClassWizard in Visual Studio.NET Pin
MarkyMark25-Apr-02 1:53
MarkyMark25-Apr-02 1:53 
GeneralRe: ClassWizard in Visual Studio.NET Pin
Shog925-Apr-02 4:59
sitebuilderShog925-Apr-02 4:59 
GeneralRe: ClassWizard in Visual Studio.NET Pin
MarkyMark25-Apr-02 5:01
MarkyMark25-Apr-02 5:01 
GeneralToolbar button Pin
Hans Ruck25-Apr-02 0:04
Hans Ruck25-Apr-02 0:04 
GeneralSolved Pin
Hans Ruck25-Apr-02 0:42
Hans Ruck25-Apr-02 0:42 

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.