58struct Window :
public WindowHandle
71 DWORD dwStyle,
int x,
int y,
int w,
int h,
76 DWORD dwStyle,
int x,
int y,
int w,
int h,
88#define GET_WINDOW(CLASS, hwnd) Window::get_window<CLASS>(hwnd)
142#define NFR_CURRENT NFR_UNICODE
144#define NFR_CURRENT NFR_ANSI
149template<
typename CLASS>
struct GetWindowHelper
151 static CLASS* get_window(
HWND hwnd) {
152 return static_cast<CLASS*
>(Window::get_window(
hwnd));
155#define GET_WINDOW(CLASS, hwnd) GetWindowHelper<CLASS>::get_window(hwnd)
163 {
return dynamic_cast<CLASS*
>(wnd);}
166#define WINDOW_DYNAMIC_CAST(CLASS, hwnd) \
167 TypeCheck<CLASS>::dyn_cast(Window::get_window(hwnd))
198 return new WND_CLASS(
hwnd);
202#define WINDOW_CREATOR(WND_CLASS) \
203 ((Window::CREATORFUNC) WindowCreator<WND_CLASS>::window_creator)
211 return new WND_CLASS(
hwnd, *
static_cast<const INFO_CLASS*
>(
info));
215#define WINDOW_CREATOR_INFO(WND_CLASS, INFO_CLASS) \
216 ((Window::CREATORFUNC_INFO) WindowCreatorInfo<WND_CLASS, INFO_CLASS>::window_creator)
265#define PM_DISPATCH_COMMAND (WM_APP+0x00)
266#define PM_TRANSLATE_MSG (WM_APP+0x01)
270#define DEFAULT_SPLIT_POS 300
271#define COLOR_SPLITBAR LTGRAY_BRUSH
280#define PM_FRM_GET_MENUINFO (WM_APP+0x02)
282#define Frame_GetMenuInfo(hwnd) ((MenuInfo*)SNDMSG(hwnd, PM_FRM_GET_MENUINFO, 0, 0))
340#define PM_SETSTATUSTEXT (WM_APP+0x1E)
387#define PM_FRM_CALC_CLIENT (WM_APP+0x03)
388#define Frame_CalcFrameClient(hwnd, prt) ((BOOL)SNDMSG(hwnd, PM_FRM_CALC_CLIENT, 0, (LPARAM)(PRECT)prt))
390#define PM_JUMP_TO_URL (WM_APP+0x25)
391#define PM_URL_CHANGED (WM_APP+0x26)
487 typedef std::list<ResizeEntry>
super;
593#define PM_DISPATCH_CTLCOLOR (WM_APP+0x08)
621#define PM_DISPATCH_DRAWITEM (WM_APP+0x09)
973 tvItem.hItem =
hItem;
984#define PM_TRAYICON (WM_APP+0x20)
986#define WINMSG_TASKBARCREATED TEXT("TaskbarCreated")
988#define WINMSG_SHELLHOOK TEXT("SHELLHOOK")
RTL_CRITICAL_SECTION CritSect
static struct myctx * mcs
static const WCHAR start_page[]
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLdouble GLdouble GLdouble GLdouble top
GLubyte GLubyte GLubyte GLubyte w
GLfloat GLfloat GLfloat GLfloat h
int ListView_GetFocusedItem(HWND list_ctrl)
#define PM_DISPATCH_CTLCOLOR
LPARAM TreeView_GetItemData(HWND hwndTreeView, HTREEITEM hItem)
#define PM_FRM_CALC_CLIENT
RESIZE_FLAGS
Flags to specify how to move and resize controls when resizing their parent window.
int ListView_FindItemPara(HWND list_ctrl, LPARAM param)
#define PM_DISPATCH_DRAWITEM
#define WINMSG_TASKBARCREATED
void DrawGrayText(HDC hdc, LPRECT pRect, LPCTSTR text, int dt_flags)
int ListView_GetItemData(HWND list_ctrl, int idx)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static const struct access_res create[16]
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
unsigned __int3264 UINT_PTR
_Out_opt_ int _Out_opt_ int * cy
#define TreeView_GetItem(hwnd, pitem)
#define ListView_GetItemState(hwndLV, i, mask)
#define LPSTR_TEXTCALLBACK
#define ListView_GetItemCount(hwnd)
#define ListView_GetItem(hwnd, pitem)
int(CALLBACK * PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM)
#define ListView_FindItem(hwnd, iStart, plvfi)
NOTIFYICONDATAA NOTIFYICONDATA
window class with gray background color
BtnWindowClass(LPCTSTR classname, UINT style=0, WNDPROC wndproc=Window::WindowWndProc)
stack< String > _url_history
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
virtual void resize_children(int cx, int cy)
virtual String jump_to_int(LPCTSTR url)=0
void set_url(LPCTSTR url)
information structure for creation of a MDI child window
ChildWndInfo(HWND hmdiclient)
ColorStatic(HWND hwnd, COLORREF textColor=RGB(255, 0, 0), HBRUSH hbrush_bkgnd=0, HFONT hfont=0)
ColorStatic(HWND owner, int id, COLORREF textColor=RGB(255, 0, 0), HBRUSH hbrush_bkgnd=0, HFONT hfont=0)
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
CtlColorParent(HWND hwnd)
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
static int DoModal(UINT nid, CREATORFUNC creator, HWND hwndParent=0)
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
EditController(HWND hwnd)
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
window class with specified icon from resources
void toggle_sort(int idx)
PFNLVCOMPARE _compare_fct
static int CALLBACK CompareFunc(LPARAM lparam1, LPARAM lparam2, LPARAM lparamSort)
draw message routing for ColorButton and PictureButton
OwnerDrawParent(HWND hwnd)
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Property Sheet Page (inner dialog)
static INT_PTR CALLBACK DialogProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
Window::CREATORFUNC _dlg_creator
void init(struct PropertySheetDialog *)
int DoModal(int start_page=0)
void add(PropSheetPage &psp)
vector< PROPSHEETPAGE > Vector
Controller base template class for resizable dialogs.
ResizeManager _resize_mgr
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
virtual void GetClientSpace(PRECT prect)
ResizeController(HWND hwnd)
structure to assign RESIZE_FLAGS to dialogs control
ResizeEntry(UINT id, int flags)
ResizeEntry(HWND hwnd, int flags)
Management of controls in resizable dialogs.
void Resize(int dx, int dy)
void Add(HWND hwnd, int flags)
void Add(UINT id, int flags)
void SetMinMaxInfo(LPMINMAXINFO lpmmi)
std::list< ResizeEntry > super
void HandleSize(int cx, int cy)
static LRESULT CALLBACK SubclassedWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
virtual LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
virtual int Notify(int id, NMHDR *pnmh)
const UINT WM_TASKBARCREATED
TrayIconControllerTemplate(HWND hwnd)
virtual void TrayDblClick(UINT id, int btn)
virtual void TrayClick(UINT id, int btn)
virtual void AddTrayIcons()=0
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
virtual void TrayMouseOver(UINT id)
void Set(DWORD dwMessage, UINT id, HICON hIcon, LPCTSTR tooltip=NULL)
TrayIcon(HWND hparent, UINT id)
void Modify(HICON hIcon, LPCTSTR tooltip=NULL)
void Add(HICON hIcon, LPCTSTR tooltip=NULL)
dynamic casting of Window pointers
static CLASS * dyn_cast(Window *wnd)
template class used in macro WINDOW_CREATOR_INFO to the define creater functions for Window objects w...
static WND_CLASS * window_creator(HWND hwnd, const void *info)
template class used in macro WINDOW_CREATOR to define the creater functions for Window objects
static WND_CLASS * window_creator(HWND hwnd)
structure for managing critical sections as static class information in struct Window
CritSect _create_crit_sect
static void CancelModes()
static LRESULT CALLBACK MDICBTHookProc(int code, WPARAM wparam, LPARAM lparam)
static void register_dialog(HWND hwnd)
static CREATORFUNC s_window_creator
static INT_PTR CALLBACK DialogProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
virtual LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Window *(* CREATORFUNC_INFO)(HWND, const void *)
static StaticWindowData & GetStaticWindowData()
LRESULT SendParent(UINT nmsg, WPARAM wparam=0, LPARAM lparam=0)
static const void * s_new_info
static void unregister_dialog(HWND hwnd)
static Window * create_mdi_child(const ChildWndInfo &info, const MDICREATESTRUCT &mcs, CREATORFUNC_INFO creator)
static void register_pretranslate(HWND hwnd)
map< HWND, Window * > WindowMap
static WindowMap s_wnd_map
static WindowSet s_dialogs
static Window * create_controller(HWND hwnd)
create controller for a new window
LRESULT PostParent(UINT nmsg, WPARAM wparam=0, LPARAM lparam=0)
Window *(* CREATORFUNC)(HWND)
static BOOL pretranslate_msg(LPMSG pmsg)
static void unregister_pretranslate(HWND hwnd)
static LRESULT CALLBACK WindowWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
static WindowSet s_pretranslate_windows
static CLASS * get_window(HWND hwnd)
static Window * get_window(HWND hwnd)
get window controller from window handle
static BOOL dispatch_dialog_msg(LPMSG pmsg)
virtual int Notify(int id, NMHDR *pnmh)
static LRESULT CALLBACK PropSheetCBTHookProc(int code, WPARAM wparam, LPARAM lparam)
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
#define SelectFont(hdc, hfont)
int WINAPI SetBkMode(_In_ HDC, _In_ int)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
#define WM_CTLCOLORSTATIC
BOOL WINAPI GetWindowPlacement(_In_ HWND, _Inout_ WINDOWPLACEMENT *)
HBRUSH WINAPI GetSysColorBrush(_In_ int)
#define WM_CTLCOLORSCROLLBAR
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
BOOL WINAPI IsIconic(_In_ HWND)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define RegisterWindowMessage
HWND WINAPI GetParent(_In_ HWND)
int WINAPI GetDlgCtrlID(_In_ HWND)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
int WINAPI GetSystemMetrics(_In_ int)