Click here to Skip to main content
15,915,509 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Regular Expression in C++. How to? Pin
Atrament7-Jun-02 17:35
Atrament7-Jun-02 17:35 
GeneralRe: Regular Expression in C++. How to? Pin
Stuart Dootson9-Jun-02 15:33
professionalStuart Dootson9-Jun-02 15:33 
Generalactiveskin4.1 Pin
sai5-Jun-02 19:43
sai5-Jun-02 19:43 
GeneralRendering a bitmap on a CView Pin
Nish Nishant5-Jun-02 19:35
sitebuilderNish Nishant5-Jun-02 19:35 
GeneralRe: Rendering a bitmap on a CView Pin
Michael Dunn5-Jun-02 19:41
sitebuilderMichael Dunn5-Jun-02 19:41 
GeneralRe: Rendering a bitmap on a CView Pin
Nish Nishant5-Jun-02 19:54
sitebuilderNish Nishant5-Jun-02 19:54 
GeneralRe: Rendering a bitmap on a CView [is this the right way?] Pin
Nish Nishant5-Jun-02 19:47
sitebuilderNish Nishant5-Jun-02 19:47 
GeneralRe: Rendering a bitmap on a CView [is this the right way?] Pin
Tomasz Sowinski6-Jun-02 0:38
Tomasz Sowinski6-Jun-02 0:38 
When b's destructor is called, the bitmap is still selected into mdc device context. ::DeleteObject call silently fails and you have resource leak. You have to ensure that b isn't selected into any context when its C++ d'tor is executed. The tricky way is to change order of declarations of mdc and b. If mdc is second, it'll be destroyed first and your bitmap will be released.

Or - you can store CBitmap* returned from mdc.SelectObject call and re-select it after BitBlt.

Tomasz Sowinski -- http://www.shooltz.com

- It's for protection
- Protection from what? Zee Germans?

GeneralRe: Rendering a bitmap on a CView [is this the right way?] Pin
Nish Nishant6-Jun-02 0:56
sitebuilderNish Nishant6-Jun-02 0:56 
GeneralRe: Rendering a bitmap on a CView [is this the right way?] Pin
Tomasz Sowinski6-Jun-02 0:59
Tomasz Sowinski6-Jun-02 0:59 
GeneralRe: Rendering a bitmap on a CView [is this the right way?] Pin
Nish Nishant6-Jun-02 1:09
sitebuilderNish Nishant6-Jun-02 1:09 
GeneralRe: Rendering a bitmap on a CView [is this the right way?] Pin
Tomasz Sowinski6-Jun-02 1:13
Tomasz Sowinski6-Jun-02 1:13 
GeneralRe: Rendering a bitmap on a CView [is this the right way?] Pin
Nish Nishant6-Jun-02 1:29
sitebuilderNish Nishant6-Jun-02 1:29 
GeneralRe: Rendering a bitmap on a CView [is this the right way?] Pin
Tomasz Sowinski6-Jun-02 1:32
Tomasz Sowinski6-Jun-02 1:32 
GeneralRe: Rendering a bitmap on a CView [is this the right way?] Pin
Nish Nishant6-Jun-02 1:47
sitebuilderNish Nishant6-Jun-02 1:47 
GeneralRe: Rendering a bitmap on a CView [is this the right way?] Pin
Thomas Freudenberg6-Jun-02 0:32
Thomas Freudenberg6-Jun-02 0:32 
GeneralRe: Rendering a bitmap on a CView [is this the right way?] Pin
PJ Arends6-Jun-02 6:08
professionalPJ Arends6-Jun-02 6:08 
GeneralRe: Rendering a bitmap on a CView [is this the right way?] Pin
Nish Nishant6-Jun-02 0:59
sitebuilderNish Nishant6-Jun-02 0:59 
GeneralRe: Rendering a bitmap on a CView [is this the right way?] Pin
Nish Nishant6-Jun-02 14:16
sitebuilderNish Nishant6-Jun-02 14:16 
GeneralRe: Rendering a bitmap on a CView [is this the right way?] Pin
Thomas Freudenberg6-Jun-02 1:04
Thomas Freudenberg6-Jun-02 1:04 
GeneralRe: Rendering a bitmap on a CView [is this the right way?] Pin
Nish Nishant6-Jun-02 1:06
sitebuilderNish Nishant6-Jun-02 1:06 
GeneralRe: Rendering a bitmap on a CView [is this the right way?] Pin
lucy6-Jun-02 8:37
lucy6-Jun-02 8:37 
GeneralCDocument::DoSave -> undocumented Pin
Nish Nishant5-Jun-02 19:14
sitebuilderNish Nishant5-Jun-02 19:14 
GeneralRe: CDocument::DoSave -> undocumented Pin
Tomasz Sowinski6-Jun-02 0:30
Tomasz Sowinski6-Jun-02 0:30 
GeneralRe: CDocument::DoSave -> undocumented Pin
Nish Nishant6-Jun-02 1:04
sitebuilderNish Nishant6-Jun-02 1: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.