本文整理汇总了C++中CMyTrace::Paint方法的典型用法代码示例。如果您正苦于以下问题:C++ CMyTrace::Paint方法的具体用法?C++ CMyTrace::Paint怎么用?C++ CMyTrace::Paint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMyTrace
的用法示例。
在下文中一共展示了CMyTrace::Paint方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WndProc
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
int wmId, wmEvent;
PAINTSTRUCT ps;
HDC hdc;
switch (message)
{
case WM_COMMAND:
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
// Parse the menu selections:
switch (wmId)
{
case IDM_ABOUT:
break;
case IDM_EXIT:
DestroyWindow(hWnd);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
break;
case WM_TIMER:
{
OnTimer( wParam ); // wTimerID = wParam
break;
}
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
// RECT rt;
// GetClientRect(hWnd, &rt);
g_MyTrace.Paint( hdc );
EndPaint(hWnd, &ps);
break;
case WM_DESTROY:
KillTimer( hMainWnd, TIMER_ID_DEFAULT );
#if !defined(__INTERNALSERVER)
KillTimer( hMainWnd, TIMER_ID_WANTED );
#endif
#ifdef __EVENT0913
KillTimer( hMainWnd, TIMER_ID_EVENT0913 );
#endif // __EVENT0913
#ifdef __EVENT1206
KillTimer( hMainWnd, TIMER_ID_EVENT1206 );
#endif // __EVENT1206
KillTimer( hMainWnd, TIMER_ID_EVENT );
PostQuitMessage(0);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}
示例2: WndProc
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
int wmId, wmEvent;
PAINTSTRUCT ps;
HDC hdc;
switch (message)
{
case WM_COMMAND:
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
// Parse the menu selections:
switch (wmId)
{
case IDM_EXIT:
DestroyWindow(hWnd);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
break;
#ifdef __PL_0917
case WM_LBUTTONDOWN:
CPacketLog::Instance()->Print();
break;
case WM_RBUTTONDOWN:
CPacketLog::Instance()->Reset();
break;
#endif // __PL_0917
case WM_TIMER:
{
switch( wParam )
{
case 3:
#ifdef __CRASH_0404
CCrashStatus::GetInstance()->SetMainThreadTask( 1 );
#endif // __CRASH_0404
CPlayerMng::Instance()->DestroyGarbage();
#ifdef __CRASH_0404
CCrashStatus::GetInstance()->SetMainThreadTask( 0 );
#endif // __CRASH_0404
break;
}
break;
}
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
// RECT rt;
// GetClientRect(hWnd, &rt);
g_MyTrace.Paint( hdc );
EndPaint(hWnd, &ps);
break;
case WM_DESTROY:
KillTimer( hMainWnd, 3 );
PostQuitMessage(0);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}
示例3: WndProc
//.........这里部分代码省略.........
EnableMenuItem( hMenu, IDM_OPT_INTERNAL, MF_ENABLED );
g_dpSrvr.m_bCheckAddr = false;
}
}
break;
/*
#ifdef __S0114_RELOADPRO
case IDT_RELOAD_PROJECT:
{
if( g_dpSrvr.m_bReloadPro )
g_DbManager.Load_ReloadAccount();
}
break;
#endif // __S0114_RELOADPRO
*/
case IDT_BUYING_INFO:
CBuyingInfoMng::GetInstance()->Process();
break;
}
}
break;
case WM_COMMAND:
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
// Parse the menu selections:
switch (wmId)
{
case IDM_EXIT:
DestroyWindow(hWnd);
break;
case IDM_OPT_INTERNAL:
{
HMENU hMenu = GetMenu( hWnd );
CheckMenuItem( hMenu, IDM_OPT_INTERNAL, MF_CHECKED );
EnableMenuItem( hMenu, IDM_OPT_INTERNAL, MF_DISABLED | MF_GRAYED );
CheckMenuItem( hMenu, IDM_OPT_EXTERNAL, MF_UNCHECKED );
EnableMenuItem( hMenu, IDM_OPT_EXTERNAL, MF_ENABLED );
g_dpSrvr.m_bCheckAddr = true;
break;
}
case IDM_OPT_EXTERNAL:
{
HMENU hMenu = GetMenu( hWnd );
CheckMenuItem( hMenu, IDM_OPT_EXTERNAL, MF_CHECKED );
EnableMenuItem( hMenu, IDM_OPT_EXTERNAL, MF_DISABLED | MF_GRAYED );
CheckMenuItem( hMenu, IDM_OPT_INTERNAL, MF_UNCHECKED );
EnableMenuItem( hMenu, IDM_OPT_INTERNAL, MF_ENABLED );
g_dpSrvr.m_bCheckAddr = false;
break;
}
case IDM_OPT_MAX_CONN:
{
DialogBox( hInst, MAKEINTRESOURCE( IDD_DIALOG_MAX_CONN ), hWnd, MaxConnDlgProc );
break;
}
case IDM_OPT_TOGGLE:
{
DialogBox( hInst, MAKEINTRESOURCE( IDD_DIALOG_TOGGLE ), hWnd, ToggleDlgProc );
break;
}
case IDM_OPT_SETTIME:
{
DialogBox( hInst, MAKEINTRESOURCE( IDD_DIALOG_TIME ), hWnd, SetTimeDlgProc );
break;
}
case IDM_OPT_INTERNAL_IP:
{
g_dpSrvr.LoadAddrPmttd( "pmttd.ini" );
g_dpSrvr.LoadIPCut( "IPCut.ini" );
break;
}
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
break;
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
g_MyTrace.Paint( hdc );
EndPaint(hWnd, &ps);
break;
case WM_DESTROY:
KillTimer( hMainWnd, IDT_SENDPLAYERCOUNT );
if( ::GetLanguage() == LANG_THA )
KillTimer( hMainWnd, IDT_PREVENT_EXCESS );
/*
#ifdef __S0114_RELOADPRO
KillTimer( hMainWnd, IDT_RELOAD_PROJECT );
#endif // __S0114_RELOADPRO
*/
PostQuitMessage(0);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}