From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1014db,adf78995e627c64b X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,adf78995e627c64b X-Google-Attributes: gid103376,public X-Google-Thread: f7a51,adf78995e627c64b X-Google-Attributes: gidf7a51,public X-Google-Thread: 109fba,adf78995e627c64b X-Google-Attributes: gid109fba,public From: David Lowndes Subject: Re: passing an Hwnd from a C lang prog to a MFC dll Date: 1999/12/14 Message-ID: #1/1 X-Deja-AN: 560648070 Content-Transfer-Encoding: 7bit References: <385561c4.0@munix01.marshall.edu> Content-Type: text/plain; charset=us-ascii MIME-Version: 1.0 Reply-To: davidl@mvps.org.--- Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,microsoft.public.vc.language Date: 1999-12-14T00:00:00+00:00 List-Id: >I want to be able to associate the passed Hwnd with a Cwnd so that I can >create the instance of the CDialog. Cwnd::Attach(new Hwnd) doesn't work.. Bill, It should work. I've used it like this: CWnd Parent; Parent.Attach( hwnd ); CMyDlg dlg( &Parent ); Dave -- My address is altered to discourage junk mail. Please post responses to the newsgroup thread, there's no need for follow-up email copies.