Click here to Skip to main content
15,898,538 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to find out unwanted DLL in a System? Pin
Alvaro Mendez14-Dec-01 7:16
Alvaro Mendez14-Dec-01 7:16 
GeneralTrying to manipulate CStdioFile Pin
Stevieslu14-Dec-01 6:37
Stevieslu14-Dec-01 6:37 
GeneralRe: Trying to manipulate CStdioFile Pin
Alvaro Mendez14-Dec-01 7:19
Alvaro Mendez14-Dec-01 7:19 
Generalimplementing powerpoint presentation slide show Pin
Kuniva14-Dec-01 5:37
Kuniva14-Dec-01 5:37 
GeneralEmail Pin
SuperGeek14-Dec-01 5:31
SuperGeek14-Dec-01 5:31 
GeneralRe: Email Pin
Andrew Peace15-Dec-01 4:14
Andrew Peace15-Dec-01 4:14 
Generalswitching Media player active-x control to full screen Pin
Kuniva14-Dec-01 5:13
Kuniva14-Dec-01 5:13 
GeneralConverting int to CString Pin
Cam14-Dec-01 4:53
Cam14-Dec-01 4:53 
First, a big "thank you" to everyone who has been helping me. I know I've been asking a lot of stupid questions, but once I get this stuff relearned, I think I'll be fine.

So, here's the next stupid question. I've got an integer, and and I want it in a CString. For example:

//Before
int myint = 123;

//After
CString mystring = "123";

The problem is that when I try to assign it directly, it puts the character with the ASCII value of the int into the string (I think). Anyway, then I looked up itoa in MSDN, and found a solution. But you must pass itoa a character array to store the resulting text in. Anyway, the only way I know to make it work is like this:

char cDay[3] = " ";
_itoa(theTime.GetDay(), cDay, 10);
CString Day = cDay;

Anyway, the basic idea is that I changed it from an int to a char array, and then from a char array to a CString. But I'm sure there's a way to leave out the char array and just do it directly. Thanks again.

~Cam Desautels (BinaryUprising.com)
GeneralRe: Converting int to CString Pin
Joaquín M López Muñoz14-Dec-01 4:59
Joaquín M López Muñoz14-Dec-01 4:59 
GeneralRe: Converting int to CString Pin
Cam14-Dec-01 5:09
Cam14-Dec-01 5:09 
GeneralRe: Converting int to CString Pin
Alvaro Mendez14-Dec-01 5:16
Alvaro Mendez14-Dec-01 5:16 
GeneralRe: Converting int to CString Pin
Cam14-Dec-01 5:48
Cam14-Dec-01 5:48 
QuestionHow to Change the 'Caption' of a CPropertyPage Pin
14-Dec-01 3:39
suss14-Dec-01 3:39 
AnswerRe: How to Change the 'Caption' of a CPropertyPage Pin
Joaquín M López Muñoz14-Dec-01 4:23
Joaquín M López Muñoz14-Dec-01 4:23 
GeneralCreating Excel files Pin
14-Dec-01 2:21
suss14-Dec-01 2:21 
QuestionHow do I create a "Virtual" Device Context? Pin
Jon Hulatt14-Dec-01 2:04
Jon Hulatt14-Dec-01 2:04 
AnswerRe: How do I create a "Virtual" Device Context? Pin
Joaquín M López Muñoz14-Dec-01 2:11
Joaquín M López Muñoz14-Dec-01 2:11 
GeneralRe: How do I create a "Virtual" Device Context? Pin
Jon Hulatt14-Dec-01 3:18
Jon Hulatt14-Dec-01 3:18 
GeneralRe: How do I create a "Virtual" Device Context? Pin
Jon Hulatt14-Dec-01 3:31
Jon Hulatt14-Dec-01 3:31 
GeneralAccessing .MDB files Pin
Cris14-Dec-01 2:02
Cris14-Dec-01 2:02 
GeneralOpening a new IE window Pin
Rob Caldecott14-Dec-01 0:25
Rob Caldecott14-Dec-01 0:25 
GeneralRe: Opening a new IE window Pin
Philip Patrick14-Dec-01 14:21
professionalPhilip Patrick14-Dec-01 14:21 
GeneralActiveX For Connecting Database Pin
San13-Dec-01 23:50
San13-Dec-01 23:50 
QuestionWho have a example of setting a picture as background in CRichEditView? Pin
white jungle13-Dec-01 23:03
white jungle13-Dec-01 23:03 
GeneralDummy dialog! Pin
Rickard Andersson2013-Dec-01 22:03
Rickard Andersson2013-Dec-01 22:03 

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.