?? util_pop.cpp
字號:
// util_pop.cpp
#include "stdafx.h"
#include "util_pop.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
GPopupWindow::GPopupWindow()
{
}
GPopupWindow::~GPopupWindow()
{
}
void GPopupWindow::PostNcDestroy()
{
delete this;
}
BOOL GPopupWindow::OnLButtonDownCheck(UINT nFlags, CPoint pt)
{
CRect cr;
GetClientRect(cr);
if(!cr.PtInRect(pt))
return TRUE;
return FALSE;
}
BEGIN_MESSAGE_MAP(GPopupWindow, CWnd)
ON_WM_CREATE()
ON_WM_DESTROY()
ON_WM_CAPTURECHANGED()
ON_WM_LBUTTONDOWN()
END_MESSAGE_MAP()
void GPopupWindow::OnCaptureChanged(CWnd *pWnd)
{
PostMessage(WM_CLOSE);
}
int GPopupWindow::OnCreate(LPCREATESTRUCT lpcs)
{
int nCreate = CWnd::OnCreate(lpcs);
SetCapture();
return nCreate;
}
void GPopupWindow::OnLButtonDown(UINT nFlags, CPoint pt)
{
if(OnLButtonDownCheck(nFlags, pt))
{
::ReleaseCapture();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -