?? mystatic.cpp
字號:
// MyStatic.cpp : implementation file
//
#include "stdafx.h"
#include "Cli_SoftAndHard.h"
#include "MyStatic.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern LPSHOWPARAMS ShowParams;
extern int iCurrentWin;
extern void mySendMessage(int iMessage, char* strMessage);
extern int gShowMode;
/////////////////////////////////////////////////////////////////////////////
// CMyStatic
CMyStatic::CMyStatic()
{
}
CMyStatic::~CMyStatic()
{
}
BEGIN_MESSAGE_MAP(CMyStatic, CStatic)
//{{AFX_MSG_MAP(CMyStatic)
ON_WM_CONTEXTMENU()
ON_WM_LBUTTONDBLCLK()
ON_COMMAND(IDC_SELECT, OnSelect)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMyStatic message handlers
void CMyStatic::OnContextMenu(CWnd* pWnd, CPoint point)
{
// TODO: Add your message handler code here
CMenu menu;
menu.LoadMenu(IDR_MENU1);
CMenu* pContextMenu=menu.GetSubMenu(0);
pContextMenu->TrackPopupMenu(TPM_LEFTALIGN|TPM_RIGHTBUTTON,point.x,point.y,pWnd);
}
void CMyStatic::OnLButtonDblClk(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
char strMessage[50];
if(gShowMode == VIDEO_MULTI_MODE)
{
gShowMode = VIDEO_SINGLE_MODE;
sprintf(strMessage, "SINGLE$%d", iCurrentWin+1);
mySendMessage(WM_MYSINGLEMODE, strMessage);
}
else
{
gShowMode = VIDEO_MULTI_MODE;
sprintf(strMessage, "MULTI$%d", iCurrentWin+1);
mySendMessage(WM_MYMULTIMODE, strMessage);
}
//SendMessage(this->m_hWnd, WM_MYDBLCLICK, 0, 0);
CStatic::OnLButtonDblClk(nFlags, point);
}
void CMyStatic::OnSelect()
{
// TODO: Add your command handler code here
char strMessage[50];
sprintf(strMessage, "SELECT$%d", rand());
mySendMessage(WM_MYMULTIMODE, strMessage);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -