Click here to Skip to main content
16,007,472 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralTimer (without message map) Pin
Le Ridder Noir25-Sep-01 23:18
Le Ridder Noir25-Sep-01 23:18 
GeneralRe: Timer (without message map) Pin
Steen Krogsgaard26-Sep-01 0:23
Steen Krogsgaard26-Sep-01 0:23 
QuestionStatic initializers à la Java? Pin
Tom Nuydens25-Sep-01 23:07
Tom Nuydens25-Sep-01 23:07 
AnswerRe: Static initializers à la Java? Pin
Christian Graus25-Sep-01 23:21
protectorChristian Graus25-Sep-01 23:21 
AnswerRe: Static initializers à la Java? Pin
Tomasz Sowinski26-Sep-01 1:09
Tomasz Sowinski26-Sep-01 1:09 
AnswerRe: Static initializers à la Java? Pin
Tom Nuydens26-Sep-01 23:19
Tom Nuydens26-Sep-01 23:19 
Generalif ( yousaid.GetAt(current_pos) == "[A-Z]" ) Pin
Tryhard25-Sep-01 22:24
Tryhard25-Sep-01 22:24 
GeneralRe: if ( yousaid.GetAt(current_pos) == "[A-Z]" ) Pin
Christian Graus25-Sep-01 22:43
protectorChristian Graus25-Sep-01 22:43 
The function isalpha will tell you if a character is a letter, the other way is to get a char out, like this:

CString s("dsASdFDftSaSdAaasDdR");
char a = s[0];  // Use the index to get out the char, you can use s.GetLength() to iterate over them
if (a >= 'A' && a <= 'Z') // char automatically cats to int, which is why this works nicely.
{
    AfxMessageBox("Uppercase");
}


If you wanted to test a whole string you could do this:

CString s("dsASdFDftSaSdAaasDdR");
CString d(s);
d.MakeUpper();

if (s==d)
   AfxMessageBox("All Upper");


I'm sure someone else will suggest more intelligent ways of doing it, but those are the ways that spring to mind if you're using CString. If you were using basic_string you could do cool iterator stuff, but that is another story ( and CString is more useful than basic_string overall ).


Christian

As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.

Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
GeneralRe: if ( yousaid.GetAt(current_pos) == "[A-Z]" ) Pin
markkuk25-Sep-01 22:48
markkuk25-Sep-01 22:48 
QuestionHow to load ASP page from CDialog - very urgent Pin
Bartek25-Sep-01 22:02
Bartek25-Sep-01 22:02 
AnswerRe: How to load ASP page from CDialog - very urgent Pin
Michael P Butler25-Sep-01 22:10
Michael P Butler25-Sep-01 22:10 
GeneralRe: How to load ASP page from CDialog - very urgent Pin
Bartek25-Sep-01 23:57
Bartek25-Sep-01 23:57 
GeneralCreate Toolbar with 256 color Pin
Eugene Pustovoyt25-Sep-01 20:01
Eugene Pustovoyt25-Sep-01 20:01 
GeneralRe: Create Toolbar with 256 color Pin
Kannan Kalyanaraman26-Sep-01 2:08
Kannan Kalyanaraman26-Sep-01 2:08 
GeneralDLLs and shared variables - PLEASE HELP !!! Pin
dudy_boy25-Sep-01 19:06
dudy_boy25-Sep-01 19:06 
GeneralRe: DLLs and shared variables - PLEASE HELP !!! Pin
Jeremy Pullicino25-Sep-01 22:54
Jeremy Pullicino25-Sep-01 22:54 
GeneralPrinting Selected Nodes of Tree Pin
25-Sep-01 18:52
suss25-Sep-01 18:52 
GeneralNeed source for MP3 Encoder & Decoder Pin
sanskypotov25-Sep-01 18:45
sanskypotov25-Sep-01 18:45 
GeneralRe: Need source for MP3 Encoder & Decoder Pin
Paul A. Howes26-Sep-01 3:15
Paul A. Howes26-Sep-01 3:15 
GeneralFTP question : RFC 959 what's SMNT Pin
Amit Dey25-Sep-01 18:14
Amit Dey25-Sep-01 18:14 
Generalfirst time using c++ Pin
25-Sep-01 15:50
suss25-Sep-01 15:50 
GeneralRe: first time using c++ Pin
Anders Molin26-Sep-01 0:44
professionalAnders Molin26-Sep-01 0:44 
GeneralRe: first time using c++ Pin
26-Sep-01 13:09
suss26-Sep-01 13:09 
GeneralMFC DLL's in the wild Pin
Michael Martin25-Sep-01 14:54
professionalMichael Martin25-Sep-01 14:54 
GeneralRe: MFC DLL's in the wild Pin
Christian Graus25-Sep-01 16:09
protectorChristian Graus25-Sep-01 16:09 

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.