Click here to Skip to main content
15,917,328 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Appending 2 RTF Strings together Pin
Zero_divide_11-Dec-03 5:43
Zero_divide_11-Dec-03 5:43 
GeneralrichEdit hook Pin
Anonymous29-Nov-03 16:37
Anonymous29-Nov-03 16:37 
GeneralConversion, string to int Pin
__Cerb29-Nov-03 16:33
__Cerb29-Nov-03 16:33 
GeneralRe: Conversion, string to int Pin
JWood29-Nov-03 18:10
JWood29-Nov-03 18:10 
GeneralRe: Conversion, string to int Pin
Michael Dunn29-Nov-03 19:45
sitebuilderMichael Dunn29-Nov-03 19:45 
GeneralRe: Conversion, string to int Pin
BaldwinMartin29-Nov-03 20:07
BaldwinMartin29-Nov-03 20:07 
GeneralRe: Conversion, string to int Pin
Scozturk29-Nov-03 22:58
professionalScozturk29-Nov-03 22:58 
GeneralRe: Conversion, string to int Pin
Ian Darling29-Nov-03 23:33
Ian Darling29-Nov-03 23:33 
Scolinks wrote:
You can use the atoi() function if it a CString.
If it is LPTSTR or some other string stuff I prefer writing them on an invisible static text box and retrieving them as an interger.
I hope this helps!

Well... I am a beginner ...


Yuck! (the static text box thing) But forgivable for a beginner (just Smile | :) )

I think it's time you were introduced to the boost library, and in particular the lexical_cast<> template.

Also note that an LPTSTR (long pointer to a TCHAR string) can be one of two things - a pointer to a char array (char *), or a pointer to a wide-char string (wchar_t *, which is a full type in VC.NET, and a typedef for short in VC6)

The T bit is the TCHAR thing mentioned earlier - TCHAR means char or wchar_t, depending on if you are building an ANSI/ASCII version of your code, or a UNICODE one.

I would suggest that you look up the relevant functions for conversions, which can handle unicode or ansi strings as necessary (eg, _tcstoul for converting a LPTSTR to an unsigned long).

HTH

--
Ian Darling
"The moral of the story is that with a contrived example, you can prove anything." - Joel Spolsky
QuestionHow to release a GDI+ object? Pin
YanBin29-Nov-03 16:04
YanBin29-Nov-03 16:04 
AnswerRe: How to release a GDI+ object? Pin
JWood29-Nov-03 18:18
JWood29-Nov-03 18:18 
AnswerRe: How to release a GDI+ object? Pin
JWood29-Nov-03 18:24
JWood29-Nov-03 18:24 
GeneralProblems with LPRECT.. Pin
__Cerb29-Nov-03 13:54
__Cerb29-Nov-03 13:54 
GeneralRe: Problems with LPRECT.. Pin
Bo Hunter29-Nov-03 14:05
Bo Hunter29-Nov-03 14:05 
GeneralRe: Problems with LPRECT.. Pin
Michael Dunn29-Nov-03 14:26
sitebuilderMichael Dunn29-Nov-03 14:26 
GeneralRe: Problems with LPRECT.. Pin
Gareth Johnson30-Nov-03 8:54
sussGareth Johnson30-Nov-03 8:54 
QuestionHow to get &quot;current&quot; window handle ? Pin
legrillon29-Nov-03 13:42
legrillon29-Nov-03 13:42 
AnswerRe: How to get &quot;current&quot; window handle ? Pin
Michael Dunn29-Nov-03 14:29
sitebuilderMichael Dunn29-Nov-03 14:29 
GeneralRe: How to get &quot;current&quot; window handle ? Pin
legrillon1-Dec-03 9:36
legrillon1-Dec-03 9:36 
GeneralRefreshBoundData behaves strange !! Pin
Hesham Amin29-Nov-03 9:01
Hesham Amin29-Nov-03 9:01 
GeneralC help! Pin
Anonymous29-Nov-03 8:53
Anonymous29-Nov-03 8:53 
GeneralRe: C help! Pin
JWood29-Nov-03 18:36
JWood29-Nov-03 18:36 
GeneralRe: C help! Pin
Anonymous30-Nov-03 10:19
Anonymous30-Nov-03 10:19 
GeneralWindowFromPoint() Pin
__Cerb29-Nov-03 7:45
__Cerb29-Nov-03 7:45 
GeneralRe: WindowFromPoint() Pin
DaFrawg29-Nov-03 9:13
DaFrawg29-Nov-03 9:13 
GeneralRe: WindowFromPoint() Pin
Michael Dunn29-Nov-03 9:14
sitebuilderMichael Dunn29-Nov-03 9:14 

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.