Home > Software engineering >  MFC Cdialog OnPaint drawing
MFC Cdialog OnPaint drawing

Time:09-24

Docs more, click on the tree control nodes, and according to the tree control nodes incoming data, display Cdialog (OnPaint drawings); Click different tree control node will show different OnPaint draw graphics (OnPaint plot is determined by the incoming data), have a problem now is that after click the tree control nodes OnPaint not redrawn, how to pass data to make dialog call OnPaint drawing again?

CodePudding user response:

Add: display the dialog box is embedded in a DockPane

CodePudding user response:

"Not to redraw" send dialog:
RedrawWindow
Or
Invalidate ()
UpdateWindow ()

CodePudding user response:

PDialog - & gt; Invalidate ().

CodePudding user response:

refer to the second floor schlafenhamster response:
"not to redraw" send dialog:
RedrawWindow
Or
Invalidate ()
UpdateWindow ()
use Invalidate () program will interrupt, variable always show hWnd unused

CodePudding user response:

reference hhhh63 reply: 3/f
pDialog - & gt; Invalidate ().
this will directly interrupt program

CodePudding user response:

Dialog window must exist! (a child window)

CodePudding user response:

reference 5 floor xiangsui0812 reply:
Quote: refer to the third floor hhhh63 response:

PDialog - & gt; Invalidate ().
this will directly interrupt program

Pointer is not initialized

CodePudding user response:

refer to 7th floor hhhh63 response:
Quote: refer to fifth floor xiangsui0812 response:

Quote: refer to the third floor hhhh63 response:

PDialog - & gt; Invalidate ().
this will directly interrupt program

Pointer uninitialized
where this pointer should excuse me I go to initialize?

CodePudding user response:

How do you create the dialog box is?

CodePudding user response:

refer to the eighth floor xiangsui0812 response:
where this pointer should excuse me I go to initialize?

Set a member variable
M_pDialog=new YouDialog ()

CodePudding user response:

references 9 f schlafenhamster response:
your dialog box is how to create?
my dialog is created in a DOCKPANE

CodePudding user response:

references to the tenth floor hhhh63 response:
Quote: refer to the eighth floor xiangsui0812 response:

Excuse me where I should get to initialize the pointer?

Set a member variable
M_pDialog=new YouDialog ()

this would cause interrupt

CodePudding user response:

CDockablePane?

CodePudding user response:

http://blog.sina.com.cn/s/blog_73428e9a0101i6gr.html
Embedded in the CDockablePane dialog box ""

CodePudding user response:

The
refer to 12 floor xiangsui0812 reply:
Quote: reference to the tenth floor hhhh63 response:

Set a member variable
M_pDialog=new YouDialog ()

this would cause interrupt
stick this code out and have a look
  • Related