Click here to Skip to main content
15,889,216 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCreate a toplevel window in SDI Pin
AnTri12-Nov-05 9:24
AnTri12-Nov-05 9:24 
AnswerRe: Create a toplevel window in SDI Pin
Trollslayer12-Nov-05 9:59
mentorTrollslayer12-Nov-05 9:59 
GeneralRe: Create a toplevel window in SDI Pin
AnTri12-Nov-05 10:08
AnTri12-Nov-05 10:08 
QuestionSort Arrow Erased on inital drawing Pin
RobertW10012-Nov-05 9:11
RobertW10012-Nov-05 9:11 
AnswerRe: Sort Arrow Erased on inital drawing Pin
Michael Dunn13-Nov-05 12:41
sitebuilderMichael Dunn13-Nov-05 12:41 
QuestionOverloading "operator new" Pin
Obi Wan 212-Nov-05 4:26
Obi Wan 212-Nov-05 4:26 
AnswerRe: Overloading "operator new" Pin
Bob Stanneveld12-Nov-05 4:54
Bob Stanneveld12-Nov-05 4:54 
GeneralRe: Overloading "operator new" Pin
Obi Wan 212-Nov-05 6:00
Obi Wan 212-Nov-05 6:00 
Bob:

Thanks...

The reference you send is helpful.

In actuality (not clear in my example), the new and delete overloads are not global. They are within the class definition brackets.

The constructors have not been declared private. It is unclear to me why this would be necessary or useful.

The example in the reference says that the source line "new( 'user_args' )" is expanded to "new( 'type_size', 'user_args' )", which seems to be the case. In that case, 'type_size' is the total object size; in my case, 'type_size' is the class size without any appended data and 'user_args' is the additional allocation. The problem is that the actual size of the class is 'type_size' + 'user_args'. I'm not sure how the compiler would know how to create a temporary object, being unaware of the total size.

-Obi Wan 2
GeneralRe: Overloading "operator new" Pin
Bob Stanneveld13-Nov-05 2:37
Bob Stanneveld13-Nov-05 2:37 
QuestionKeyboard Hook Pin
#realJSOP12-Nov-05 3:39
mve#realJSOP12-Nov-05 3:39 
AnswerRe: Keyboard Hook Pin
Mircea Puiu12-Nov-05 3:44
Mircea Puiu12-Nov-05 3:44 
GeneralRe: Keyboard Hook Pin
#realJSOP12-Nov-05 4:53
mve#realJSOP12-Nov-05 4:53 
GeneralRe: Keyboard Hook Pin
Jack Puppy12-Nov-05 6:14
Jack Puppy12-Nov-05 6:14 
GeneralRe: Keyboard Hook Pin
Mircea Puiu12-Nov-05 9:01
Mircea Puiu12-Nov-05 9:01 
GeneralRe: Keyboard Hook Pin
#realJSOP13-Nov-05 2:09
mve#realJSOP13-Nov-05 2:09 
GeneralRe: Keyboard Hook Pin
Mircea Puiu13-Nov-05 5:06
Mircea Puiu13-Nov-05 5:06 
AnswerRe: Keyboard Hook Pin
Michael Dunn13-Nov-05 12:46
sitebuilderMichael Dunn13-Nov-05 12:46 
QuestionTV Tuner Capture Pin
Identity Undisclosed12-Nov-05 3:36
Identity Undisclosed12-Nov-05 3:36 
AnswerRe: TV Tuner Capture Pin
Digaleet12-Nov-05 12:51
Digaleet12-Nov-05 12:51 
AnswerRe: TV Tuner Capture Pin
LaHaHa12-Nov-05 21:01
LaHaHa12-Nov-05 21:01 
Question*.vcproj Is this a VC++ file Pin
vikas amin12-Nov-05 2:07
vikas amin12-Nov-05 2:07 
AnswerRe: *.vcproj Is this a VC++ file Pin
Mircea Puiu12-Nov-05 3:39
Mircea Puiu12-Nov-05 3:39 
AnswerRe: *.vcproj Is this a VC++ file Pin
Gary R. Wheeler12-Nov-05 6:25
Gary R. Wheeler12-Nov-05 6:25 
GeneralRe: *.vcproj Is this a VC++ file Pin
vikas amin12-Nov-05 21:16
vikas amin12-Nov-05 21:16 
Question*.vcproj Is this a VC++ file Pin
vikas amin12-Nov-05 2:06
vikas amin12-Nov-05 2:06 

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.