Click here to Skip to main content
15,895,011 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Record Number of Windows Pin
yfmain25-Sep-03 0:31
yfmain25-Sep-03 0:31 
GeneralBOOL and bool Pin
Saurabh_Delhi25-Sep-03 0:12
Saurabh_Delhi25-Sep-03 0:12 
GeneralRe: BOOL and bool Pin
RChin25-Sep-03 0:47
RChin25-Sep-03 0:47 
GeneralRe: BOOL and bool Pin
Dangleberry25-Sep-03 1:12
sussDangleberry25-Sep-03 1:12 
GeneralRe: BOOL and bool Pin
Michael Dunn25-Sep-03 4:52
sitebuilderMichael Dunn25-Sep-03 4:52 
GeneralRe: BOOL and bool Pin
vcplusplus25-Sep-03 5:02
vcplusplus25-Sep-03 5:02 
Generalfingerprints recognition Pin
jimmy_me24-Sep-03 23:35
jimmy_me24-Sep-03 23:35 
QuestionSelectObject? Pin
Zizilamoroso24-Sep-03 23:33
Zizilamoroso24-Sep-03 23:33 
Right now, I'm doing this:
CPaintDC dc(this);<br />
CBrush brush(RGB(255,0,0));<br />
HBRUSH oldbrush=(HBRUSH)dc.SelectObject(&brush);<br />
...<br />
dc.SelectObject(oldbrush);


It works, but there's a HUGH memory leak. Frown | :( If I remove the SelectObject() lines, there's no leak anymore, so I assume that it's the SelectObject(), or the Brush maybe. But objects are destroyed at the end of the scope, no?

Is there another solution that guarantees complete release of resources?



using: [VISUAL STUDIO 6.0 sp5] [WIN98/2]

AnswerRe: SelectObject? Pin
Anonymous24-Sep-03 23:46
Anonymous24-Sep-03 23:46 
AnswerRe: SelectObject? Pin
Steve S25-Sep-03 1:00
Steve S25-Sep-03 1:00 
GeneralRe: SelectObject? Pin
Zizilamoroso25-Sep-03 1:37
Zizilamoroso25-Sep-03 1:37 
GeneralRe: SelectObject? Pin
Steve S25-Sep-03 1:40
Steve S25-Sep-03 1:40 
GeneralRe: SelectObject? Pin
Zizilamoroso25-Sep-03 1:55
Zizilamoroso25-Sep-03 1:55 
GeneralRe: SelectObject? Pin
Steve S25-Sep-03 2:08
Steve S25-Sep-03 2:08 
GeneralRe: SelectObject? Pin
Zizilamoroso25-Sep-03 3:46
Zizilamoroso25-Sep-03 3:46 
GeneralRe: SelectObject? Pin
Zizilamoroso25-Sep-03 4:03
Zizilamoroso25-Sep-03 4:03 
GeneralDebugger Pin
Rage24-Sep-03 23:26
professionalRage24-Sep-03 23:26 
GeneralRe: Debugger Pin
JWood25-Sep-03 6:24
JWood25-Sep-03 6:24 
GeneralMFC Dialog Pin
hph24-Sep-03 23:06
hph24-Sep-03 23:06 
GeneralRe: MFC Dialog Pin
YaronNir24-Sep-03 23:12
YaronNir24-Sep-03 23:12 
Questionhow to save a flash in a webpage as a jpg/gif/bmp file? Pin
zhongxunyang24-Sep-03 22:33
zhongxunyang24-Sep-03 22:33 
AnswerRe: how to save a flash in a webpage as a jpg/gif/bmp file? Pin
Terry O'Nolley27-Sep-03 8:32
Terry O'Nolley27-Sep-03 8:32 
GeneralRe: how to save a flash in a webpage as a jpg/gif/bmp file? Pin
zhongxunyang27-Sep-03 14:50
zhongxunyang27-Sep-03 14:50 
Questionwho can help me about the serial port comunication? Pin
whelk24-Sep-03 21:51
whelk24-Sep-03 21:51 
Questionhow to get the paper name Pin
ashxly24-Sep-03 21:04
ashxly24-Sep-03 21:04 

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.