🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.tools.mfc
Article #79

Re: Controls in non-dialog (mfc)

#79
From: James Moore
Date: Wed, 10 Apr 1996 18:49
27 lines
1234 bytes
sj2393@ansys.com (Steve Jones) writes:

>How in MFC does one go about embedding a control within a
>window that is not a dialog box?

You're doing the right thing - you shouldn't have to do anything other
than call Create ().

Double-check a few things:

0.  Is Create () returning TRUE?

1.  Are you including WS_VISIBLE in your Create () call?

2.  Make sure pParentWnd in the Create () call points to the right
window.

3.  Make sure the size rect is reasonable, and that the location of
the control is inside the visible window.

4.  Use Spy to see your window tree, which will include the new
control.  If it's going somewhere weird, this should help you find it.

-- 
			     James Moore
			 banshee@banshee.com
	    http://www.seanet.com/Users/banshee/index.html
Technical Details
Message-ID: <4kgvsl$sd6@kisa.seanet.com>
Path: arc1-ca.pugleaf.net!news.seanet.com!usenet!not-for-mail
References: <4js2mv$sk6@news.icubed.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.seanet.com!usenet!not-for-mail
From: banshee@seanet.com (James Moore)
Newsgroups: comp.os.ms-windows.programmer.tools.mfc,comp.lang.c++
Subject: Re: Controls in non-dialog (mfc)
Date: 10 Apr 1996 11:49:57 -0700
Organization: Seanet Online Services, Seattle WA
Message-ID: <4kgvsl$sd6@kisa.seanet.com>
References: <4js2mv$sk6@news.icubed.com>
NNTP-Posting-Host: kisa.seanet.com
X-Newsreader: NN version 6.5.0 (NOV)