Global Control function
[Global defines]

Data Structures

Typedefs

Functions


Typedef Documentation

A struct include the creating info for creating window

Note:
This struct is used by ncsCreateWindow, donot use it directly. If you want to create a NCS widget by MiniGUI API CreateWindow, pass the NCS_CREATE_INFO* as Additional data

A struct wrap the NCS_CREATE_INFO

Note:
only allowed using in ncsCreateMainWindow Don't use it directly
See also:
NCS_CREATE_INFO, ncsCreateMainWindow , ncsCreateMainWindowIndirect

A struct include all the creating info for ncsCreateMainWindowIndirect,

Note:
same as ncsCreateMainWindow 's params
See also:
NCS_WND_TEMPLATE, ncsCreateMainWindow

A property entry

Note:
this struct is used when calling ncsCreateXXX functions
See also:
NCS_CREATE_INFO NCS_WND_TEMPLATE NCS_MNWND_TEMPLATE

A renderer element struct

Note:
This struct is used by NCS_RDR_INFO when create a NCS widget
See also:
NCS_RDR_INFO
typedef struct _NCS_RDR_INFO NCS_RDR_INFO

A struct used to include all the renderer info when create a widget

See also:
NCS_CREATE_INFO, NCS_MAIN_CREATE_INFO, NCS_WND_TEMPLATE, NCS_MNWND_TEMPLATE

Function Documentation

mWidget * ncsCreateMainWindow ( const char *  className,
const char *  caption,
DWORD  style,
DWORD  exStyle,
int  id,
int  x,
int  y,
int  w,
int  h,
HWND  host,
HICON  hIcon,
HMENU  hMenu,
NCS_PROP_ENTRY props,
NCS_RDR_INFO rdrInfo,
NCS_EVENT_HANDLER handlers,
DWORD  addData 
)

create a NCS main window

Parameters:
className the class name of widget. the class name must be register by ncsRegisterComponent. And must be NCSCTRL_MAINWND or its dirved class.
caption the caption of the main window
style the style of main window
exStyle the extend style of main window
id the id of main window
x the x position of main window
y the y position of main window
w the width of main window
h the height of main window
host the handle of host window, can be NULL
hIcon the icon of main window
hMenu the menu bar handle
props the properties array pointer, end by {-1, 0} if it's not NULL
rdrInfo the renderer info pointer
handlers the handlers of event array pointer, end by {-1, NULL}, if it's not NULL
addData the additional data send to callback NCS_CB_ONCREATE and NCS_CB_ONINITDLG
Returns:
mWidget* - a mWidget pointer, must be a mMainWnd instance
See also:
ncsCreateWindow,ncsCreateWindowIndirect, nscCreateMainWindowIndirect, NCS_PROP_ENTRY, NCS_RDR_INFO, NCS_EVENT_HANDLER, NCS_CB_ONCREATE, mWidget, mInvisibleComponent , mMainWnd
mWidget * ncsCreateMainWindowIndirect ( const NCS_MNWND_TEMPLATE tmpl,
HWND  hHost 
)

create a main window from a template

Parameters:
tmpl - the template of main window
hHost - the host window handler of the main window
Returns:
mWidget * - the Instance of mMainWnd or NULL
See also:
ncsCreateMainWindow, NCS_MNWND_TEMPLATE
mWidget * ncsCreateWindow ( const char *  className,
const char *  caption,
DWORD  style,
DWORD  exStyle,
int  id,
int  x,
int  y,
int  w,
int  h,
HWND  parent,
NCS_PROP_ENTRY props,
NCS_RDR_INFO rdrInfo,
NCS_EVENT_HANDLER handlers,
DWORD  addData 
)

create a NCS widget

