void ContextMenu::addstring(const string_type& str){ AppendMenu(hmenu, MF_STRING, 0, str.c_str()); }void ContextMenu::trackpopupmenu(){
 
  SetForegroundWindow(hwnd);
  TrackPopupMenu(hmenu, TPM_LEFTALIGN, point.x, point.y, 0, hwnd, NULL);
  PostMessage(hwnd, WM_NULL, 0, 0);
}调用处
context_menu = new controls::ContextMenu(hwnd(), point);
context_menu->addstring(string_type(L"test"));
context_menu->trackpopupmenu();