Re: MFC: adding a control into a dialog window
- From: "Man-wai Chang ToDie (33.6k)" <toylet.toylet@xxxxxxxxx>
- Date: Fri, 12 Sep 2008 21:55:03 +0800
But I would imagine that the problem is that your parentwnd is NULL. GetDlgItem() will get the CWnd* of a child control of the dialog, and there is not one with the ID IDD_HELLO_DIALOG. Just pass the "this" pointer as the parent.
Thanks.
But a much easier way to do this kind of thing is to put the static control on the template and show/hide it as needed.
Um... When I was coding Foxpro, sometimes, it's neater to insert control into a form after design time. So I am trying to repeat what I did with Foxpro here.
--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 8.04.1) Linux 2.6.26.5
^ ^ 21:53:01 up 3 days 6:43 3 users load average: 1.00 1.00 1.00
? ? (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa/
.
- Follow-Ups:
- Re: MFC: adding a control into a dialog window
- From: David Wilkinson
- Re: MFC: adding a control into a dialog window
- References:
- MFC: adding a control into a dialog window
- From: Man-wai Chang ToDie (33.6k)
- Re: MFC: adding a control into a dialog window
- From: David Wilkinson
- MFC: adding a control into a dialog window
- Prev by Date: Re: MFC: adding a control into a dialog window
- Next by Date: Re: MFC: adding a control into a dialog window
- Previous by thread: Re: MFC: adding a control into a dialog window
- Next by thread: Re: MFC: adding a control into a dialog window
- Index(es):
Relevant Pages
|
Loading