Parameters:
className the class name of widget. the class name must be register by ncsRegisterComponent. Any drived from mComponent and registered component is validate
caption the caption of the widget, ignored if class_name is a mInvsbComp
style the style of widget, ignored if class_name is a mInvsbComp
exStyle the extend style of widget, ignored if class_name is a mInvsbComp
id the id of component
x the x position of widget, ignored if class_name is a mInvsbComp
y the y position of widget, ignored if class_name is a mInvsbComp
w the width of widget ,ignored if class_name is a mInvsbComp
h the height of widget , ignored if class_name is a mInvsbComp
parent the handle of parent, if class_name is a mInvsbComp, the parent must releated a mWidget object
props the properties array pointer, end by {-1, 0} if it's not NULL
rdrInfo the renderer info pointer
handlers the handlers of event array pointer, end by {-1, NULL}, if it's not NULL
addData the additional data send to callback NCS_CB_ONCREATE
Returns:
mWidget* - a mWidget pointer, if class_name is a mInvsbComp, it's a mInvisibleComponent* pointer
See also:
ncsCreateMainWindow, nscCreateWindowIndirect, NCS_PROP_ENTRY, NCS_RDR_INFO, NCS_EVENT_HANDLER, NCS_CB_ONCREATE, mWidget, mInvisibleComponent
mWidget * ncsCreateWindowIndirect ( const NCS_WND_TEMPLATE tmpl,
HWND  hParent 
)

create a mComponent by NCS_WND_TEMPLATE,

Parameters:
tmpl the template pointer
hParent the parent handle, if NCS_WND_TEMPLATE.class_name is a mInvsbComp, hParent must releated a mWidget object
Returns:
mWidget* - then pointer of object or NULL if failed
See also:
ncsCreateWindow, NCS_WND_TEMPLATE
void ncsDestroyWindow ( mWidget self,
DWORD  endCode 
)

delete the widget window created by ncs.

static inline mWidget * ncsGetChildObj ( HWND  hwnd,
int  id 
) [inline, static]

Get the child object pointer of window.

Parameters:
hwnd - the handle of window, which can be a normal MiniGUI window or a NCS window
id - the child id. The child must be a NCS window
Returns:
mWidget * the instance releated id, or NULL

Definition at line 1227 of file mwidget.h.

References _c, and ncsObjFromHandle().

static inline DWORD ncsGetDlgCode ( HWND  hwnd  )  [inline, static]

Get the dialog code of a NCS window.

Parameters:
hwnd - the handle of NCS window
Returns:
DWORD - the dialog code or 0

Definition at line 1255 of file mwidget.h.

References _c, and ncsObjFromHandle().

mWidgetClass * ncsGetMainWndClass ( const char *  className  ) 

Get a Main window Class by className.

Note:
this function is used to develop a drived class of mMainWnd
Parameters:
className - the class name of main window , if className == NULL or invalidate name, the function return mMainWnd's class
Returns:
mWidgetClass* - the mMainWndClass pointer or its drived class pointer
static inline mWidget * ncsGetParentObj ( HWND  hwnd  )  [inline, static]

Get the parent object pointer of window.

Parameters:
hwnd - the handle of child window, which can be a normal MiniGUI window or a NCS window
Returns:
mWidget * the instance of parent of hwnd

Definition at line 1241 of file mwidget.h.

References ncsObjFromHandle().

void * ncsGetProperty ( HWND  hWnd,
int  id 
)

get control's property

Parameters:
hWnd - the handle of control
id - the property id
Returns:
the value of property
See also:
ncsSetProperty
void ncsNotifyParentEx ( mWidget self,
int  code,
DWORD  addData 
)

raise a notification event

Note:
this function is used to develop a drived class of mWidget
Parameters:
self - the mWidget object who want to raise a event
code - the notification event code
addData - the additional data.
static inline mWidget * ncsObjFromHandle ( HWND  hwnd  )  [inline, static]

Get a Object from window handle.

Parameters:
hwnd - the handle of window
Returns:
mWidget * the instance releated this handle, or NULL

Definition at line 1211 of file mwidget.h.

Referenced by ncsGetChildObj(), ncsGetDlgCode(), and ncsGetParentObj().

BOOL ncsSetFont ( HWND  hWnd,
const char *  fontName 
)

set control's font

Parameters:
hWnd - the handle of control
fontName - the name of a logical font
Returns:
suceess or not
BOOL ncsSetProperty ( HWND  hWnd,
int  id,
DWORD  value 
)

set control's property

Parameters:
hWnd - the handle of control
id - the property id of control
value - the value of property
Returns:
suceess or not
See also:
ncsGetProperty
Generated on Fri Jun 10 11:18:07 2011 for New Control Set V1.0.0 API Reference by  doxygen 1.6.3