105 int coords_x = (short)LOWORD(coords), coords_y = (short)HIWORD(coords);
106 if (coords_x == -1 && coords_y == -1)
109 GetWindowRect(wnd,&asdf);
110 coords_x = (asdf.left + asdf.right) / 2;
111 coords_y = (asdf.top + asdf.bottom) / 2;
113 enum {ID_ERASE_ALL = 1, ID_ERASE_ONE };
114 HMENU menu = CreatePopupMenu();
115 uAppendMenu(menu,MF_STRING,ID_ERASE_ALL,
"Wipe history");
120 uAppendMenu(menu,MF_STRING,ID_ERASE_ONE,
"Remove this history item");
122 int cmd = TrackPopupMenu(menu,TPM_RIGHTBUTTON|TPM_NONOTIFY|TPM_RETURNCMD,coords_x,coords_y,0,wnd,0);
131 uSendMessage(wnd,CB_RESETCONTENT,0,0);
145 if (!strcmp(value,list[n]))
BOOL SHARED_EXPORT uGetWindowText(HWND wnd, pfc::string_base &out)
virtual void set_state(const char *val)=0
void build_list(pfc::ptr_list_t< char > &out)
static void g_setup_dropdown_fromlist(HWND wnd, const pfc::ptr_list_t< char > &list)
T remove_by_idx(t_size idx)
BOOL SHARED_EXPORT uSetWindowText(HWND wnd, const char *p_text)
BOOL SHARED_EXPORT uAppendMenu(HMENU menu, UINT flags, UINT_PTR id, const char *content)
void parse_list(const pfc::ptr_list_t< char > &src)