本文整理汇总了C++中CStatusBar::SetWindowPos方法的典型用法代码示例。如果您正苦于以下问题:C++ CStatusBar::SetWindowPos方法的具体用法?C++ CStatusBar::SetWindowPos怎么用?C++ CStatusBar::SetWindowPos使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CStatusBar
的用法示例。
在下文中一共展示了CStatusBar::SetWindowPos方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WndProc
//.........这里部分代码省略.........
version.DoModal(window);
break;
}
break;
// Right-click Menu
case WM_CONTEXTMENU:
CreateMenu(lp);
break;
case WM_MOUSEWHEEL:
{
POINT pos;
GetCursorPos(&pos);
HWND point_window = WindowFromPoint(pos);
if (point_window == list_view.GetHandle())
SendMessage(point_window, WM_MOUSEWHEEL, wp, lp);
break;
}
case WM_NOTIFY:
{
// Toolbar
if (wp == ID_TOOLBAR)
{
LPNMTOOLBAR nm = reinterpret_cast<LPNMTOOLBAR>(lp);
switch (nm->hdr.code)
{
// File History
case TBN_DROPDOWN:
main_tool_bar.CreateMenuHistory(nm->iItem);
break;
}
}
// List view
if (wp == idsMainList)
{
LPNMLISTVIEW nm = reinterpret_cast<LPNMLISTVIEW>(lp);
switch (nm->hdr.code)
{
// Sort
case LVN_COLUMNCLICK:
list_view.Sort(nm->iSubItem);
break;
// Show Tooltips
case LVN_GETINFOTIP:
list_view.ShowTip(reinterpret_cast<LPNMLVGETINFOTIP>(lp));
break;
// View
case LVN_GETDISPINFO:
list_view.Show(reinterpret_cast<NMLVDISPINFO*>(lp));
break;
// D&D (Drag & Drop)
case LVN_BEGINDRAG:
{
//extract.SaveDrop();
LRESULT result;
list_view.OnBeginDrag(reinterpret_cast<NMHDR*>(lp), &result);
break;
}
// Playback / Viewing by double-clicking
case NM_DBLCLK:
if (list_view.GetCountSel() > 0)
{
extract.DecodeTmp();
extract.OpenRelate();
}
break;
}
}
break;
}
case WM_SIZE:
main_tool_bar.SetWindowPos(0, 0, 100, 26);
search_tool_bar.SetWindowPos(100, 0, LOWORD(lp), 26);
list_view.SetWindowPos(0, 28, LOWORD(lp), HIWORD(lp) - 48);
status_bar.SetWindowPos(LOWORD(lp));
break;
case WM_CLOSE:
// Save
SaveIni();
list_view.SaveIni();
// Clean up
extract.Close();
DestroyWindow(window);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return DefWindowProc(window, msg, wp, lp);
}
return 0;
}