Untitled
unknown
plain_text
4 years ago
1.1 kB
53
Indexable
#define LOGIN_BTN 1
#define LOGOUT_BTN 2
class LoginView: public CView
{
public:
LoginView()
{
Create(
NULL,
"Login",
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
CRect(CPoint(0, 0), CSize(150, 25),
this, LOGIN_BTN);
};
};
class LogoutView: public CView
{
public:
LogoutView()
{
Create(
NULL,
"Logout",
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
CRect(CPoint(0, 0), CSize(150, 25),
this, LOGOUT_BTN);
};
};
class CMainFrame: public CFrameWnd
{
public:
CMainFrame()
{
Create(
NULL,
"Tutorial CDocument and CView",
WS_OVERLAPPEDWINDOW,
CRect(CPoint(0, 0), CSize(640, 360)));
};
};
class CApplication : public CWinApp {
BOOL InitInstance() {
CMainFrame* mainWnd = new CMainFrame();
m_pMainWnd = mainWnd;
mainWnd->ShowWindow(SW_NORMAL);
mainWnd->UpdateWindow();
return TRUE;
}
};
CApplication app;Editor is loading...