Click here to Skip to main content
15,894,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionIDE Line numbers? Pin
29-Jun-02 12:20
suss29-Jun-02 12:20 
AnswerRe: IDE Line numbers? Pin
Ancient Dragon29-Jun-02 13:03
Ancient Dragon29-Jun-02 13:03 
AnswerRe: IDE Line numbers? Pin
Michael Dunn29-Jun-02 15:16
sitebuilderMichael Dunn29-Jun-02 15:16 
GeneralDirect3D and MDI windows Pin
29-Jun-02 11:28
suss29-Jun-02 11:28 
GeneralRe: Direct3D and MDI windows Pin
Mike Nordell29-Jun-02 23:47
Mike Nordell29-Jun-02 23:47 
Questionhow to add toolbar on a Dialog Pin
Speedy29-Jun-02 10:47
Speedy29-Jun-02 10:47 
AnswerRe: how to add toolbar on a Dialog Pin
Steve L.29-Jun-02 13:08
Steve L.29-Jun-02 13:08 
GeneralCString Basics Pin
29-Jun-02 10:36
suss29-Jun-02 10:36 
Hello, I'll admit i'm new to C++ and visual studio. Most of my programming experience comes from c# and php.

That said, I know basic C++, C, that kind of stuff, and am trying to learn to use visual C++.

So what I set out to do is make a simple dialog application that would take a input from a Edit control, change it into it's ASCII value, and replace the message with its ASCII value in the edit box.

Here is how I planed on doing it:

Take input-- UpdateData(FALSE); //get the data into the variable
Create byte array to store the chars in. (unsure)
Cycle through the bytes (for loop)
Extract the ASCII values and put them into a int array (no idea, can I
cast in visual C++, ie: (int) byte)
Somehow cycle through the int array and put them into a Cstring (unsure)

then UpdateData(TRUE) and put it back up...

So my questions:
1) Am I going about this in an ok way
2) Could I have a example of how you would put a CString into a byte array (I keep getting annoying errors about various stuff).
3) How can i get the ASCII value of a byte and put it into a int variable?
4) How can I cycle through a int array and put the values into a Cstring

Another annoying thing to me is that when i try and do

CString str;
str = "hello"
int lengh;
lengh = str.GetLengh();

I get a error that 'GetLengh' is not a member of 'CString', though according to MSDN it is.


Thanks for the help!

GeneralRe: CString Basics Pin
Nish Nishant29-Jun-02 11:24
sitebuilderNish Nishant29-Jun-02 11:24 
GeneralRe: CString Basics Pin
29-Jun-02 12:05
suss29-Jun-02 12:05 
GeneralRe: CString Basics Pin
Ancient Dragon29-Jun-02 12:46
Ancient Dragon29-Jun-02 12:46 
GeneralRe: CString Basics Pin
29-Jun-02 13:25
suss29-Jun-02 13:25 
GeneralRe: CString Basics Pin
Christian Graus29-Jun-02 13:30
protectorChristian Graus29-Jun-02 13:30 
GeneralRe: CString Basics Pin
29-Jun-02 13:39
suss29-Jun-02 13:39 
GeneralRe: CString Basics Pin
Christian Graus29-Jun-02 13:41
protectorChristian Graus29-Jun-02 13:41 
GeneralRe: CString Basics Pin
Ancient Dragon29-Jun-02 14:10
Ancient Dragon29-Jun-02 14:10 
GeneralRe: CString Basics Pin
Christian Graus29-Jun-02 14:35
protectorChristian Graus29-Jun-02 14:35 
GeneralRe: CString Basics Pin
Ancient Dragon29-Jun-02 14:08
Ancient Dragon29-Jun-02 14:08 
GeneralRe: CString Basics Pin
29-Jun-02 15:07
suss29-Jun-02 15:07 
GeneralRe: CString Basics Pin
Ancient Dragon29-Jun-02 15:12
Ancient Dragon29-Jun-02 15:12 
GeneralRe: CString Basics Pin
Jay Beckert29-Jun-02 15:20
Jay Beckert29-Jun-02 15:20 
GeneralRe: CString Basics Pin
Michael Dunn29-Jun-02 15:15
sitebuilderMichael Dunn29-Jun-02 15:15 
GeneralRe: CString Basics Pin
aldeba29-Jun-02 15:31
aldeba29-Jun-02 15:31 
GeneralSendMessage() to a common file Open/Save dialog, telling it to change path Pin
Jonatan Dahl29-Jun-02 10:35
Jonatan Dahl29-Jun-02 10:35 
GeneralRelase mode can't compile after use getaddrinfo in VS.net Pin
Hiusing29-Jun-02 5:38
Hiusing29-Jun-02 5:38 

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.