Home > Software engineering >  New people for help on the view class in MFC message response problem
New people for help on the view class in MFC message response problem

Time:09-28

Probably describe my question first:
1, I have three class, one is COffView, offline data here, and the base class is CFormView; A COnView, base class is CFormView, online data here; Third CDraw a drawing class, I asked him to inherit from CWnd class, at the time of drawing, so I'll COffView view pointer to CDraw inside, can realize the drawing, but finding a wm_paint message by redraw function at the time of response, will call COffView inside message function, if I want him to respond to my message response function of the drawing class, what should I do, or need to change frame?

CodePudding user response:

Suggest the original poster to compile the first link in debugging MSDN98 own relevant example code,
MSDN98_1. ISO http://pan.baidu.com/s/1dDF41ix, MSDN98_2. ISO http://pan.baidu.com/s/1bnGo0Vl

CodePudding user response:

Drawing CDraw must be introduced into the current of DC

CodePudding user response:

refer to the second floor schlafenhamster response:
drawing CDraw must be introduced into the current DC

Was introduced into the view can be drawing, pointer, and then use this view GetDC pointer to call, but there's problem is not the response message (including wm_paint, wm_size message),

CodePudding user response:

reference Daqianer reply: 3/f
Quote: refer to the second floor schlafenhamster response:

Drawing CDraw must be introduced into the current DC

Was introduced into the view can be drawing, pointer, and then use this view GetDC pointer to call, but there's problem is not the response message (including wm_paint, wm_size message),

Suggesting that these do not mix the wm_paint and DC
  • Related