本文整理汇总了C++中CVirtualConsole::OnSize方法的典型用法代码示例。如果您正苦于以下问题:C++ CVirtualConsole::OnSize方法的具体用法?C++ CVirtualConsole::OnSize怎么用?C++ CVirtualConsole::OnSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CVirtualConsole
的用法示例。
在下文中一共展示了CVirtualConsole::OnSize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ChildWndProc
LRESULT CConEmuChild::ChildWndProc(HWND hWnd, UINT messg, WPARAM wParam, LPARAM lParam)
{
LRESULT result = 0;
// Logger
MSG msgStr = {hWnd, messg, wParam, lParam};
ConEmuMsgLogger::Log(msgStr, ConEmuMsgLogger::msgCanvas);
if (gpSetCls->isAdvLogging >= 4)
{
gpConEmu->LogMessage(hWnd, messg, wParam, lParam);
}
CVConGuard guard;
CVirtualConsole* pVCon = NULL;
if (messg == WM_CREATE || messg == WM_NCCREATE)
{
LPCREATESTRUCT lp = (LPCREATESTRUCT)lParam;
guard = (CVirtualConsole*)lp->lpCreateParams;
pVCon = guard.VCon();
if (pVCon)
{
gVConDcMap.Set(hWnd, pVCon);
pVCon->m_TAutoCopy.Init(hWnd, TIMER_AUTOCOPY, TIMER_AUTOCOPY_DELAY);
pVCon->m_TScrollShow.Init(hWnd, TIMER_SCROLL_SHOW, TIMER_SCROLL_SHOW_DELAY);
pVCon->m_TScrollHide.Init(hWnd, TIMER_SCROLL_HIDE, TIMER_SCROLL_HIDE_DELAY);
#ifndef SKIP_HIDE_TIMER
pVCon->m_TScrollCheck.Init(hWnd, TIMER_SCROLL_CHECK, TIMER_SCROLL_CHECK_DELAY);
#endif
}
}
else if (hWnd != ghDcInDestroing)
{
if (!gVConDcMap.Get(hWnd, &pVCon) || !guard.Attach(pVCon))
pVCon = NULL;
}
if (messg == WM_SYSCHAR)
{
_ASSERTE(FALSE); // по идее, фокуса тут быть не должно
// Чтобы не пищало
result = TRUE;
goto wrap;
}
if (!pVCon)
{
_ASSERTE(pVCon!=NULL || hWnd==ghDcInDestroing);
result = DefWindowProc(hWnd, messg, wParam, lParam);
goto wrap;
}
switch (messg)
{
case WM_SHOWWINDOW:
{
#ifdef _DEBUG
HWND hGui = pVCon->GuiWnd();
if (hGui)
{
_ASSERTE(((wParam==0) || pVCon->RCon()->isGuiForceConView()) && "Show DC while GuiWnd exists");
}
#endif
result = DefWindowProc(hWnd, messg, wParam, lParam);
break;
}
case WM_SETFOCUS:
// Если в консоли работает "GUI" окно (GUI режим), то фокус нужно отдать туда.
{
// Фокус должен быть в главном окне! За исключением случая работы в GUI режиме.
pVCon->setFocus();
}
return 0;
case WM_ERASEBKGND:
result = 0;
break;
case WM_PAINT:
result = pVCon->OnPaint();
break;
case WM_PRINTCLIENT:
if (wParam && (lParam & PRF_CLIENT))
{
pVCon->PrintClient((HDC)wParam, false, NULL);
}
break;
case WM_SIZE:
#ifdef _DEBUG
{
RECT rc; GetClientRect(hWnd, &rc);
short cx = LOWORD(lParam);
rc.left = rc.left;
}
#endif
result = pVCon->OnSize(wParam, lParam);
break;
case WM_MOVE:
result = pVCon->OnMove(wParam, lParam);
//.........这里部分代码省略.........