⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.wzd

📁 《Visual C++ MFC编程实例》配套代码,如果大家正在学习此教程
💻 WZD
字号:
/////////////////////////////////////////////////////////////////////
// Modify the Application Class.
/////////////////////////////////////////////////////////////////////

// 1) call a helper function from the start of the application
BOOL CWzdApp::InitInstance()
{
	SuperclassButtons();

	:	:	:
}

// 2) create a local function which will superclass a control class
// (in this example, we superclass a button control)
WNDPROC lpfnButtonWndProc;
LRESULT CALLBACK ButtonWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);

// super class the button
void CWzdApp::SuperclassButtons()
{
	WNDCLASS wClass;

	// get existing class information
	::GetClassInfo(AfxGetInstanceHandle(),"BUTTON",&wClass);

	// not returned by GetClassInfo and must be filled in:
    wClass.hInstance=AfxGetInstanceHandle();
    wClass.lpszMenuName=NULL; 
    //wClass.lpszClassName=_T("BUTTON"); // can also rename class here

	// save old window process and substitute our own
    lpfnButtonWndProc=wClass.lpfnWndProc; 
    wClass.lpfnWndProc=ButtonWndProc;

	// register this class
	::RegisterClass(&wClass);
}


// 3) handle any WM_CREATE messages from a button window
LRESULT CALLBACK ButtonWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
	switch (msg)
	{
		case WM_CREATE:
			break;
	}
	return (lpfnButtonWndProc)(hWnd,msg,wParam,lParam);
}

⌨️ 快捷键说明

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