mainfrm.cpp

来自「中间件编程,该程序用于传输客户端数据到服务器,可运行于WINDOWS2000,2」· C++ 代码 · 共 89 行

CPP
89
字号
// mainfrm.cpp : implementation of the CMainFrame class
//

#include "stdafx.h"
#include "client.h"

#include "mainfrm.h"

#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMainFrame

IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)

BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
	//{{AFX_MSG_MAP(CMainFrame)
	ON_WM_SYSCOMMAND()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMainFrame construction/destruction

CMainFrame::CMainFrame()
{
	// TODO: add member initialization code here
}

CMainFrame::~CMainFrame()
{
}

/////////////////////////////////////////////////////////////////////////////
// CMainFrame diagnostics

#ifdef _DEBUG
void CMainFrame::AssertValid() const
{
	CFrameWnd::AssertValid();
}

void CMainFrame::Dump(CDumpContext& dc) const
{
	CFrameWnd::Dump(dc);
}

#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CMainFrame message handlers

//change the outlook of main window at start up
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
	if(!CFrameWnd::PreCreateWindow(cs))
		return FALSE;
	cs.style&=~WS_MAXIMIZEBOX;
	return TRUE;
}

void CMainFrame::ActivateFrame(int nCmdShow)
{                       
	//change the start up window size
	//nCmdShow=SW_MINIMIZE;
	CFrameWnd::ActivateFrame(nCmdShow);
}
void CMainFrame::OnSysCommand(UINT nID, LPARAM lParam)
{
/*	    switch (nID & 0x0fff0) {
       case SC_MINIMIZE:
       case SC_RESTORE:
       case SC_NEXTWINDOW:
       case SC_PREVWINDOW:
       case SC_TASKLIST:
              AfxMessageBox("This is a sample application \nwhich \
can be only display as a icon!\n By Zheng Dengfeng");					
              MessageBeep(0);
       case SC_SIZE:
       case SC_MOVE:
              return;               // (don抰 do anything)
 
	}*/	
	CFrameWnd::OnSysCommand(nID, lParam);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?