本文整理汇总了C++中ThumbInfo::RefreshContactStatus方法的典型用法代码示例。如果您正苦于以下问题:C++ ThumbInfo::RefreshContactStatus方法的具体用法?C++ ThumbInfo::RefreshContactStatus怎么用?C++ ThumbInfo::RefreshContactStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ThumbInfo
的用法示例。
在下文中一共展示了ThumbInfo::RefreshContactStatus方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DefWindowProc
static LRESULT __stdcall CommWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
ThumbInfo *pThumb = thumbList.FindThumb(hwnd);
switch (uMsg) {
case WM_RBUTTONUP:
{
POINT pt;
pt.x = LOWORD(lParam);
pt.y = HIWORD(lParam);
if (pThumb) pThumb->ThumbDeselect(TRUE);
ClientToScreen(hwnd, &pt);
ShowContactMenu(hwnd, pt);
}
break;
case WM_CLOSE:
DestroyWindow(hwnd);
break;
case WM_NCPAINT:
if (pThumb) {
HDC hdc = GetWindowDC(hwnd);
BitBlt(hdc, 0, 0, pThumb->bmpContent.getWidth(), pThumb->bmpContent.getHeight(), pThumb->bmpContent.getDC(), 0, 0, SRCCOPY);
//RepaintWindow( hwnd, hdc );
ReleaseDC(hwnd, hdc);
ValidateRect(hwnd, NULL);
return 0;
}
case WM_PAINT:
if (pThumb) {
PAINTSTRUCT ps;
HDC hdc = BeginPaint(hwnd, &ps);
BitBlt(hdc, 0, 0, pThumb->bmpContent.getWidth(), pThumb->bmpContent.getHeight(), pThumb->bmpContent.getDC(), 0, 0, SRCCOPY);
//RepaintWindow( hwnd, hdc );
EndPaint(hwnd, &ps);
break;
}
case WM_PRINT:
case WM_PRINTCLIENT:
if (pThumb) {
BitBlt((HDC)wParam, 0, 0, pThumb->bmpContent.getWidth(), pThumb->bmpContent.getHeight(), pThumb->bmpContent.getDC(), 0, 0, SRCCOPY);
//RepaintWindow(hwnd, (HDC)wParam);
break;
}
case WM_MEASUREITEM:
Menu_MeasureItem((LPMEASUREITEMSTRUCT)lParam);
break;
case WM_DRAWITEM:
Menu_DrawItem((LPDRAWITEMSTRUCT)lParam);
break;
case WM_LBUTTONDOWN:
if (pThumb) pThumb->OnLButtonDown();
break;
case WM_MOUSEMOVE:
if (pThumb) pThumb->OnMouseMove(LOWORD(lParam), HIWORD(lParam));
break;
case WM_LBUTTONUP:
if (pThumb) pThumb->OnLButtonUp();
break;
case WM_LBUTTONDBLCLK:
// Popup message dialog
if (!fcOpt.bUseSingleClick && pThumb)
pThumb->PopupMessageDialog();
break;
case WM_RBUTTONDOWN:
if (bEnableTip && fcOpt.bShowTip && pThumb)
pThumb->KillTip();
break;
case WM_REFRESH_CONTACT:
if (pThumb) {
_tcsncpy(pThumb->ptszName, pcli->pfnGetContactDisplayName(pThumb->hContact, 0), USERNAME_LEN - 1);
pThumb->RefreshContactStatus((int)lParam);
pThumb->ResizeThumb();
}
break;
case WM_TIMER:
if (pThumb)
pThumb->OnTimer(wParam);
break;
case WM_HOTKEY:
pThumb = thumbList.FindThumb((HWND)wParam);
if (pThumb)
pThumb->PopupMessageDialog();
}
//.........这里部分代码省略.........