Click here to Skip to main content
15,886,873 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Replacing my Menu with Default Menu of CFomView Pin
*Dreamz17-Jul-06 3:09
*Dreamz17-Jul-06 3:09 
GeneralRe: Replacing my Menu with Default Menu of CFomView Pin
Uday Janaswamy17-Jul-06 3:25
Uday Janaswamy17-Jul-06 3:25 
GeneralRe: Replacing my Menu with Default Menu of CFomView Pin
*Dreamz17-Jul-06 3:34
*Dreamz17-Jul-06 3:34 
QuestionPorting C++ code from linux to Windows Pin
learning_a_lot17-Jul-06 2:14
learning_a_lot17-Jul-06 2:14 
AnswerRe: Porting C++ code from linux to Windows Pin
Cedric Moonen17-Jul-06 2:31
Cedric Moonen17-Jul-06 2:31 
AnswerRe: Porting C++ code from linux to Windows [modified] Pin
markkuk17-Jul-06 2:34
markkuk17-Jul-06 2:34 
GeneralRe: Porting C++ code from linux to Windows Pin
learning_a_lot17-Jul-06 4:52
learning_a_lot17-Jul-06 4:52 
AnswerRe: Porting C++ code from linux to Windows Pin
Rilhas21-Jul-06 13:10
Rilhas21-Jul-06 13:10 
I have found some problems in porting LINUX to WIN32 that contradict things that have been stated here. Specifically, the general idea of what is ANSI varies from person to person. The main problem I found is in these situations:

void some_function(char* string, long string_size) {
char buffer[string_size+1];
strcpy(buffer, string);
...
}

This code typically compiles with GCC, but not in WIN32 because "string_size" is not a constant. Technically, there is no real reason for this code not to compile, since it is perfectly possible to generate machine code for these kinds of instructions. However, I don't know how to get it to compile in WIN32. So, I find these compilations errors, and change them to something like:

void some_function(char* string, long string_size) {
char buffer[MAX_STRING_SIZE+1];
MyAssertSize(string_size, MAX_STRING_SIZE);
strcpy(buffer, string);
...
}

The MAX_STRING_SIZE is defined to be the maximum string size, and the MyAssertSize() is a macro (#define) that generates a controlled error if the requested size happens to be larger than the defined value.

Anyway, these are the hardest problems I have found. But, in general, you can expect code to compile but also expect tons of wornings. I have grown acustomed to living with them.

I hope this helps,
Rilhas



Questionhow to print from MFC to command Line Pin
kanna_p17-Jul-06 1:56
kanna_p17-Jul-06 1:56 
AnswerRe: how to print from MFC to command Line Pin
see me17-Jul-06 2:03
see me17-Jul-06 2:03 
QuestionRe: how to print from MFC to command Line Pin
David Crow17-Jul-06 2:40
David Crow17-Jul-06 2:40 
AnswerRe: how to print from MFC to command Line Pin
Monty217-Jul-06 3:08
Monty217-Jul-06 3:08 
AnswerRe: how to print from MFC to command Line Pin
kanna_p17-Jul-06 17:47
kanna_p17-Jul-06 17:47 
GeneralRe: how to print from MFC to command Line Pin
David Crow18-Jul-06 2:38
David Crow18-Jul-06 2:38 
AnswerRe: how to print from MFC to command Line Pin
earl17-Jul-06 4:50
earl17-Jul-06 4:50 
QuestionHINSTANCE for DLL Pin
Manjunath S17-Jul-06 1:50
Manjunath S17-Jul-06 1:50 
AnswerRe: HINSTANCE for DLL Pin
Nibu babu thomas17-Jul-06 1:55
Nibu babu thomas17-Jul-06 1:55 
QuestionRe: HINSTANCE for DLL Pin
David Crow17-Jul-06 2:42
David Crow17-Jul-06 2:42 
QuestionRe: HINSTANCE for DLL Pin
Manjunath S17-Jul-06 3:35
Manjunath S17-Jul-06 3:35 
QuestionAfter AfxBeginthread... Pin
Smith#17-Jul-06 1:18
Smith#17-Jul-06 1:18 
AnswerRe: After AfxBeginthread... Pin
see me17-Jul-06 1:54
see me17-Jul-06 1:54 
AnswerRe: After AfxBeginthread... Pin
ThatsAlok17-Jul-06 2:17
ThatsAlok17-Jul-06 2:17 
AnswerRe: After AfxBeginthread... Pin
tanvon malik17-Jul-06 2:49
tanvon malik17-Jul-06 2:49 
QuestionHow get a list of LogSources ? Pin
fx920017-Jul-06 0:22
fx920017-Jul-06 0:22 
Questionis this the correct/best way to set file size? [modified] Pin
George_George17-Jul-06 0:09
George_George17-Jul-06 0: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.