3 #ifndef _DROPDOWN_HELPER_H_ 4 #define _DROPDOWN_HELPER_H_ 13 virtual void set_state(
const char * val) = 0;
16 void on_init(HWND ctrl,
const char * initVal) {
22 bool add_item(
const char * item, HWND combobox);
39 void set_state(
const char * val) {m_state.set(val);}
46 #define DROPDOWN_HISTORY_HANDLER(ctrlID,var) \ 47 if(uMsg == WM_CONTEXTMENU) { \ 48 const HWND source = (HWND) wParam; \ 49 if (source != NULL && source == CWindow(hWnd).GetDlgItem(ctrlID)) { \ 50 var.on_context(source,lParam); \ 56 #endif //_DROPDOWN_HELPER_H_
void setup_dropdown(HWND wnd)
cfg_dropdown_history_mt(const GUID &p_guid, unsigned p_max=10, const char *init_vals="")
void set_state(const char *val)
virtual void set_state(const char *val)=0
cfg_dropdown_history(const GUID &p_guid, unsigned p_max=10, const char *init_vals="")
void build_list(pfc::ptr_list_t< char > &out)
virtual void get_state(pfc::string_base &out) const =0
void get_state(pfc::string_base &out) const
_cfg_dropdown_history_base(unsigned p_max)
void set_state(const char *val)
BOOL SHARED_EXPORT uSetWindowText(HWND wnd, const char *p_text)
void get_state(pfc::string_base &out) const
String config variable. Stored in the stream with int32 header containing size in bytes...
void on_init(HWND ctrl, const char *initVal)
bool on_context(HWND wnd, LPARAM coords)
bool add_item(const char *item)
void parse_list(const pfc::ptr_list_t< char > &src)
void setup_dropdown(HWND wnd, UINT id)