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

C / C++ / MFC

 
QuestionCString accumulation Pin
tom groezer30-Jul-07 20:40
tom groezer30-Jul-07 20:40 
AnswerRe: CString accumulation Pin
Rage30-Jul-07 20:59
professionalRage30-Jul-07 20:59 
AnswerRe: CString accumulation Pin
Joe Smith IX30-Jul-07 21:19
Joe Smith IX30-Jul-07 21:19 
QuestionRegarding Interview Pin
tasumisra30-Jul-07 20:26
tasumisra30-Jul-07 20:26 
AnswerRe: Regarding Interview Pin
mandanani30-Jul-07 20:31
mandanani30-Jul-07 20:31 
GeneralRe: Regarding Interview Pin
Nelek30-Jul-07 21:42
protectorNelek30-Jul-07 21:42 
AnswerRe: Regarding Interview Pin
David Crow31-Jul-07 2:55
David Crow31-Jul-07 2:55 
QuestionGDI Object count Pin
Nishad S30-Jul-07 20:11
Nishad S30-Jul-07 20:11 
Hi,

I use WinXP. I noticed that if we create bursh or pen object and destroy them, the GDI object count that is seen in the task manager is not decreasing.

What I did is,

I created 20 brushes in a button click. Then the GDI object count is increased from 28 to 48. Then destroyed the objects in another button click. Now the GDI object count is 38. But if click the first button again the count is getting increased to only 48, means the objects are already destroyed but the count is not updated correctly.

Why this behaviour?

The code sample:

HGDIOBJ hBr[20];<br />
void CMyDlg::OnButtonCreate() <br />
{<br />
    for( int i = 0; i < 20; i++ ) hBr[i] = CreateSolidBrush( 0 );<br />
}<br />
<br />
void CMyDlg::OnButtonDestroy() <br />
{<br />
    for( int i = 0; i < 20; i++ ) DeleteObject( hBr[i] );<br />
}<br />


I tried it for pen objects, then the result is 28 to 48 on creation and 48 to 36 on destruction. But the 48 is stable for each creation similar to the brush, if the destruction is done for each creation.

But for font objects it is working fine. That is 28 to 48 on creation and 48 to 28 on destruction.

- NS -

AnswerRe: GDI Object count Pin
mandanani30-Jul-07 20:30
mandanani30-Jul-07 20:30 
GeneralRe: GDI Object count Pin
Nishad S30-Jul-07 20:57
Nishad S30-Jul-07 20:57 
QuestionOpenFile Pin
nitin330-Jul-07 19:12
nitin330-Jul-07 19:12 
AnswerRe: OpenFile Pin
prasad_som30-Jul-07 19:21
prasad_som30-Jul-07 19:21 
QuestionRe: OpenFile Pin
nitin330-Jul-07 19:57
nitin330-Jul-07 19:57 
AnswerRe: OpenFile Pin
Hamid_RT31-Jul-07 21:17
Hamid_RT31-Jul-07 21:17 
QuestionHow to change the size of the default scrollbar Pin
Nishad S30-Jul-07 18:39
Nishad S30-Jul-07 18:39 
AnswerRe: How to change the size of the default scrollbar Pin
Hans Dietrich30-Jul-07 20:07
mentorHans Dietrich30-Jul-07 20:07 
GeneralRe: How to change the size of the default scrollbar Pin
Nishad S30-Jul-07 20:15
Nishad S30-Jul-07 20:15 
QuestionReading Explorer.exe Address Bar work with 2K/XP but not Vista Pin
Hirakawa30-Jul-07 17:54
Hirakawa30-Jul-07 17:54 
QuestionRe: Reading Explorer.exe Address Bar work with 2K/XP but not Vista Pin
prasad_som30-Jul-07 19:23
prasad_som30-Jul-07 19:23 
AnswerRe: Reading Explorer.exe Address Bar work with 2K/XP but not Vista Pin
Hirakawa30-Jul-07 22:30
Hirakawa30-Jul-07 22:30 
GeneralRe: Reading Explorer.exe Address Bar work with 2K/XP but not Vista Pin
prasad_som30-Jul-07 22:55
prasad_som30-Jul-07 22:55 
GeneralRe: Reading Explorer.exe Address Bar work with 2K/XP but not Vista Pin
Hirakawa31-Jul-07 1:02
Hirakawa31-Jul-07 1:02 
GeneralRe: Reading Explorer.exe Address Bar work with 2K/XP but not Vista Pin
prasad_som31-Jul-07 2:48
prasad_som31-Jul-07 2:48 
AnswerRe: Reading Explorer.exe Address Bar work with 2K/XP but not Vista Pin
Naveen30-Jul-07 21:13
Naveen30-Jul-07 21:13 
GeneralRe: Reading Explorer.exe Address Bar work with 2K/XP but not Vista Pin
Hirakawa31-Jul-07 0:55
Hirakawa31-Jul-07 0:55 

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.