Click here to Skip to main content
15,920,217 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDesign question. Pin
Maximilien6-Mar-03 3:06
Maximilien6-Mar-03 3:06 
GeneralRe: Design question. Pin
Joel Lucsy6-Mar-03 13:51
Joel Lucsy6-Mar-03 13:51 
GeneralWrite Image of CD-ROM Pin
Andrea Ferraro6-Mar-03 2:53
Andrea Ferraro6-Mar-03 2:53 
GeneralRe: Write Image of CD-ROM Pin
Anonymous6-Mar-03 3:03
Anonymous6-Mar-03 3:03 
Generalproblem with new operator constructing GDI+ classes Pin
Baris Kurtlutepe6-Mar-03 2:40
Baris Kurtlutepe6-Mar-03 2:40 
GeneralRe: problem with new operator constructing GDI+ classes Pin
56789012346-Mar-03 2:58
56789012346-Mar-03 2:58 
GeneralRe: problem with new operator constructing GDI+ classes Pin
Joel Lucsy6-Mar-03 2:58
Joel Lucsy6-Mar-03 2:58 
GeneralRe: problem with new operator constructing GDI+ classes Pin
Baris Kurtlutepe6-Mar-03 3:47
Baris Kurtlutepe6-Mar-03 3:47 
Thanks for the comments, though I know that it works without defining DEBUG_NEW or with using the new operator from globalnamespace (i.e. ::new) as described in Benjamin's comment, but does anyone have any idea why it doesn't work with GDI+ classes? I mean there must be some error somewhere, since the debug_new operator seems to work fine with classes who take parameters in their constructors but not with GDI+.

For example I have created a class with
class CTest  <br />
{<br />
public:<br />
	CTest();<br />
	CTest(int x);<br />
	virtual ~CTest();<br />
};<br />


and it works fine by

CTest* test = new CTest(3);

and further testing.. tadaa I found the error! Smile | :)

if your class lacks a constructor without parameters (so do the GDI+ classes), as in:
class CTest  <br />
{<br />
public:<br />
	CTest(int x);<br />
	virtual ~CTest();<br />
};<br />


the debug new operator fails on the following line:
<br />
CTest* test = new CTest(3);<br />


Must be a bug or a lazy implementation.

edit:
That wasn't true, I retested it and debug_new works with the CTest class in both cases.
I'm pretty confused by now.. Confused | :confused:
Generalturn off "are you sure you want to delete?" NonVS question Pin
ns6-Mar-03 1:21
ns6-Mar-03 1:21 
GeneralRe: turn off "are you sure you want to delete?" NonVS question Pin
-Dy6-Mar-03 1:35
-Dy6-Mar-03 1:35 
Generalthanks! Pin
ns6-Mar-03 1:37
ns6-Mar-03 1:37 
GeneralMember functions are "unresolved external symbol" Pin
Rickard Andersson206-Mar-03 0:47
Rickard Andersson206-Mar-03 0:47 
GeneralRe: Member functions are "unresolved external symbol" Pin
Rage6-Mar-03 0:55
professionalRage6-Mar-03 0:55 
GeneralRe: Member functions are "unresolved external symbol" Pin
Rickard Andersson206-Mar-03 2:40
Rickard Andersson206-Mar-03 2:40 
GeneralRe: Member functions are "unresolved external symbol" Pin
Brian Shifrin6-Mar-03 1:39
Brian Shifrin6-Mar-03 1:39 
GeneralRe: Member functions are "unresolved external symbol" Pin
Rickard Andersson206-Mar-03 2:46
Rickard Andersson206-Mar-03 2:46 
GeneralRasEnumEntries please help Pin
Jump_Around6-Mar-03 0:45
Jump_Around6-Mar-03 0:45 
GeneralRe: RasEnumEntries please help Pin
Rickard Andersson206-Mar-03 0:52
Rickard Andersson206-Mar-03 0:52 
GeneralRe: RasEnumEntries please help Pin
João Paulo Figueira6-Mar-03 1:05
professionalJoão Paulo Figueira6-Mar-03 1:05 
GeneralRe: RasEnumEntries please help Pin
Martyn Pearson6-Mar-03 3:07
Martyn Pearson6-Mar-03 3:07 
GeneralRe: RasEnumEntries please help Pin
Jump_Around6-Mar-03 3:10
Jump_Around6-Mar-03 3:10 
GeneralRe: RasEnumEntries please help Pin
Big Art6-Mar-03 8:14
Big Art6-Mar-03 8:14 
GeneralProblems using CFormView Pin
nutkase6-Mar-03 0:37
nutkase6-Mar-03 0:37 
GeneralRe: Problems using CFormView Pin
Hans Ruck6-Mar-03 1:18
Hans Ruck6-Mar-03 1:18 
GeneralRe: Problems using CFormView Pin
nutkase6-Mar-03 1:31
nutkase6-Mar-03 1:31 

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.