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

📄 userinfodlg.cpp

📁 类似QQ的聊天软件源程序
💻 CPP
字号:
// UserInfoDlg.cpp : implementation file
//

#include "stdafx.h"
#include "BeautyQQ.h"
#include "UserInfoDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CUserInfoDlg dialog


CUserInfoDlg::CUserInfoDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CUserInfoDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CUserInfoDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CUserInfoDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CUserInfoDlg)
	DDX_Control(pDX, IDC_BUTTON_USER_NAME, m_BottonCtrlName);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CUserInfoDlg, CDialog)
	//{{AFX_MSG_MAP(CUserInfoDlg)
	ON_BN_CLICKED(IDC_BUTTON_USER_NAME, OnButtonUserName)
	ON_WM_SIZE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CUserInfoDlg message handlers

void CUserInfoDlg::OnButtonUserName() 
{
	CMenu menu;
	menu.CreatePopupMenu();
	menu.InsertMenu(0, MF_BYPOSITION , ID_MENU_NEW_MEMBER, _T("连机(C)"));
	menu.InsertMenu(1, MF_BYPOSITION|MF_SEPARATOR);
	menu.InsertMenu(2, MF_BYPOSITION , ID_MENU_NEW_MEMBER, _T("忙碌(B)"));
	menu.InsertMenu(2, MF_BYPOSITION , ID_MENU_NEW_MEMBER, _T("马上回来(I)"));
	menu.InsertMenu(4, MF_BYPOSITION , ID_MENU_NEW_MEMBER, _T("离开(O)"));
	menu.InsertMenu(5, MF_BYPOSITION , ID_MENU_NEW_MEMBER, _T("外出就餐(L)"));
	menu.InsertMenu(6, MF_BYPOSITION|MF_SEPARATOR);
	
	CRect rtRect;
	m_BottonCtrlName.GetWindowRect(rtRect);
	menu.TrackPopupMenu(TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_RIGHTBUTTON, 
		rtRect.left, rtRect.bottom, AfxGetMainWnd());
	
}


void CUserInfoDlg::OnSize(UINT nType, int cx, int cy) 
{
	CDialog::OnSize(nType, cx, cy);
	
//	Invalidate(TRUE);		
}

⌨️ 快捷键说明

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