Click here to Skip to main content
15,914,070 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralColored Combo Box Pin
sergeyv200220-Jun-05 8:36
sergeyv200220-Jun-05 8:36 
GeneralRe: Colored Combo Box Pin
David Crow20-Jun-05 9:47
David Crow20-Jun-05 9:47 
GeneralRe: Colored Combo Box Pin
sergeyv200220-Jun-05 10:40
sergeyv200220-Jun-05 10:40 
GeneralRe: Colored Combo Box Pin
David Crow20-Jun-05 10:54
David Crow20-Jun-05 10:54 
GeneralBinary Decision Diagram Pin
Member 142769220-Jun-05 7:26
Member 142769220-Jun-05 7:26 
GeneralRe: Binary Decision Diagram Pin
Toni7820-Jun-05 15:49
Toni7820-Jun-05 15:49 
GeneralRe: Binary Decision Diagram Pin
Member 142769220-Jun-05 18:46
Member 142769220-Jun-05 18:46 
Generalcan't find substrings in string Pin
Anonymous20-Jun-05 5:31
Anonymous20-Jun-05 5:31 
I have a text file where the contents are written all in 2 very long lines. My C++ program looks through it searching for an occurance of a certain string. However, my program says that it never finds that string, even though I know that there are several occurances of it (I checked the file), I know the file is in unicode, and my program is set to work with unicode with a _T() macro used to declare the string. I also told my program to look for another string, which it finds one occurance of (even though there are also several of them). Now, I suspect this might have something to do with how the CString::Find works. I read the file by lines into a buffer using CStdioFile::ReadString, then I have several if statements, the first asking if file.Find(string2) != -1 && file.Find(string1) == -1, the second if file.Find(string1) != -1 && file.Find(string2) == -1, the third if file.Find(string2) < file.Find(string1) and last if file.Find(string1) < file.Find(string2). The only thing I can think of that could be preventing my program from finding all instances of these strings is if CString::Find keeps track of where it left off. So for example if the string is _T("dog, cat, mouse") and I used string.Find(_T("cat")), then the pointer is set after the car and I can no longer search for string.Find(_T("dog"))? Can someone tell me if this is indeed the case, and if not suggest something else that could be causing this. Thanks.
GeneralRe: can't find substrings in string Pin
toxcct20-Jun-05 5:51
toxcct20-Jun-05 5:51 
GeneralRe: can't find substrings in string Pin
Cedric Moonen20-Jun-05 6:30
Cedric Moonen20-Jun-05 6:30 
GeneralRe: can't find substrings in string Pin
Rage20-Jun-05 5:53
professionalRage20-Jun-05 5:53 
GeneralRe: can't find substrings in string Pin
David Crow20-Jun-05 6:20
David Crow20-Jun-05 6:20 
GeneralCalling SetWindowTitle Just After Dialog Creation Causes Illegal Operation Pin
yccheok20-Jun-05 5:09
yccheok20-Jun-05 5:09 
GeneralRe: Calling SetWindowTitle Just After Dialog Creation Causes Illegal Operation Pin
David Crow20-Jun-05 5:14
David Crow20-Jun-05 5:14 
GeneralRe: Calling SetWindowTitle Just After Dialog Creation Causes Illegal Operation Pin
Rage20-Jun-05 5:38
professionalRage20-Jun-05 5:38 
GeneralRe: Calling SetWindowTitle Just After Dialog Creation Causes Illegal Operation Pin
Alexander M.,20-Jun-05 9:27
Alexander M.,20-Jun-05 9:27 
Generalstrange voodoo going on!!! Pin
bisserke20-Jun-05 5:03
bisserke20-Jun-05 5:03 
GeneralRe: strange voodoo going on!!! Pin
David Crow20-Jun-05 5:11
David Crow20-Jun-05 5:11 
GeneralRe: strange voodoo going on!!! Pin
bisserke20-Jun-05 5:17
bisserke20-Jun-05 5:17 
GeneralRe: strange voodoo going on!!! Pin
David Crow20-Jun-05 5:20
David Crow20-Jun-05 5:20 
GeneralRe: strange voodoo going on!!! Pin
bisserke20-Jun-05 5:29
bisserke20-Jun-05 5:29 
GeneralRe: strange voodoo going on!!! Pin
Chris Losinger20-Jun-05 5:18
professionalChris Losinger20-Jun-05 5:18 
GeneralRe: strange voodoo going on!!! Pin
bisserke20-Jun-05 5:31
bisserke20-Jun-05 5:31 
GeneralRe: strange voodoo going on!!! Pin
John R. Shaw20-Jun-05 7:00
John R. Shaw20-Jun-05 7:00 
GeneralCPropertyPage and OnWizardBack Pin
Brigg Thorp20-Jun-05 4:56
Brigg Thorp20-Jun-05 4:56 

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.