Click here to Skip to main content
16,004,924 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Method overloading Pin
Jun Du2-Jul-06 9:41
Jun Du2-Jul-06 9:41 
QuestionUsing OpenProcess Pin
capricious_0012-Jul-06 1:29
capricious_0012-Jul-06 1:29 
AnswerRe: Using OpenProcess Pin
ovidiucucu2-Jul-06 1:56
ovidiucucu2-Jul-06 1:56 
GeneralRe: Using OpenProcess Pin
capricious_0012-Jul-06 1:59
capricious_0012-Jul-06 1:59 
GeneralRe: Using OpenProcess [modified] Pin
ovidiucucu2-Jul-06 2:17
ovidiucucu2-Jul-06 2:17 
GeneralRe: Using OpenProcess Pin
capricious_0012-Jul-06 4:08
capricious_0012-Jul-06 4:08 
QuestionAssertion faliur when window is min and then max [modified] Pin
Tara142-Jul-06 1:18
Tara142-Jul-06 1:18 
AnswerRe: Assertion faliur when window is min and then max [modified] Pin
ovidiucucu2-Jul-06 2:14
ovidiucucu2-Jul-06 2:14 

  • First
    Check if m_bitmap has already a bitmap attached:
    if(NULL == m_bitmap.GetSafeHandle())
    {
       m_bitmap.LoadBitmap (IDB_MJ_SOFTWARE);
    }

  • Second
    DO NOT delete a GDI object which is currently selected in a device context.
    Set it free by a call of dc.SelectObject(oldbrush) BEFORE calling mybrush.DeleteObject().

Aside note: in your code it's not even necessary to call mybrush.DeleteObject() because anyhow it is deleted when out-of-scope.

Ovidiu Cucu
Microsoft MVP - Visual C++

-- modified at 3:23 Monday 3rd July, 2006
GeneralRe: Assertion faliur when window is min and then max Pin
Tara142-Jul-06 2:34
Tara142-Jul-06 2:34 
GeneralRe: Assertion faliur when window is min and then max Pin
ovidiucucu2-Jul-06 21:29
ovidiucucu2-Jul-06 21:29 
GeneralRe: Assertion faliur when window is min and then max Pin
Tara142-Jul-06 21:48
Tara142-Jul-06 21:48 
AnswerRe: Assertion faliur when window is min and then max Pin
Hamid_RT2-Jul-06 19:22
Hamid_RT2-Jul-06 19:22 
QuestionCRichEditCtrl - calculate how many visible lines? Pin
rambuts2-Jul-06 1:11
rambuts2-Jul-06 1:11 
Questionreverse of QueryDosDevice Pin
Mila0251-Jul-06 23:52
Mila0251-Jul-06 23:52 
AnswerRe: reverse of QueryDosDevice Pin
Randor 2-Jul-06 0:20
professional Randor 2-Jul-06 0:20 
Questionscrolling text Pin
locoone1-Jul-06 22:04
locoone1-Jul-06 22:04 
AnswerRe: scrolling text Pin
ovidiucucu2-Jul-06 2:25
ovidiucucu2-Jul-06 2:25 
QuestionWhy can't this code translate VK_UP into VK_SHIFT+VK_TAB Pin
zouchao11121-Jul-06 21:55
zouchao11121-Jul-06 21:55 
QuestionExisting File [modified] Pin
Moujan1-Jul-06 19:58
Moujan1-Jul-06 19:58 
AnswerRe: Existing File Pin
Taka Muraoka1-Jul-06 20:07
Taka Muraoka1-Jul-06 20:07 
GeneralRe: Existing File Pin
Moujan1-Jul-06 20:35
Moujan1-Jul-06 20:35 
Questionduplicate definitions Pin
Moujan1-Jul-06 17:17
Moujan1-Jul-06 17:17 
AnswerRe: duplicate definitions Pin
Steve Echols1-Jul-06 18:03
Steve Echols1-Jul-06 18:03 
GeneralRe: duplicate definitions Pin
Moujan1-Jul-06 18:22
Moujan1-Jul-06 18:22 
QuestionSystem Wide hook for file save as dialog in All applications Pin
Mo12341-Jul-06 6:46
Mo12341-Jul-06 6:46 

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.