Click here to Skip to main content
15,905,419 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalremove scroll bars in Grid Control Pin
Jason24-Nov-99 6:33
Jason24-Nov-99 6:33 
GeneralRE: remove scroll bars in Grid Control Pin
Chris Maunder27-Nov-99 17:04
cofounderChris Maunder27-Nov-99 17:04 
GeneralHtmlHelp in multi-threaded app Pin
Martin Speiser23-Nov-99 21:03
Martin Speiser23-Nov-99 21:03 
GeneralRE: HtmlHelp in multi-threaded app Pin
Member 105424-Nov-99 2:34
Member 105424-Nov-99 2:34 
GeneralRE: RE: HtmlHelp in multi-threaded app Pin
Martin Speiser25-Nov-99 0:50
Martin Speiser25-Nov-99 0:50 
General[Q]Using the MAPI Pin
Member 431523-Nov-99 18:04
Member 431523-Nov-99 18:04 
QuestionMDI custom tile with open/close of childeren? Pin
Michael Peters19-Nov-99 19:45
Michael Peters19-Nov-99 19:45 
AnswerRE: MDI custom tile with open/close of childeren? Pin
Martin Speiser19-Nov-99 23:51
Martin Speiser19-Nov-99 23:51 
1) Write a window class dervied from CWnd.

class MdiClient : public CWnd
{
DECLARE_DYNAMIC( MdiClient )

public:
// Construction/Destruction
MdiClient();

protected:
// ClassWizard generated message map functions
//{{AFX_MSG( MdiClient )
//}}AFX_MSG

afx_msg LRESULT OnMDICreate( WPARAM, LPARAM lParam );
afx_msg LRESULT OnMDIDestroy( WPARAM wParam, LPARAM );

DECLARE_MESSAGE_MAP()

int m_nMDICount;
};

IMPLEMENT_DYNAMIC( MdiClient, CWnd )

// Construction/Destruction
MdiClient::MdiClient()
: m_nMDICount( 0 )
{
}

// ClassWizard generated message map functions
BEGIN_MESSAGE_MAP( CLASS, BASE )
//{{AFX_MSG_MAP( MdiClient )
//}}AFX_MSG_MAP

ON_MESSAGE( WM_MDICREATE, OnMDICreate )
ON_MESSAGE( WM_MDIDESTROY, OnMDIDestroy )

END_MESSAGE_MAP()

LRESULT MdiClient::OnMDICreate( WPARAM, LPARAM lParam )
{
LPMDICREATESTRUCT lpmdic = (LPMDICREATESTRUCT)lParam;
HWND hwndMDIChild = (HWND)CWnd::DefWindowProc( WM_MDICREATE, 0L, (LRESULT)lpmdic );
if ( hwndMDIChild != NULL )
{
++m_nMDICount;
// Reposition the MDI childs like you want
}
return (LRESULT)hwndMDIChild;
}


LRESULT MdiClient::OnMDIDestroy( WPARAM wParam, LPARAM )
{
--m_nMDICount;
if ( m_nMDICount > 0 )
{
// Reposition the MDI childs like you want
}
return CWnd::DefWindowProc( WM_MDIDESTROY, wParam, 0L );
}


2) Derive a class from CMDIFrameWnd, and overwrite OnCreate.

int MdiFrameWnd::OnCreate( LPCREATESTRUCT lpCreateStruct )
{
if( CMDIFrameWnd::OnCreate( lpCreateStruct ) == -1 )
{
return -1;
}

m_pwndMdiClient = new MdiClient;
if( !m_pwndMdiClient->SubclassWindow( m_hWndMDIClient ) )
{
return -1;
}

return 0;
}


HTH

Martin
GeneralRE: RE: MDI custom tile with open/close of childeren? Pin
Martin Speiser20-Nov-99 0:04
Martin Speiser20-Nov-99 0:04 
Generalmpeg extraction Pin
kai23-Nov-99 5:15
kai23-Nov-99 5:15 
QuestionOnDraw, how can I get the rectangle that is painting ? Pin
Braulio Diez22-Nov-99 22:48
sussBraulio Diez22-Nov-99 22:48 
AnswerRE: OnDraw, how can I get the rectangle that is painting ? Pin
Henk Devos23-Nov-99 9:33
Henk Devos23-Nov-99 9:33 
AnswerRE: OnDraw, how can I get the rectangle that is painting ? Pin
Anonymous24-Nov-99 14:56
suss Anonymous24-Nov-99 14:56 
GeneralTrying to print with a CWinThread... Pin
Braulio Diez23-Nov-99 1:18
sussBraulio Diez23-Nov-99 1:18 
GeneralCHtmlView Pin
Thierry Mathieu22-Nov-99 20:50
sussThierry Mathieu22-Nov-99 20:50 
GeneralBasic OOP question... Pin
Braulio Diez22-Nov-99 20:32
sussBraulio Diez22-Nov-99 20:32 
GeneralRE: Basic OOP question... Pin
Paul Selormey22-Nov-99 20:55
Paul Selormey22-Nov-99 20:55 
GeneralThanks but... Pin
Braulio Diez22-Nov-99 21:20
sussBraulio Diez22-Nov-99 21:20 
GeneralRE: Thanks but... Pin
Henk Devos23-Nov-99 9:27
Henk Devos23-Nov-99 9:27 
GeneralRE: Basic OOP question... Pin
sandrine22-Nov-99 22:07
sandrine22-Nov-99 22:07 
GeneralRE: RE: Basic OOP question... Pin
Braulio Diez23-Nov-99 1:57
sussBraulio Diez23-Nov-99 1:57 
GeneralRE: RE: RE: Basic OOP question... Pin
Anonymous23-Nov-99 7:41
suss Anonymous23-Nov-99 7:41 
GeneralRe: Basic OOP question... Pin
Member 147421-Apr-00 11:01
Member 147421-Apr-00 11:01 
GeneralDebugging Control Panel Applets Pin
Farzad Bakhtiar9-Apr-00 21:56
sussFarzad Bakhtiar9-Apr-00 21:56 
GeneralGetFieldValue() throws an exception Pin
Stefan20-Nov-99 5:25
Stefan20-Nov-99 5:25 

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.