mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-26 12:27:58 +08:00
move gui_Control to ctrlclass.h as inline function
This commit is contained in:
@@ -150,6 +150,8 @@ extern BOOL RegisterScrollBarControl (void);
|
||||
|
||||
static PCTRLCLASSINFO ccitable[LEN_CCITABLE];
|
||||
|
||||
#if 0 /* depcreated code */
|
||||
/* since 5.0.0, moved to ctrlclass.h as inline */
|
||||
PCONTROL gui_Control (HWND hWnd)
|
||||
{
|
||||
PCONTROL pCtrl;
|
||||
@@ -161,6 +163,7 @@ PCONTROL gui_Control (HWND hWnd)
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#endif /* deprecated code */
|
||||
|
||||
BOOL mg_InitControlClass ()
|
||||
{
|
||||
|
||||
+12
-5
@@ -213,6 +213,16 @@ typedef CONTROL* PCONTROL;
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* check whether hWnd is controland return pointer to control hWnd. */
|
||||
static inline PCONTROL gui_Control (HWND hWnd)
|
||||
{
|
||||
if (hWnd && hWnd != HWND_INVALID &&
|
||||
((PCONTROL)hWnd)->WinType == TYPE_CONTROL)
|
||||
return (PCONTROL)hWnd;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
BOOL mg_InitControlClass (void);
|
||||
void mg_TerminateControlClass (void);
|
||||
|
||||
@@ -221,12 +231,9 @@ int gui_ControlClassDataOp (int Operation, PWNDCLASS pWndClass);
|
||||
|
||||
int gui_DeleteControlClass (const char* szClassName);
|
||||
void gui_EmptyControlClassInfoTable (void);
|
||||
PCONTROL gui_Control (HWND hWnd); // check whether hWnd is control
|
||||
// and return pointer to control hWnd.
|
||||
|
||||
/* Undisclosed APIs */
|
||||
MG_EXPORT int gui_AddNewControlClass (PWNDCLASS pWndClass);
|
||||
MG_EXPORT BOOL gui_SetWindowExStyle (HWND hWnd, DWORD dwExStyle);
|
||||
int gui_AddNewControlClass (PWNDCLASS pWndClass);
|
||||
BOOL gui_SetWindowExStyle (HWND hWnd, DWORD dwExStyle);
|
||||
|
||||
#ifdef _DEBUG_CTRL
|
||||
void dbg_DumpCtrlClassInfoTable (void);
|
||||
|
||||
Reference in New Issue
Block a user