Click here to Skip to main content
15,913,854 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Same caption problem as before, what am I doing wrong? Pin
generic_user_id18-Mar-02 9:24
generic_user_id18-Mar-02 9:24 
GeneralRe: Same caption problem as before, what am I doing wrong? Pin
Paul M Watt18-Mar-02 9:48
mentorPaul M Watt18-Mar-02 9:48 
GeneralRe: Same caption problem as before, what am I doing wrong? Pin
generic_user_id18-Mar-02 11:06
generic_user_id18-Mar-02 11:06 
GeneralActiveX problem Pin
18-Mar-02 4:49
suss18-Mar-02 4:49 
GeneralRe: ActiveX problem Pin
Michael P Butler18-Mar-02 4:55
Michael P Butler18-Mar-02 4:55 
GeneralRe: ActiveX problem Pin
Derek Waters18-Mar-02 11:14
Derek Waters18-Mar-02 11:14 
GeneralRe: ActiveX problem Pin
Derek Lakin18-Mar-02 20:07
Derek Lakin18-Mar-02 20:07 
GeneralRe: ActiveX problem Pin
Derek Waters19-Mar-02 11:34
Derek Waters19-Mar-02 11:34 
OK, here's some code I've pulled out of my ActiveX control:

void CMyControl::OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid)
{
        // m_ctrlDictSel is my child control (could be two of them)
	if (m_ctrlDictSel.GetSafeHwnd())
	{
                // Here we resize the child controls if the ActiveX control
                // size has changed, otherwise, just redraw the child wnds.
                //
		if (m_tRect != rcBounds)
		{
			m_ctrlDictSel.MoveWindow(rcBounds, TRUE);
			m_tRect = rcBounds;
		}
		else
		{
			m_ctrlDictSel.Invalidate(TRUE);
		}
	}
	else
	{
                // Design mode, draw a crossed box.
                //
		pdc->FillRect(rcBounds, CBrush::FromHandle((HBRUSH)GetStockObject(WHITE_BRUSH)));
		pdc->Rectangle(rcBounds);
		pdc->MoveTo(rcBounds.left, rcBounds.top);
		pdc->LineTo(rcBounds.right, rcBounds.bottom);
		pdc->MoveTo(rcBounds.right, rcBounds.top);
		pdc->LineTo(rcBounds.left, rcBounds.bottom);
	}
}


Are you sure your trees are being created correctly? In my OnCreate handler, all I've got is a call to m_ctrlDictSel.Create(...).



------------------------
Derek Waters
derek@lj-oz.com
GeneralRe: ActiveX problem Pin
Derek Lakin19-Mar-02 23:18
Derek Lakin19-Mar-02 23:18 
GeneralWS_TABSTOP Pin
Jim Hewitt18-Mar-02 4:02
Jim Hewitt18-Mar-02 4:02 
GeneralRe: WS_TABSTOP Pin
Tomasz Sowinski18-Mar-02 4:11
Tomasz Sowinski18-Mar-02 4:11 
GeneralATLControls.H -- > Size of my DLL Pin
Braulio Dez18-Mar-02 4:05
Braulio Dez18-Mar-02 4:05 
GeneralRe: ATLControls.H -- > Size of my DLL Pin
Mazdak18-Mar-02 4:18
Mazdak18-Mar-02 4:18 
GeneralActiveX Translation Engine Pin
dlhson18-Mar-02 3:40
dlhson18-Mar-02 3:40 
GeneralRe: ActiveX Translation Engine Pin
Mazdak18-Mar-02 4:23
Mazdak18-Mar-02 4:23 
GeneralRe: ActiveX Translation Engine Pin
dlhson18-Mar-02 4:37
dlhson18-Mar-02 4:37 
GeneralRe: ActiveX Translation Engine Pin
Michael P Butler18-Mar-02 4:59
Michael P Butler18-Mar-02 4:59 
GeneralActiveX and MFC Pin
Derek Lakin18-Mar-02 3:18
Derek Lakin18-Mar-02 3:18 
GeneralRe: ActiveX and MFC Pin
Mazdak18-Mar-02 3:45
Mazdak18-Mar-02 3:45 
GeneralRe: ActiveX and MFC Pin
Derek Lakin18-Mar-02 7:06
Derek Lakin18-Mar-02 7:06 
GeneralRe: ActiveX and MFC Pin
Mazdak18-Mar-02 7:42
Mazdak18-Mar-02 7:42 
GeneralRe: ActiveX and MFC Pin
Derek Lakin18-Mar-02 11:10
Derek Lakin18-Mar-02 11:10 
GeneralRe: ActiveX and MFC Pin
Mazdak18-Mar-02 20:31
Mazdak18-Mar-02 20:31 
GeneralGeneric Class Question Pin
18-Mar-02 3:14
suss18-Mar-02 3:14 
GeneralRe: Generic Class Question Pin
Tomasz Sowinski18-Mar-02 3:18
Tomasz Sowinski18-Mar-02 3:18 

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.