define the renderer state of widget
More...the flag defines of renderer
More...the arrow define of renderer
More...| #define NCS_MAP_NOTIFY | ( | code, | |||
| handler | ) | { NCS_NOTIFY_CODE(code), (void*)(handler) } |
| #define NCS_NOTIFY_CODE | ( | code | ) | (0xFFFF0000 | (code)) |
| #define NCSCTRL_WIDGET NCSCLASSNAME("widget") |
| #define NCSR_CONTINUE_MSG FALSE |
return value, pass the message to the default window process
| #define NCSR_STOP_MSG TRUE |
return value, return directly, don't pass the message to default window process
| void(* NCS_CB_NOTIFY)(mWidget *, int id, int ncCode, DWORD param) |
| BOOL(* NCS_CB_ONCLOSE)(mWidget *) |
| BOOL(* NCS_CB_ONCMD)(mWidget *, int id, int nc, HWND hCtrl) |
| BOOL(* NCS_CB_ONCREATE)(mWidget *, DWORD dwAddData) |
the callback of event MSG_CREATE
| mWidget | * the event sender's pointer | |
| dwAddData | the additional data when create this window, passed by ncscreatewindow, ncscreatewindowindirect, ncscreatemainwindow ncscreatemainwindowindirect |
| void(* NCS_CB_ONCSZCHGED)(mWidget *, int clientWidth, int clientHeight) |
| BOOL(* NCS_CB_ONERASEBKGND)(mWidget *, HDC hdc, const PRECT clip) |
the callback of event MSG_ERASEBKGND
| mWidget | * the sender pointer | |
| hdc | the DC of background, hdc may be 0, so you shoud check it, and call GetClientDC or GetDC when hdc == 0 | |
| clip | the area should to be erased. clip may be equal NULL, so, call GetWindowRect, or GetClientRect when clip == NULL |
| BOOL(* NCS_CB_ONFONTCHGING)(mWidget *, PLOGFONT logFont) |
the callback of event MSG_FONTCHANGING
This event is called when SetWindowFont is called
| mWidget | * then sender pointer | |
| logFont | the logic font would be set to sender |
| int(* NCS_CB_ONHITTEST)(mWidget *, int message, int x, int y) |
| BOOL(* NCS_CB_ONINITDLG)(mWidget *, HWND hFocus, DWORD dwAddData) |
the callback of event MSG_INITDIALOG, only valid in mDialogBox, when a dialog is created
| mWidget | * the sender pointer of event | |
| hFocus | the focus window when dialog is created | |
| dwAddData | the additional data passed by ncscreatewindow, ncscreatewindowindirect, ncscreatemainwindow ncscreatemainwindowindirect |
| BOOL(* NCS_CB_ONKEY)(mWidget *, int message, int code, DWORD keyStatus) |
the callback of event MSG_KEYDOWN MSG_KEYUP MSG_CHAR MSG_SYSKEYDOWN MSG_SYSKEYUP MSG_SYSCHAR
| mWidget | * the sender pointer | |
| message | event code, distinguish the events | |
| code | the scancode (MSG_KEYDOWN MSG_KEYUP MSG_SYSKEYDOWN MSG_SYSKEYUP) or ascii code (MSG_CHAR MSG_SYSCHAR) | |
| keyStatus | The shift key status when this message occurred |
| BOOL(* NCS_CB_ONMOUSE)(mWidget *, int message, int x, int y, DWORD keyStatus) |
the callback of events MSG_LBUTTONDOWN MSG_LBUTTONUP MSG_LBUTTONDBCLK MSG_MOUSEMOVE MSG_RBUTTONDOWN MSG_RBUTTONUP MSG_RBUTTONDBCLK
| mWidget | * sender pointer | |
| message | the event code | |
| x | the x-coordinate of mouse | |
| y | the y-coordinate of mouse | |
| keyStatus | The shift key status when this message occurred. |
| int(* NCS_CB_ONMSG)(mWidget *, int message, WPARAM wParam, LPARAM lParam) |
the callback of a common message event
| mWidget | * sender pointer | |
| message | the event code | |
| wParam | the wParam of message event | |
| lParam | the lParam of message event |
| typedef void(* NCS_CB_ONNCCREATE)(mWidget *) |
| BOOL(* NCS_CB_ONNCMOUSE)(mWidget *, int message, int x, int y, int hitCode) |
the callback of events MSG_NCLBUTTONDOWN MSG_NCLBUTTONUP MSG_NCLBUTTONDBCLK MSG_NCMOUSEMOVE MSG_NCRBUTTONDOWN MSG_NCRBUTTONUP MSG_NCRBUTTONDBCLK
| mWidget | * the sender pointer | |
| message | the event code | |
| x | the x-coordinate of mouse | |
| y | the y-coordinate of mouse | |
| hitCode | the hit code |
| void(* NCS_CB_ONPAINT)(mWidget *, HDC hdc, const PCLIPRGN clip_rgn) |
| void(* NCS_CB_ONSCROLL)(mWidget *, int message, int code, int pos) |
| BOOL(* NCS_CB_ONSZCHGED)(mWidget *, PRECT prcClient) |
the callback of event MSG_SIZECHANGED
This callback is called after a widget's bound changed if you want change the client size of the sender, reset the prcClient
| mWidget | * the sender pointer | |
| prcClient | IN & OUT param, the client bound of the sender |
| void(* NCS_CB_ONSZCHGING)(mWidget *, const PRECT prcExpect, PRECT prcResult) |
the callback of event MSG_SIZECHANGING, when a widget's bound is changing. If you want change the widget bounds, set the prcResult, by default, copy prcExpect to prcResult
| mWidget | * the sender pointer | |
| prcExpect | the excepted bound, IN param | |
| prcResult | the resulted bound, OUT param, |
| BOOL(* NCS_CB_ONVOID)(mWidget *, int message) |
the callback of events MSG_ACTIVE MSG_FONTCHANGED MSG_KEYLONGPRESS MSG_KEYALWAYSPRESS MSG_DESTROY
| mWidget | * the pointer of sender | |
| message | the event code, indicate the event |
| void(* NCS_CB_WIDGET_ONTIMER)(mWidget *, int id, DWORD count) |
| enum mWidgetNotify |
the notification code of mWidget
| enum mWidgetProp |
the properties id of mWidget
| enum ncsRDRArrow |
| enum ncsRendererFlag |
| enum ncsRendererState |
the instance of mWigetClass
1.6.3