Click here to Skip to main content
15,918,889 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Lots of check boxes... Pin
liquid_22-Jun-05 7:12
liquid_22-Jun-05 7:12 
GeneralRe: Lots of check boxes... Pin
Jose Lamas Rios22-Jun-05 16:17
Jose Lamas Rios22-Jun-05 16:17 
GeneralCOM-port mistery Pin
tomek1821-Jun-05 21:44
tomek1821-Jun-05 21:44 
GeneralRe: COM-port mistery Pin
Cedric Moonen21-Jun-05 21:51
Cedric Moonen21-Jun-05 21:51 
GeneralRe: COM-port mistery Pin
tomek1821-Jun-05 22:00
tomek1821-Jun-05 22:00 
QuestionHow to change the CListCtrl control's Header(column) background color Pin
Girish60121-Jun-05 20:09
Girish60121-Jun-05 20:09 
AnswerRe: How to change the CListCtrl control's Header(column) background color Pin
DiWa21-Jun-05 21:26
DiWa21-Jun-05 21:26 
Generalviews in dialog Pin
asdeshmukh21-Jun-05 19:35
asdeshmukh21-Jun-05 19:35 
Hi,

I have created a CWnd in a CPropertyPage. I want to display some drawing inside the CWnd. How can this be achieved?
I tried the following approaches but did not succeed:
1) Tried creating CWnd object in the CPropertyPage class and then override the OnInit function to draw . I used the GetDC() to get the CDC and then the GetSafeHandle() function to get the HDC. I used this handle to render my drawing. The CWnd was created but the drawing is not displayed.
2) According to a suggestion from a colleague, I tried creating separate class for the CWnd object. This was to let me override the OnPaint function of the CWnd object.
My code in OnPaint function is as follows:

PAINTSTRUCT ps;

CDC * dc = this->BeginPaint(&ps);

//draw function takes in the CDC * dc obtained in fuction above
draw();

this->EndPaint( &ps );

Then I created a object of this class in CPropertyPage class. I tried calling the create function in the constructor and OnCreate function of the property page. Here again I could at the most get my window displayed but no drawing.

Any suggestions on how to achieve this?

Also, does MFC basically support GDI in CWnd objects when created as child window of a dialog or property page?

P.S. to make sure that the code to draw is working correctly, I tried testin that by having the rendering in a document using the view class. It works correctly i.e. I can get the display in a document window but cannot get it in dialog window or to be precise CWnd instance.

Thanks in advance for your help.

Regards,
Abhijit Deshmukh
Generalincluding custom font in app Pin
maruku21-Jun-05 19:35
maruku21-Jun-05 19:35 
GeneralRe: including custom font in app Pin
Chris Losinger22-Jun-05 3:24
professionalChris Losinger22-Jun-05 3:24 
GeneralBinding socket not working in win98 Pin
dasnov21-Jun-05 19:22
dasnov21-Jun-05 19:22 
GeneralWindows Services Pin
21-Jun-05 18:39
suss21-Jun-05 18:39 
GeneralRe: Windows Services Pin
ThatsAlok21-Jun-05 18:51
ThatsAlok21-Jun-05 18:51 
Generalclient-server Pin
ask_you21-Jun-05 18:33
ask_you21-Jun-05 18:33 
GeneralRe: client-server Pin
munawar196821-Jun-05 19:10
munawar196821-Jun-05 19:10 
GeneralRe: client-server Pin
ask_you21-Jun-05 19:19
ask_you21-Jun-05 19:19 
GeneralRe: client-server Pin
munawar196821-Jun-05 19:28
munawar196821-Jun-05 19:28 
GeneralRe: client-server Pin
pierrekande21-Jun-05 22:17
pierrekande21-Jun-05 22:17 
GeneralI want to get E-Mail account infomation of OutLook( express , XP, 2003... ) Pin
Blue-Bird21-Jun-05 16:50
Blue-Bird21-Jun-05 16:50 
GeneralRe: I want to get E-Mail account infomation of OutLook( express , XP, 2003... ) Pin
David Crow21-Jun-05 17:34
David Crow21-Jun-05 17:34 
GeneralRe: I want to get E-Mail account infomation of OutLook( express , XP, 2003... ) Pin
Christian Graus21-Jun-05 18:08
protectorChristian Graus21-Jun-05 18:08 
GeneralRe: I want to get E-Mail account infomation of OutLook( express , XP, 2003... ) Pin
ThatsAlok21-Jun-05 19:46
ThatsAlok21-Jun-05 19:46 
GeneralRe: I want to get E-Mail account infomation of OutLook( express , XP, 2003... ) Pin
David Crow22-Jun-05 3:03
David Crow22-Jun-05 3:03 
GeneralRe: I want to get E-Mail account infomation of OutLook( express , XP, 2003... ) Pin
Blue-Bird21-Jun-05 19:22
Blue-Bird21-Jun-05 19:22 
GeneralRe: I want to get E-Mail account infomation of OutLook( express , XP, 2003... ) Pin
David Crow22-Jun-05 3:07
David Crow22-Jun-05 3:07 

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.