Click here to Skip to main content
16,011,849 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Class and variable renaming Pin
AlexO8-Jan-03 5:28
AlexO8-Jan-03 5:28 
GeneralRe: Class and variable renaming Pin
Alvaro Mendez8-Jan-03 5:43
Alvaro Mendez8-Jan-03 5:43 
GeneralDetecting double-click on popup menu Pin
mynab8-Jan-03 3:51
mynab8-Jan-03 3:51 
Generaleek! CBrush & SelectObject problem Urgent cwk Pin
smiler8-Jan-03 3:44
smiler8-Jan-03 3:44 
GeneralRe: eek! CBrush & SelectObject problem Urgent cwk Pin
56789012348-Jan-03 3:57
56789012348-Jan-03 3:57 
GeneralRe: eek! CBrush & SelectObject problem Urgent cwk Pin
smiler8-Jan-03 4:16
smiler8-Jan-03 4:16 
GeneralRe: eek! CBrush & SelectObject problem Urgent cwk Pin
jhwurmbach8-Jan-03 4:06
jhwurmbach8-Jan-03 4:06 
Generalsplitting the window Pin
atif_8-Jan-03 2:49
atif_8-Jan-03 2:49 
Hi Friends
Below is the code wich i used to split the window
It executes well but remains minimised, WHY ??
please identify the mistakes as well as other things to implement if there is



#include <afxwin.h>
#include <afxext.h>

/////////////////////////////////////////////////
// my view class
class myView : public CView
{
DECLARE_DYNCREATE(myView)

public:
myView();

void OnDraw(CDC *dc);

DECLARE_MESSAGE_MAP()
};

myView::myView()
{}
/////////////////////////////////////////////////

// my main class
class myMain:public CFrameWnd
{
public:
myMain();
afx_msg void OnPaint();
CSplitterWnd splitter;

BOOL OnCreateClient(LPCREATESTRUCT,CCreateContext*);
DECLARE_MESSAGE_MAP();
};

myMain::myMain()
{
Create(NULL,"MFC");
}

BOOL myMain::OnCreateClient(LPCREATESTRUCT rs,CCreateContext* context )
{
// Adding the splitter
if (!splitter.CreateStatic(this,1,2,
WS_CHILD|WS_VISIBLE) )
{
TRACE0("Failed to CreateStaticSplitter\n");
return FALSE;
}
// Creating first view(left)
if ( !splitter.CreateView( 0, 0,
RUNTIME_CLASS(myView ),
CSize(50,50), context
) )
{
TRACE0("Failed to create second pane\n");
return FALSE;
}
// Creating second view(right)
if (!splitter.CreateView( 0, 1,
RUNTIME_CLASS(myView ),
CSize(50,50), context
) )
{
TRACE0("Failed to create second pane\n");
return FALSE;
}

return FALSE;

}
//////////////////////////////////////////////////////

// my application calss
class myApp:public CWinApp
{
public:
BOOL InitInstance()
{
m_pMainWnd=new myMain;
m_pMainWnd->ShowWindow(m_nCmdShow);
m_pMainWnd->UpdateWindow();

return TRUE;
}
};
//////////////////////////////////////////////////

// my document class
class myDoc : public CDocument
{
DECLARE_DYNCREATE(myDoc)

public:
myDoc()
{}
};


void myView::OnDraw(CDC *dc)
{
myDoc *p_myDoc = (myDoc*) GetDocument();

}
/////////////////////////////////////////////////////


BEGIN_MESSAGE_MAP(myMain,CFrameWnd)
END_MESSAGE_MAP()

BEGIN_MESSAGE_MAP(myView,CView)
END_MESSAGE_MAP()


myApp App;

IMPLEMENT_DYNCREATE(myDoc,CDocument)
IMPLEMENT_DYNCREATE(myView,CView)
Generalvisiodistributing application Pin
asif baba8-Jan-03 2:48
sussasif baba8-Jan-03 2:48 
GeneralRe: visiodistributing application Pin
jmkhael8-Jan-03 3:13
jmkhael8-Jan-03 3:13 
Generalmaking dynamic splitting static Pin
atif_8-Jan-03 2:29
atif_8-Jan-03 2:29 
GeneralInterested in Packet filtering Pin
summo8-Jan-03 2:19
summo8-Jan-03 2:19 
GeneralNeed help in Firewall development Pin
summo8-Jan-03 1:58
summo8-Jan-03 1:58 
GeneralRe: Need help in Firewall development Pin
jmkhael8-Jan-03 2:40
jmkhael8-Jan-03 2:40 
GeneralCRichEditCtrl Problem Persist Pin
Ricky_TheBard8-Jan-03 1:52
Ricky_TheBard8-Jan-03 1:52 
GeneralRe: CRichEditCtrl Problem Persist Pin
Roger Allen8-Jan-03 2:19
Roger Allen8-Jan-03 2:19 
GeneralRe: CRichEditCtrl Problem Persist Pin
Ricky_TheBard8-Jan-03 2:31
Ricky_TheBard8-Jan-03 2:31 
GeneralCPaintDC vs CClientDC Pin
nelzanoide8-Jan-03 1:42
nelzanoide8-Jan-03 1:42 
GeneralRe: CPaintDC vs CClientDC Pin
56789012348-Jan-03 4:01
56789012348-Jan-03 4:01 
GeneralRe: CPaintDC vs CClientDC Pin
nelzanoide8-Jan-03 4:12
nelzanoide8-Jan-03 4:12 
GeneralRe: CPaintDC vs CClientDC Pin
56789012348-Jan-03 4:24
56789012348-Jan-03 4:24 
GeneralRe: CPaintDC vs CClientDC Pin
nelzanoide8-Jan-03 4:36
nelzanoide8-Jan-03 4:36 
GeneralRe: CPaintDC vs CClientDC Pin
Alois Kraus8-Jan-03 4:42
Alois Kraus8-Jan-03 4:42 
GeneralRe: CPaintDC vs CClientDC Pin
nelzanoide8-Jan-03 4:46
nelzanoide8-Jan-03 4:46 
GeneralSet width of divider i CHeaderCtrl Pin
Telefonen8-Jan-03 0:54
Telefonen8-Jan-03 0:54 

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.