得到dialog的hdc

1.

HDC m_hdc= this->GetDC()->GetSafeHdc(); //this 是当前CDialog的指针,在Initial里面可以用.

 

2.

CPaintDC dc(this);

dc.GetSafeHdc();//在paint里面可以用这个,dc.GetSafeHdc()既为hdc.

posted on 2009-11-16 17:43  apple0809  阅读(210)  评论(0)    收藏  举报