********************************* * System functions * ************ *********************
---------------------------------- Name GetScreenMode prototype INT GETSCREENMODE (VOID) Description getting the current screen display GP1288 supports three types of display: monochrome, four grayscale, sixteen grayscale return value: 1 monochrome 2 four grayscale 4 sixteen grayscale error Return: -1 See setscreenmode -------------- ------------------------- Name SetscreenMode Prototype Int setscreenmode (int BPP) Description Set screen display method GP1288 support 3 display modes: monochrome, four Great order, sixteen grayscale bpp = 1 monochrome bpp = 2 four grayscale bpp = 4 sixteen grayscale return value: 0 Successful error Return: -1 See getScreenmode ------------- ---------------------- Name ResetScreen prototype void resetscreen (void) Description Initializing MicroWindow's display engine and redraw screen see --------- -------------------------- Name SetDefaultMenuWindow prototype void setDefaultMenuWindow (HWND HWND) Description Set the default menu control window. This is a special function of MW. When there are multiple window controls, it is best to set this function so that the correct menu content is displayed when the "menu" button on the soft keyboard is pressed.
The menu message is generated within the WM system, and the AP does not need to be processed. If the HWND is set to NULL, the default is the uppermost window for the system default. It should be noted that when the setting, the AP is exited, and then restores it to NULL. See SetDefaultSearchWindow, SetDefault Youwindow ---------------------------------- Name setdefaultsearchWindow prototype void setdefaultsearchWindow (hwnd hwnd) Description Set the default query control window. This is a special function of MW. See setdefaultmenuwindow, setdefaultswitchWindow, setdefaultkeywindow ---------------------------------- Name setdefaultswitchWindow prototype void setdefaultswitchWindow (hwnd hwnd) Description Set the default switching control window. This is a special function of MW. WM_SWITCH_OUT message Generated WM_SWITCH_IN message generated when the task is switched back, set to setdefaultmenuwindow, setdefault manufacturenuwindow, setdefaultkeywindow ---------------------------------------------------------------------------------------------------------------------- ------ Name SetDefaultKeyWindow Prototype Void SetDefaultKeyWindow (HWND HWND) Description Set the default button response control window. This is a special function of MW.
See SetDefaultMenuWindow, SetDefaultSearchWindow, SetDefaultSwitchWindow ----------------------------------- name GetDefaultMenuWindow GetDefaultSearchWindow GetDefaultSwitchWindow GetDefaultKeyWindow prototype HWND GetDefaultMenuWindow ( void) HWND GetDefaultSearchWindow (void) HWND GetDefaultSwitchWindow (void) HWND GetDefaultKeyWindow (void) description get the current menu processing (query task switching, in response to the key) of the main window, returns a handle No. see SetDefaultMenuWindow -------- -------------------------- Name OpenClipboard prototype BOOL OpenClipboard (HWND HOWNER) Description Opens the clipboard. There is only one clipboard. HOWNER wants to open the clipboard window handle return value: successfully returns true, failed to return false See CloseClipboard ------------------------------------------------------------------------------------------------ ----- Name Closeclipboard Prototype BOOL Closeclipboard (Void) Description Close the clipboard. It must be turned off after opening the clipboard.
Return Value: Successful returns true, failure to return false See OpenClipboard --------------------------------- Name Readclipboard prototype Bool ReadClipboard (CHAR * BUF, INT BUF_SIZE) Description Read the contents of the content BUF read from the clipboard BUF_SIZE read length If the read length is less than the data length in the clipboard, the BUF_SIZE-1 long string is read, and End return value with '/ 0': successfully returns true, failed to return false See WriteClipboard ------------------------------- ---- Name WriteClipboard prototype BOOL WRITECLIPBOARD (CHAR * BUF) Description Writing the contents of the content buf to the clipboard, with '/ 0' to end return value: successfully returns true, Failed to return false See READCLIPBOARD - -------------------------------- Name getClipboardsize prototype long getclipboardsize (void) Description getting data length in the current clipboard Return Value: Data lengths See ---------------------------------
Name Isclipboardempty Prototype BOOL ISCLIPBOARDEMPTY (VOID) Description Detects the clipboard to return the value: empty TRUE, non-empty to False See --------------------- ------------ Name EmptyClipboard prototype BOOL EMPTYCLIPBOARD (VOID) Description Empty Clipboard content Return Value: Successful Return true, failure Back False See -------------- -------------------- Name IsclipboardFormatavailable prototype BOOL ISCLIPBOARDFORMATAILALABLE (uint uformat) Description Detects the type of data in the clipboard: Successfully returns true, failed to return false now support Type: CF_Text, that is, only text (other types are available later) See ------------------------------- - Name SetClipboardData prototype Handle SetClipboardData (UINT UFORMAT, HANDLE HMEM) Describes the address return value of the type HMEM data written to the clipboard according to the type of data: Successfully returns true, failed to return FALSE Support type: CF_Text See getClipboardDat -----------------------------------
Name GetClipboardData Prototype Handle getClipboardData (uint uformat) Describes the number of clipboard data address by data: successfully returns the address, failed to return NULL uformat now only support cf_text to setclipboardData -------------------- -------------------- Name SelectClipRGN Prototype INT WINAPI SELECTCLIPRGN (HDC HDC, HRGN HRGN) Description Settings a Customer display area of the graphics device, direct copying mode HDC: graphics device Handle HRGN: Regional data pointer return value: successfully returned region type, failed to return NullRegion (0xfffffffff) See extselectclipRGN --------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Copy RGN_and Take the HDC Old Area and HRGN's Public Some RGN_OR HDC Old Areas and HRGN Overlapping RGN_XOR HDC Old Areas and HRGNs RGN_DIFF HDC Old Areas and HRGN Substance Return Values: Successful Return Regional Type, Failback Returns NullRegion (0xfffffffFF) SelectClipRGN ---------------------------------- Name SwitchTo prototype void switchto (char * fullpath, char * args) Description Switch to another task fullpath another task full path name args parameter,
If there are multiple parameters to separate our SwitchTo and the quitto of SwitchTo and the quitto mentioned below will switch the MicroWindow's AP because MW's AP is not managed in the usual task management. If the switch is not the MW, or use the system's EXEC, FORK. See quitto ------------------------------------ Name quitto prototype void quitto (char * fullpath, char * args ) Describe exiting the current MW program and switch to another task See Switchto ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Name InputBox Prototype Char * InputBox (Char * BUF, INT BUF_LEN, CONST Char * Text1, Const Char * Text2, Bool PWD_MASK) Description User Simple Method for Get User Enter Text Buffer Save Buffer Buffer Buffer Buffer Buffer Buffer TEXT1 String 1 Text2 String 2 PWD_MASK When the input is a password, "*" is displayed. True Password Enter the false Non-return value: If the input is returned null, the return string length is noted: the buffer can be empty, or there may be a preset value. If you want this to have a preset content on this input box, you can fill it into the buf. The length of the BUF is up to 255.
See ---------------------------------- Name EnableBuzzer prototype void enablebuzzer (BOOL ON) Description in the system's bee When the lumulator is turned on, enable the current AP buzzer on true enable false Close Note: This function does not affect the system's buzzer status See ISBuzzeron ------------- ---------------------- Name ISBUZZERON prototype BOOL ISBUZZERON (VOID) Description Detected whether the current buzzer is turned on: TRUE Turn on false Close See EnableBuzzer-- -------------------------------- Name Controlbuzzer Prototype Void ControlBuzzer (int freq, int duration) Description Control buzzer Pronunciation with specific frequency and time FREQ pronunciation frequency Duration Duration See Beep --------------------------------- Name Beep Prototype Void Beep Description The buzzer sounds "piram".
This is equivalent to using 4K frequency, 100 Duration calls ControlBuzzer See Controlbuzzer ----------------------------------------------------------------------------------------------------------------------------------------------- Name Controlred Legend Prototype Void Controlred (Bool ON) Description Control GP1288 Red LED Light On True Turns the FALSE Close, this does not affect the system's set of LEDs to see ControlGreenled -------------- ------------------------ Name ControlGreenled Prototype Void ControlGreenled (BOOL ON) Description Control GP1288 Green LED Light on True Turn on False See Controlredled ---- -------------------------------- Name Controlmotor prototype void controlmotor (BOOL ON) Description Control GP1288 vibration motor on true True Open False Close See ---------------------------------- Name ControlButton Prototype Void ControlButton (int Speed) Description in this task Inside, the response speed Speed speed value of the keyboard continuous button is controlled, and the response speed recovery is changed to the default value between -10 to 50, the response speed recovery is changed to the default value. ------
---------------------------- Name SetLocallanguage Prototype Void SetLocalLanguage (int LANG) Description In this task Setting language option lang 0: Continent , GB code 1: Taiwan, BIG5 code 2: Hong Kong, BIG5 code 3: English-1: Prohibiting Switch After using this function to set the language, it is usually updated to update the screen, notify controls their display. In fact, this is just a way to display text, that is, it is to read and display Chinese characters with GB code or BIG5 code.
See GetLanguage ---------------------------------- Name GetLanguage Prototype INT GetLanguage (Void) Description Language Settings Return value return value: lang 0: Beijing, GB Code 1: Taiwan, BIG5 code 2: Hong Kong, BIG5 code 3: English-1: Forbidden to switch See setlocallanguage ---------------- ------------------ Name getRegioncode prototype INT getRegioncode (void) Description Get GP1288 area number return value: 0: Beijing 1: Taiwan 2: Hong Kong 3: English -1 : See the error See ---------------------------------- Name GetProductName Prototype Int getProductName (Char * BUF) Description Product Name BUF read Product Name Return Value: If buf == NULL returns the actual length of the actual needs, it will return 0; failure returns -1 See getSerialNumber --------------- ------------------ Name GetSerialnumber Prototype INT GetSerialNumber (Char * BUF) Description GP1288 S / N (serial number) BUF read S / N return value: if BUF ==
NULL returns the actual length of the actual needs, it is successful to return 0; failed to return -1 See getProductName -------------------------------------------------------------------------------------------------------------------------------- --- Name GetPanelkeys Prototype BOOL getPanelkeys (Bool Benable) Description System Generates (UP, Down, LEFT, RIGHT, HOME, END) 6 button messages on GP1288, we will packet, this 6 buttons (just direction keys And the two keys on the side) are attributed to the Panelkeys group, which can be used by the program to set whether or not to send a button message, can be received by the system. Its virtual key value is: VK_UP direction key, the VK_DOWN direction key, the VK_LEFT direction key left vk_right direction key, the default is also the HOLINK key vk_end end key, the default is the mail key Benable True, generate button messages; false does not generate button messages See getSoftKeys ---------------------------------- Name GetSoftKeys prototype BOOL getSoftKeys (Bool Benable); Description System Generate a directory, menu, find, calculation, dictionary, switch, infrared, recorded button message on GP1288, we will press the key group, the 8 buttons are set to the SoftKeys group, which can be used to play, that is, whether it is pressed Send button messages can be received by the system.
Its virtual key value is: VK_F1 soft keyboard on the Directory key VK_F2 soft keyboard VK_F3 soft keyboard on the VK_F4 soft keyboard on the dictionary key VK_F6 on the soft keyboard on the switkeys on the soft keyboard VK_LButton infrared Key VK_RBUTTON Recording button BENABLE TRUE, generating button messages; false does not generate button message see getPanelkeys ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --- Name IsGetPanelkeys Prototype BOOL IsGetPanelkeys (Void) Description System Allow Panelkeys to return to the value: TRUE works FALSE to see getPanelkeys ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------------- Name IsgetsoftKeys Prototype BOOL IsgetsoftKeys (Void) Description System Allows Directory, Menu, Find, Calculation, Dictionary, Switching, Infrared, Recording Key Return Returns: True The role of false does not work to see getSoftKeys ---------------------------------- Name Initxime prototype #include
XIME_NONE minimize XIME_ASCII ASCII character input XIME_SYMBOL symbol input XIME_PHONE phone symbol input XIME_CJ Traditional Cangjie input method XIME_BOSHIAMY Traditional phonetic XIME_HANDWRITE handwriting input XIME_SPCODE uppercase symbols XIME_PINYIN spelling of input XIME_WUBI Wubi input XIME_DEFAULT system default input method XIME_USER since the change in the definition of input method input method will Automatic information WM_XIME_MINIMIZE input method Minimize WM_XIME_RESTORE from minimization Recovery WM_XIME_CHANGED input mode Change Note: The time to call the initial test input method should be established after the CreatWindow or dialog box in WinMain (), and initXime can only be called once, unless you Has been destroyed.
See INITXIMEEX ---------------------------------- Name Initximeex prototype HWnd Initximeex (HWnd Owner, InputMethod IME, INT Sub, int visible) Description Initial input method for additional property modified Owner wants to turn on the input method window handle IME input method representative word SUB 0: Default symbol 1: Half-angle Symbol 2: Full-horn symbol See INITXIME ------- ---------------------------- Name Selectxime Prototype Void Selectxime (InputMethod IME) Description Change Input Method in Use See INITXIME ---- ------------------------------ Name Selectximeex prototype void selectximeex (InputMethod IME, int SUB) Description Change input method in use And attached attribute modifications See Selectxime, Initxime, Initximeex ---------------------------------- Name setximeowner prototype HWND SETXIMEOWNER (HWND OWNER) describes this function setting when using the input method in other dialogs. The input method acts as a control, can only be used by a form. If you want to use it in another window control (such as dialog), you must set a new home owner.
However, I have to remember that set Owner before destroying the new home. Owner's new host handle return value: a handle of the host, see you ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - Name DESTROYXIME Prototype Void Destroyxime (Void) Description Manual Destruction Entering Control See INITXIME --------------------------------- - Name Reinitxime Prototype Int Reinitxime (Void) Description Manual Refresh Enter the input method control. This does not destroy the original handle, just re-refreshed. It is necessary to manually refresh when switching the language.
See INITXIME ---------------------------------- Name GetSelectedime Prototype InputMethod GetSelectedime (Void) Description Returns the current input Refer to INITXIME ------------------------------------------------------------------------------------ Name getXimeSubstyle prototype INT getXimesubstyle Additional modified type of current input method See INITXIME ---------------------------------- Name getximehandler prototype hwnd getximehandler Void) Description The handle that returns the input method control must be called after INITXIME. Also note that if it is a custom input method, please do not call this function.
See ---------------------------------- Name PopupximeMenu prototype Void PopupximeMenu (int X, int y) Description input The pop-up menu (that is, the location of the menu with various input method options] See Enableximeminimize in the ordinate position of the Y ordlined location ------------------------------------------------------------------------------------------------------------ ------------- Name EnableXimeminimize Prototype Int EnableXimeMinimize (Bool Benable); Description Activation (Cancel) Limit Option Default on the input method pop-up menu, the input method control pop-up menu is not the smallest Call this function, call this function to make it benable true display minimization option FALSE hidden minimization option Return Value: 0 Success-1 Failure See popupximeMenu -------------------------------------------------- ---------------- Name DefximeProc Prototype LRESULT CALLBACK DEFXIMEPROC (HWND, UINT, WPARAM, LPARAM) Describe the default input method processing part. If you write an external custom input method, you should use DefximeProc () as the default message processing component, replacing DEFWINDOWPROC () in userximeProc () see DefWindowProc -------------- ---------------------
******************************** * User interface functions * *********** **********************
------------------------------------ Name Winmain prototype int WinApi Winmain (Hinstance Hinstance, Hinstance Hprevinstance, PSTR SZCMDLINE , int icmdshow) Description This function is called by the system call, as the primary trial entry point of the microwindow program, equivalent to the MAINSTANCE of the MAIN () Hinstance this program's instance handle of HPREVINSTANCE, but actually is null szcmdline In the command line of the running program, some AP uses this parameter to initially display the file to the memory Icmdshow program when the program is started, and we don't need to consider these parameters when WinMain, which is actually passed by Microwindow. And use the return value: WinMain brings a message loop to quit when received wm_quit, and return to exit code If you exit before the message loop, return 0 See CreateWindow, RegisterClass, ShowWindow, UpdateWindow --------- -------------------------- Name RegisterClass prototype Atom WinAPI RegisterClass (const wndclass * lpwndclass) Description Registration window The window is always the foundation of the window class Created, window classes to identify the window process of the processing window message Before creating a window, you must call registerclass to register a window class lpwndclass a pointer structure to type WNDCLASS We must call the function before calling this function The structure of Wndclass, and for its related domain, such as WndClass WndClass; WNDCLASS WNDCLASS; WNDCLASS is defined in Winuser.h, the structure is as follows: typedef struct tagwndclassa {mwlist link; // uint style; // Type WNDPR OC lpfnWndproc; // Based on the address INT CBCLSEXTRA; // Int Cbwndextra; // int CbWndextra;
// Hinstance Hinstance; // Equation Handle Hicon Hicon; // Icon HCURSOR HCURSOR; / / Cursor HBrush HBRBackground; // Background LPCSTR LPSZMENUNAME; // Window Menu Name LPCSTR LPSZCLASSNAME; // Window Type Char SzclassName [40] In the WNDCLASS style, each style is one bit, which can be combined by the position "or": the CS_VREDRAW window longitudinally change the CS_HREDRAW window lateral change After redrawing the CS_DBLCLKS Send Double-click Mouse message CS_OWNDC to this class Each window is assigned a unique device descriptor, just initialize the device description table, the DC will always exist until the window is deleted CS_CLASSDC to the window in this class allocated a shared device description table number CS_Parentdc makes sub-window The clipboard area and the parent window are coincident on the CS_NOCLOSE window menu, and when the "off" option, CS_SAVEBITS does not send the WM_PAINT message, but use saved window bitmap_ByTealIgnWindow CS_GLOBALCLASS This window class has global properties that actually, The current version of MicroWindow simulates the characteristics of Windows. In these styles, only CS_OWNDC is now truly set. (Because the form size does not change, there is no double click, the clipboard is only one ... see CreateWindow, CreateWindowex, Showwidow --------------------------------------- ------------ name CreateWindow prototype HWND WINAPI CreateWindow (LPCSTR lpClassName, LPCSTR lpWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hwndParent, hMENU hMenu, hINSTANCE hInstance, LPVOID LPPARAM) Description This function opens up a window in the memory area. It simultaneously defines the class, title, style, initial position, and size of the window.
LPClassName points to the registered class, the class must be registered by registerclass to register the name of the LPWindowname window, the style X window of the DWSTYLE window, the upper left corner of the Y window, the longitudinal NWIDTH window width NHEIGHT window Height hWndParent parent window handle, such as the highest, the highest window The instance handle of the NULL HMENU menu or sub-window handle Hinstance program is that the LPPARAM passed by WinMain can use this pointer to access the data registration class in the drinking program can be a newly registered class name, or a system The class already specified, such as the Button button ComboBox Combination box Edit Edit box listbox list box Scrollbar scroll bar static static text, etc., this is also a style, which is a bit combination: ws_border narrow border WS_CAPTION There is title bar WS_CHILD to create a sub-window. This style cannot share WS_CHILDWINDOW with WS_POPUS WS_CLIPCHILDREN when drawing the sub-window when drawing, the sub-window is associated with each other, when a sub-window issues a WM_PAINT message, other overlap windows are not affected by the user input "dead" dialog window WS_DLGFRAME WS_GROUP specified frame type control group WS_HSCROLL first lateral scroll bar WS_ICONIC initialized WS_MAXIMIZE minimized window is initialized to have a maximized window WS_MAXIMIZEBOX WS_MINIMIZEBOX maximize button of the same type overlap WS_ICONIC WS_OVERLAPPED Window WS_POPUP pop-up type window WS_SYSMENU Title Bar There is menu WS_TILED with WS_OVERLAPPED WS_VISIBLE, which is the visible WS_VSCROLL. Return Value: Successfully returns a new window handle, failed to return NULL. Before returning, it will issue WM_CREATE messages to the window process.
See CreateWindowex, RegisterClassex ---------------------------------- Name CreateWindowEx prototype CreateWindowEx (DWORD DWEXSTYLE, LPCSTR LPCLASSNAME, LPCSTR lpWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hwndParent, hMENU hMenu, hINSTANCE hInstance, LPVOID lpParam) description this function is based on CreateWindow on extra defined extended style of the window, in addition in addition The CREATEWINDOW extension style is defined in Winuser.h, a total of WS_EX_DLGMODALFRAME windows has a double-layer border WS_EX_NOPArenTNotify sub-window, does not send WM_ParentNotify messages to their parent window when creating and destroying, WS_EX_TOPMOST This window appears in the top, even when it is not focus when we are so WS_EX_ACCEPTFILES accepts drag and drop files WS_EX_TRANSPARENT transparent window, until the lower window to be redrawn when it was redrawn WS_EX_MDICHILD produce MID window WS_EX_TOOLWINDOW produce a tool window does not appear edge WS_EX_WINDOWEDGE specified window border heightening WS_EX_CLIENTEDGE on the taskbar Specify the edge of the window border under the WS_EX_CONTEXTHELP window title bar, when the user clicks the "What is this" cursor WS_EX_SHOWKEYB Specifies the window Border edge WS_EX_RIGHT Right align window WS_EX_LEFT left align window, this is the default value WS_EX_RTLREADING Read arrangement used in text format from right to left WS_EX_LTRREADING used to read from left to right arrangement of text formatting WS_EX_LEFTSCROLLBAR case RTLREADING embodiment, the vertical scroll bar on the left WS_EX_RIGHTSCROLLBAR default scroll bar on the right WS_EX_STATICEDGE static type does not accept user input when the window WS_EX_APPWINDOW It can be seen,
Forced top-level window appears WS_EX_LAYERED WS_EX_OVERLAPPEDWINDOW WS_EX_CLIENTEDGE and WS_EX_WINDOWEDGE style collection WS_EX_PALETTEWINDOW WS_EX_WINDOWEDGE WS_EX_TOOLWINDOW WS_EX_TOPMOST style collection with the return value on the task bar: the successful return of the new window handle, failed to return NULL. Before returning, it will issue WM_CREATE messages to the window process.
See CreateWindow ---------------------------------- Name showwindow prototype BOOL WINAPI ShowWindow (HWND HWND, INT NCMDSHOW) Description Make a specified window Handle ncmdshow specified window display mode When the first call, this parameter is passed in the WinMain function. In subsequent calls, you can use: sw_hide hide this window and activate additional window sw_shownormal activation And display this window SW_NORMAL SW_SHOWMINIMIMIMIZED Activate and minimizes this window sw_showmaximized activation and maximizes this window sw_maximize to maximize this window SW_SHOACTIVATE Display this window does not affect other activated window SW_SHOW activates the size of its window and display SW_MINIMIZE Minimize this window SW_SHOWMINNOACTIVE to minimize the display window, does not affect other activated window SW_RESTORE activate and display SW_SHOWDEFAULT SW_MAX in its original size to maximize the window return value: So current is visible, return non-0 value; To hide, return 0 See Winmain, CreateWindow ---------------------------------- Name UpdateWindow prototype BOOL WINAPI UPDATEWINDOW (HWND HWND) This function sends a WM_PAINT message by sending a window process, making the window's client area to return the HWND window handle return value: successfully returns true, failure to return False See showwindow ---------- ----------------
------------ Name DestroyWindow prototype BOOL WINAPI DESTROYWINDOW (HWND HWND) Description Destroy Destroyed Window This function issues a WM_DESTROY message to window processes, releases and removes the keyboard focus of the window. Also destroy the window, the curler, etc. if the window is the parent window, which is automatically destroyed the associated sub-window, and the dialog created by CREATEDIALOG.
Hwnd wants to destroy the window handle return value: successfully returns true, Failed to return false See CreateWindow, CreateWindowex, CreateDialog ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------ Name IsWindow prototype BOOL WINAPI IsWindow (HWND HWND) Description This function determines whether the specified handle is a window HWND to make a judgment window handle return value: if there is a window returns true, otherwise return false See ---------------------------------- Name DefWindowProc prototype LRESULT WINAPI DEFWINDOWPROC (HWND HWND, UINT MSG, WPARAM WPARAM LParam LPARAM) Description This function calls the default window process Processing a window application Unprocessed message It is called by the same parameter by the window process. Generally, we must call this function in the message loop to handle system events, such as: {Switch {CASE XXX: ... CASE YYY: ...} Return DefWindowProc (HWND, MSG, WPARAM, LPARAM)} HWND Points to Accept Messages WPARAM by MAG Structure The extra parameter of the transmitted parameter is returned by the additional parameter passed by the MAG structure: DEFDLGPROC - DEFDLGPROC -------------------------------------------------------------------------------------------------------------------------------------- ----------------
Name CallWindowProc prototype LRESULT WINAPI CallWindowProc (WNDPROC lpPrevWndFunc, HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam) describes passing the message to the designated window procedure lpPrevWndFunc point to change the previous window procedure hWnd accept message window procedure handles Msg desired processing The first parameter of the message WPARAM message returns the second parameter return value of the message: Results depending on the message processing SETWINDOWLONG function can replace the system with a new window process by changing the processing process associated with the window. Such applications must need to pass the unopened messages in a new window to the original window process. CallWindowProc processing program actually quite simple: CallWindowProc (WNDPROC lpPrevWndFunc, HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam) {return (* lpPrevWndFunc) (hwnd, Msg, wParam, lParam);} See the SetWindowLong ----- ------------------------------ Name SETWINDOWLONG prototype Long WinAPI SetWindowlong (HWND HWND, INT NINDEX, Long LNEWLON) describes this function Set the 32-bit long-integer offset value of the extended window memory of the specified window to reset the window attribute hWnd specified window's handle NINDEX setting attribute's index LNewlong specifies the value index to set the replacement index in Winuser.h, Window extended memory 32-bit long-scale offset location, including: GWL_EXSTYLE new setting window Extended style GWL_EXSTYLE new setting window Style GWL_WndProc with new window processing Replace the original GWL_HINSTANCE new setting window instance handle GWL_ID window ID GWL_USERDATA newly associated this window 32-bit value with a GWL_WndProc index, LNewlong wants to force the address of the new window process for conversion.
This allows the specified window to use this new window process to pre-process, but if you want to use the original window process, you should use the function CallWindowProc return value: successfully returns the previous 32-bit integer number, failed to return 0 See CallWindowProc, GetWindowl ---------------------------------- Name setlayeredWindowAttributes prototype BOOL WINAPI setlayeredWindowAttributes (hwnd hwnd, colorref crkey, byte Balpha, DWORD DWFLAGS) Description Only this function is currently only prototype, but not not supported ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Name GetWindowlong Prototype Long WinAPI getWindowlong (HWND HWND, INT NINDEX) describes the information obtained by the specified window, that is, 32-bit long-intensive value hWnd in the specified extension window memory HWND Specify the 32-bit long integer of the memory NINDEX window Number Offset Location Return Value: Successful Returns 32-bit long integer values of the specified offset, failed to return 0 See setwindowlong ------------------------- ---------- Name GetWindowWord Prototype Word WinAPI getWindowWord (HWND HWND, INT NINDEX) Description This function is actually invalid in 32-bit mode, to apply getWindowlong alternative to getWindowlong ------- ----------------------
------ Name SetwindowWord Prototype Word WiNPi SetWindowWord (HWND HWND, INT NINDEX, WORD WOREWORD) Description This function is actually invalid in 32-bit mode, to apply setWindowlong alternative to setWindowlong -------- -------------------------- Name GetWindowTextLength Prototype Int WinAPI GetWindowTextLength (HWND HWND) Description If the current window has a specified title bar, this function gets this The text length of the title bar hwnd specified window handle return value: successfully returns the length, if the window does not have title text, return 0 See getWindowText, setWindowText -------------------------------------------------------------------- -------------- Name GetWindowText Prototype Int WinAPI getWindowText (HWND HWND, LPSTR LPSTRING, INT NMAXCOUNT) Description Copy the text to the specified window to the specified buffer hwnd Specify the handle of the window LPString Specified Buffer Nmaxcount Copy String Length Return Value: Successful Return Copy String Length (NULL does not include the end), such as the window no title bar, the title bar is empty, or the window handle illegally returns 0 See getWindowText-- -------------------------------- Name SetwindowText Prototype BOOL WINAPI SETWINDOWTEXT (HWND HWND, LPCSTR LPSTRING) Description Change the current window The title bar text hwnd window handle LPCSTR lpstring with null's new title bar text string pointer return value: successfully returns true,
Failure to return false See getWindowText ---------------------------------- Name MoveWindow prototype BOOL WINAPI MOVEWINDOW (HWND HWND, INT X, INT Y, INT NWIDTH, INT NHEIGHT, BOOL BREPAINT describes changing the location and size of the specified window, which is the HWND window handle X new position in the upper left corner of the screen. Location Left upper corner longitudinal NWIDTH Width NHEIGTH Height BREPAINT redraw flag, True Heavy painted, false does not re-painted return value: successful returns to true, Failed to see SETWINDOWPOS, UPDATEWINDOW ---------------- --------------------- Name SetwindowPos Prototype BOOL WINAPI SETWINDOWPOS (HWND HWND, HWND HWNDINSERTAFTER, INT X, INT Y, INT CX, INT CY, UINT Fuflags) Description Change the window, pop-up window, or sub-window position, size hWnd window handle HWndinsertafter layout sequence handle, it can only be one of the following values: SWP_SHOWINDOW display window SWP_HIDEWINDOW hidden window HWND_TOP Show front hWnd_bottom displayed in the multi-window back X designated The upper left corner of the new window Y specifies the left upper corner of the new window CX specifies the width CY of the new window to specify the location of the new window, the size of the flag, which can be the combination of the following value: SWP_Nomove does not change the window Coordinate SWP_N OSIZE does not change window size SWP_NOZORDER does not change the window stacking hierarchy return value: successfully returns true, failure to return false, if you use setWindowl to change the current window, you must use setWindowPos to make it a role.
See MoveWindow ---------------------------------- Name GetCursorpos prototype BOOL WINAPI GETCURSORPOS (LPPOINT LPPOINT) Description Received Screen The cursor position LPPOINT points to a point structure so that it receives the cursor Point structure of the screen definition as follows: typef struct tagpoint {long x; long y;} Point; is the X, Y position return value of the cursor: If you get the cursor, return non-non- Zero value; otherwise returning to the zero to see SetCursor, SetCursorpos ---------------------------------- Name Getfocus prototype HWnd WinAPI GetFocus (Void) Description getting the window handle of the input focus Return value: This window handle See setfocus ----------------------------- ------ Name setfocus prototype HWND WINAPI SETFOCUS (HWND HWND) Description Enables the input focus return value: Successfully returned the window handle of the last focus; if the HWND parameter illegally fails to return 0 See getfocus ---- -------------------------------
Name SETFOREGROUNDODOW Prototype BOOL WINAPI SETFOREGROUNDOW (HWND HWND) Description A window and displays it in the last layer When we want to display an error message or message, you want to call this function to see getforeGroup, setActiveWindow ------ ----------------------------- Name GetForegroundWindow prototype HWnd getForeGroundWindow (Void) Description Refer to getActiveWindow, setForegroundWindow -------- ---------------------------- Name SetActiveWindow prototype HWND WINAPI SetActiveWindow (HWND HWND) Description Activate a window, see ------- ---------------------------- Name getActiveWindow prototype HWND WINAPI getActiveWindow (void) Description get the parent window handle that is getting the input focus Value: This window handle See setActiveWindow ---------------------------------- Name Bringwindowtotop prototype BOOL WINAPI BRINGWINDOWTOP (HWnd HWnd) Description Here, the effect of this function is the same as setforegroundwindow -
-------------------------------- Name getDesktopWindow prototype HWnd WinAPI getDesktopWindow (void) Description Get Root window handle return value: Root window handle See ---------------------------------- Name getParent prototype HWND WINAPI getParent (hwnd hwnd) Description Get the parent window handle of the specified sub-window HWND specifies the sub-window handle return value: if it successfully returns its parent window handle; if it is free, return Null See --------------- ------------------ Name EnableWindow Prototype BOOL WINAPI EnableWindow (HWND HWND, BOOL BENABLE) Description Enable the specified window or control to turn the input response HWND window / control handle Benable true To turn on, false is a closed return value: if the window is closed, returns true; otherwise, returning True Default One window is Enable, if it is disable, then you want to be in the CreateWindow or CreateWindowEx function. Specify the WS_DISABED style; after the window is created, use this function to switch on / off. The control closes in the dialog box cannot receive the user's input (which is ash ash).
See CreateWindow, CreateWindowex, IsWindowenable ---------------------------------- Name Iswindowenabled prototype BOOL Iswindowenabled (HWND HWND) Description Determines if the specified window can accept the input hWnd window handle return value: If the window can accept the input (Enable) Return true; otherwise return false See EnableWindow ------------------------------------------------------------------------------------------------------------------------------------------------------ --------------- Name AdjustWindowerRectex Prototype BOOL WINAPI AdjustWindowerEx (LPRECT LPRECT, DWORD DWSTYLE, BOOL BMENU, DWORD DWEXStyle) Describes the required customer area size, calculating the required window area size ( DWSTYLE) Adjustment (LPRECT) To the client's relative area LPRECT points to the pointer DWSty window attribute BMENU window menu of the client area, now there is no DWEXStyle extension window property, now there is no role return value: No action now ------------------------------------------------------------------ ------------------------------ Name GetClientRectRectRectRect (HWND HWND, LPRECT LPRECT) Description Get Size HWnd of the Window Customer The handle of the window LPRECT points to the pointer of the Rect structure of the client area defines the following: TypeDef struct _Rect {long left; long top; long right; long bottom;} RECT; 即 a rectangle up and down left and right return value: successful returns true,
Failure Back False See getWindowRect ---------------------------------- Name getWindowRect prototype BOOL WINAPI GETWINDOWRECT (hwnd hwnd, LPRECT LPRECT) Describes the area size hwnd window handle LPRECT to get the specified window, point to the Rect structure, used to get the window of the window to see getClientRect ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------- Name ClientToscreen Prototype BOOL WINAPI CLIENTSCREEN (HWND HWND, LPPONT LPPOINT) Description Put the HWND window handle LPPoint to the Point structure in the location of the client zone The pointer containing the customer area related content Return value: successfully returns true, failed to return false See ScreenToClient ------------------------------- ---- Name ScreenToClient Prototype BOOL WINAPI SCREENTOCLIENT (HWND HWND, LPPOINT LPPOINT) Description Put the LPPOINT from the window to the window client area HWND window handle LPPOINT point pointer return value: success return true, failure Return False See ClientToscreen --- --------------------------------
Name MapWindowPoints Prototype int WINAPI MapWindowPoints (HWND hwndFrom, HWND hwndTo, LPPOINT lpPoints, UINT cPoints) describes a group of points from one window to another hwndFrom: Source window handle hwndTo: object window handle lpPoints: start pointer points cPoints: Number of points return value: Low 2 byte is the value of the value of the horizontal direction plus the value of the horizontal direction when the conversion point data is the value of the vertical direction plus the value of the vertical direction, clienttoscreen. ---------------------------------- ------------------------- Name GetMessage prototype BOOL WINAPI GetMessage (lpmsg lpmsg, hwnd hwnd, uint wmsgfiltermin, uint wmsgfiltermax) Description gets specified in the Message queue The MSG message structure of the scope of the range is to get the message, the MSG structure of the message is defined as follows: typedef struct tagmsg {hWnd hwnd; / / Specify the window handle of the received message uint message; // Specify the nominal number of the message WPARAM WPARAM; // message The first parameter lParam lParam; // The second parameter DWORD TIME; / / Specify the time POINT PT Pt Pt Pt; // When the message occurs, the position of the cursor} msg; hWnd window handle, such as null A process included all parent forms and child forms WMSGFiltermin message filter low WMSGFiltermax message filter High This function only determines that the message between this filter range is when the filter min and max are 0 time to receive all messages. Return Value: If you get a wm_quit message, return 0 If you get other messages, return to 0 If an error returns -1 See PostMessage ----------- R ------------- ------------------
---- Name SendMessage Prototype LRESULT WINAPI SendMessage (HWND HWND, UINT MSG, WPARAM WPARAM, LPARM LPARAM) Sending a message to the specified window This message is not entering the team, that is, it immediately calls the message processing process of the specified window. To handle this message until the processing is returned.
HWND specified window Handle MSG message WPARAM message parameter 1 LPARAM message parameter 2 Return value: dependent on the message, return message processing results See PostMessage, GetMessage ------------------ ----------------- Name Postmessage Prototype BOOL WINAPI PostMessage (HWND HWND, UINT MSG, WPARAM WPARAM, LPARAM LPARAM) Description This function puts the message in the message queue of the specified window. Message queue is advanced first, including keyboard messages, etc., can be received by GetMessage Hwnd window handle MSG message WPARAM message parameter 1 LPARAM message parameter 2 Return value: successful returning true, failure to see getMessage, peekmessage ------ ---------------------------- Name PostquitMessage prototype void WinAPI PostquitMessage (int nexitcode) Description This function is attached into a message queue a WM_Quit message And immediately returned, indicating that the system is required to end the NexitCode exit code. When the second parameter of Wm_quit When you get a WM_QUIT message from the message queue, the AP exits the message loop in WinMain, and will control the system to return to the system The exit value is the second parameter of the message, namely Nexitcode, PeekMessage, PostMessage ------------------------------------------------------------------------------------------------------------------------- ---- Name PostthreadMessage Prototype BOOL WINAPI PostthreadMessage (DWORD DWTHREADID, UINT MSG, WPARAM WPARAM, LPARM LPARAM) Description The system does not support threads,
This function function is currently equivalent to PostMessage ---------------------------------- Name PeekMessage prototype BOOL WINAPI PeekMessage (LPMSG LPMSG, HWND HWND, UINT UMSGFILTERMIN, UINT UMSGFILTERMAX, UINT WREMOVEMSG) Description Message Listeners Filter Low WMSGFiltermax Message Filter High The message filter here is used to filter messages. When WMSGFiltermin wmsgfiltermax is 0, you want to listen to all messages wremovemsg Specify how to handle messages, it can only choose one from the following value: PM_noremove After processing, the message does not delete PM_Remove in the message queue after PEEDMESSAGE processing, message from message The queue deletes this function allows the program to check the next message in the queue, just like "peeking", but does not actually delete it. This monitor does not return control to the program like GetMessage, but immediately returns regardless of whether the message appears. When we want to do something in the program, such as drawing some random patterns, this is not simply implemented in WM_PAINT, because this will not handle other messages, we must use This listener: while (true) {if (PeekMessage ($ MSG, NULL, 0, 0, PM_REMOVE)) {if (msg.Message == WM_QUIT) Break; TranslateMessage (& MSG); DispatchMessage (& MSG);} else { [Write our random drawing function here]}} It should be noted that the wm_quit message must check because if getMessage is connected to the WM_QUIT message, it will return 0, but peekMessage indicates whether it is a message, so WM_QUIT must check .
See getMessage ---------------------------------- Name DispatchMessage prototype Long WinAPI DispatchMessage (const msg * lpmsg) Description This function distributes the message to the window process. It is typical is to use the GetMessage to point to the message structure return value: In fact, it is generally ignored to the return value to getMessage ------------- -------------------- Name getcapture prototype HWND WINAPI getCapture (void) Description Getting the currently acceptable brush-up window can only have one window to accept the stroke return value: Successfully returned to the window handle, if no window can accept the stroke back null see setcapture, ReleaseCapture -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --- Name setcapture prototype HWND WINAPI SETCAPTURE (HWND HWND) Description Set the specified window to accept the brush to accept a window to accept the brush to accept the strokes HWND want to set up the stroke window handle Return value: success return to the last received brush Window handle; if there is no such window to return Null See getcapture -----------------------------------
Name ReleaseCapture Prototherarch BOOL WINAPI ReleaseCapture (Void) Description Make the window that is currently accepting the stroke no longer accepts the stroke. When you are in SetCapture, if you need to call this function to release the return value: Success return non-0 value, failed to return 0 See getcapture, setcapture, ------------------------------------ Name Settimer Prototype Uint WinAPI SetTimer (HWND HWND, UINT IDTIMER, UINT Utimeout TimerProc Lptimerfunc); Description Use this function to assign a timer to the microwindow program We use this function to set the system interval to send your program normal window to send a WM_TIMER message. When the time is used, call the KillTimer function to stop the timer message. In the current version of MicroWindow, the timer has the resolution to note that the timer message is also in the message queue, and does not necessarily receive the WM_TIMER message immediately after the timer time is arriving, the program is only in the message. There is no other message in the queue to receive. It should be noted that the timer cannot be used to accurately use the timer. HWND receives the window handle ID of the WM_TIMER message, it should be a non-0 integer if multiple timers are used, then the WPARAM parameters are equal to the timer when the window process is used for each timer. ID, LPARAM parameter specifies time intervals in milliseconds, time to send a WM_TIMER message, LPTIMERFUNC timer processing, when we do not specify this process (this parameter fills to null) setTimer will send WM_TIMER messages to the window process; if We specify a process handling actions, then setTimer does not explicitly send a WM_TIMER message, but is processed by this process.
For example: Switch (Message) {case wm_create: settimer (hwnd, id_timer, 1000, timeProc); Return 0; // ...} Void Callback TimerProc (HWND HWND, UINT MESSAGE, UINT ITIMERID, DWORD DWTIME) {//. .. ... do what you want} Return Value: Successfully returned the integer of the new timer; failure returns 0 See Killtimer --------------------- ------------ Name Killtimer prototype BOOL WINAPI KillTimer (HWND HWND, UINT IDTIMER); Describe the destruction specified timer hwnd association specified timer window handle IDTimer timer ID Return value: Success Back to TRUE Failure Back False See Settimer ---------------------------------- Name MWGetNextTimeoutValue Prototype Uint MWGetNextTimeoutValue (void) Description Get the value of the timer's next time, the unit is a millisecond return value: return this value, error Return 0 See Settimer ------------------------- ---------- Name MWHANDLETIMERS prototype void mwhandletimers (void) Description Check and execute the timer that has arrived See settimer --------
-------------------------- Name GetSystemMetrics Prototype INT WINAPI GetSystemMetrics (INT NINDEX) Description Get system variables and system settings, all units are pixels desired nIndex whichever system set index MicroWindow support the current version of the following values: SM_CXSCREEN screen width SM_CYSCREEN SM_CXVSCROLL screen height vertical scroll bars to scroll the width of the horizontal bar height SM_CYVSCROLL SM_CYHSCROLL vertical scroll bars to scroll horizontally height SM_CXHSCROLL title bar width SM_CYCAPTION window scroll bar area height SM_CXBORDER window border width SM_CYBORDER scroll box border height SM_CXDLGFRAME lateral edge height width SM_CXICON SM_CXFRAME default icon default icon SM_CYICON width height width SM_CYDLGFRAME dialog menu area SM_CYMENU longitudinal edges horizontal frame width height vertical borders SM_CYFRAME Return value: get the system value corresponding to the corresponding index ---------------------------------- Name Createcaret prototype BOOL CreateCaret (HWND HWND, INT NWIDTH, INT NHEIGHT) describes a new system cursor and assigns it to the specified window. There is only one window to get the keyboard to enter the focus or activation to create a cursor to be destroyed before the keyboard input focus. Cursor hwnd host window handle NWIDTH cursor width NHEIGH T cursor height return value: successfully created returning true; failure returns false See showcaret, hidecaret, design -------------------------
---------- Name showcaret prototype BOOL SHOWCARET (HWND HWND) Description Make the cursor on the screen at the cursor position When the cursor appears, it will flash automatically flashing only the window itself has a cursor, and the cursor has its own shape And hidecaret is the effect overlay, for example, if you tune 3 hidecaret in the program, you must use showcaret to display the cursor hwnd cursor main window handle return value: Success Back to true Failed to return false See hidecaret, createcaret ---------------------------------- Name hidecaret prototype BOOL HIDECARET (hwnd HWND) Describes the hidden cursor.
After the cursor is hidden, it does not destroy its shape and cursor position hWnd cursor main window handle return value: success return true; failure returns false See showcaret, CreateCaret ------------------------------------------------------------------------------------------------------------------ ------------------ Name ActiveCaret prototype BOOL ActiveTivet (HWND HWND) Description Specify the cursor to display in which window HWND host window handle return value: successfully returns truese CreateCaret ---------------------------------- Name getcaretblinktime prototype uint getcaretblinktime (hwnd hwnd) Description gets in milliseconds Unit cursor flash splitting interval HWND cursor main window handle return value: success return to flash interval; failback to return 0 See setcaretblinktime ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -------- Name SetCareTblinkTime Prototype BOOL SetCareTblinkTime (HWND HWND, UINT Utime) Description In milliseconds set the cursor flash splitting between the hwnd cursor is the main window handle UTIME millisecond value, now only support 500 milliseconds (ie flash every second) Once again) return value: success return true; failure to return false See setcaretblinktime ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- Name DESTROYCARET prototype BOOL DestroyCaret (HWND HWND) Description Destroy the cursor of the specified window to be destroyed when the window has a cursor, otherwise the function will return false hwnd cursor main window handle return value: Successful return true; failed to return false Creatcaret ---------------------------------- Name setcaretpos prototype BOOL setcaretpos (hwnd hwnd, int x, int y ) Describe the moving cursor to the specified position regardless of the cursor, this function will move the cursor position HWND cursor main window handle X cursor position crossbar Y cursor position longitudinal reference GetCareTPOS -------------- ---------------------- Name getcaretpos prototype BOOL getCareTPOS (HWND HWND, PPOINT PPT) Description Get Cursor Location HWND Cursor Main Window Handle PPT points to the cursor position of the Point structure Return Value: Successful return true; failed to return false See setcaretpos -------------------------------------------------- *** ******************************* * GDI function * ************** *******************
---------------------------------- Name Getdc prototype HDC WinAPI getdc (hwnd) Description This function returns Current Window Customer Display Device Description Table Estick We can use this returned handle to use the GDI (graphics device interface: graphics device interface "function on display device, do not change the display area data of the device HWND window handle, such as Null Table The current screen needs to be explained. When we want to draw on a graphics output device, you must first get a handle of a device descriptor (DC). When the handle is returned to the program, the system gives the permissions of this device, and then we can identify the device that wants to draw in it in the GDI function. Using Getdc allows us to get the device description table handle during non-WM_PAINT messages, but must call ReleaseDC to release it before exiting the window function. The BeginPaint and EndPaint functions are used during the WM_PAINT message that draws the drawing. This function is equivalent to getDCEX (hwnd, null, dcx_defaultclipdate); return value: If successful returns the device description of the specified window customer area Failback Null See getDCEX, ReleaseDC, Beginpaint, Endpaint, getWindowdc ------- ---------------------------- Name getDCEX prototype HDC WinAPI GETDCEX (HWND HWND, HRGN HRGNCLIP, DWORD FLAGS) Description This is a getDC function Super-set, in addition to GETDC function, additional to the application provides an HRGNCLIP for clipping control HRGNCLIP in the client area, HRGNClip specifies that the clipping area Flags specifying the device description table is created.
The version of the version only supports: DCX_Window DCX_DEFAULTCLIP Return Value: If successfully returns the device description of the specified window client area, see getDC --------------------- -------------- Name GetWindowDC Prototype HDC WinAPI getWindowDC (HWND HWND) Description This function can get the entire window, not limited to the device description handle of the window client area, and must also be used Release it with releasedc after completion. This device description table except the customer area, also includes the title bar, menu, scroll bar, and framework of the window. Under normal circumstances, the drawing of non-client district is not recommended. If you want to try to use getWindowDC, you must capture the WM_NCPAINT message. Return Value: If you successfully return to the specified window customer area device description table fails to return NULL to see getdc ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---- Name ReleaseDC Prototype INT WINAPI ReleaseDC (HWND HWND, HDC HDC) Description Release Device Description Table Handle so that other applications can be used.
It should be noted that all Apply GetDC or getDCEX, getWindowdc will be released with ReleaseDC after obtaining the device description table; however, the DC generated by the createdc function cannot be released, it must be released with deletedc to delete the HWNDC window handle HDC to release device descriptions of the table script: If successful release returns 1; otherwise return 0 See getDC, Createdc, Deletedc -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------- Name deletedc prototype BOOL WINAPI DELETEDC (HDC HDC) Description Deleting a created device description Table Handle Only the device descriptor created by calling CREATEDC can be deleted with this function.
Equipment description of the device to be released by HDC Return value: successful delete returns true; failure returns false See Createdc ----------------------------- ------ Name CreateDC Prototype HDC Createdc (LPCTSTSTSTSZDRIVER, LPCTSTSTSTSTSTSTSTSTSTSZUTPUT, CONST DEVMODE * LPINITDATA) Description Creating a device description with the specified name In fact, LPSZDRIVER is only meaningful in one case. That is when it is "disaply", then other parameters will be filled as NULL, such as HDC = Createdc (Text ("Display", NULL, NULL, NULL); Return Value: If successfully returned the created device Description Table Handle Failure Back Null See getDC, Deletedc ---------------------------------- Name getDevicecaps prototype int WinApi GetDeviceCaps (HDC HDC, INT NINDEX) Description Device Description Table typically refers to a physical device that can be obtained by this function to get its attribute information HDC specified device description The table nindex specifies the attribute information index to be obtained, it can be: Horzres Returns Screen horizontal display pixel Vertres Back screen vertical display pixel number bitspixel Display a pixel required BITS number Planes PLANES PLANES Number SizePalette color number Return Value: Specified attribute information See ------------- --------------------
Name BeginPaint prototype HDC WINAPI BeginPaint (HWND hWnd, LPPAINTSTRUCT lpPaint) described to give window graphics device and the drawing area, ready to draw a filled specified window hwnd window handle lpPaint point ready to receive graphics PAINTSTRUCT pointer PAINTSTRUCT structure definition structure information are as follows: typedef struct tagPAINTSTRUCT {HDC HDC; // Prepare the device description of the drawing Description Table Skill BOOL FERASE; / / Specify whether the background is erase Rect rpaint; // Specify a rect structure drawing area bool frestore; // Keep Bool FinCupdate; // Reserved Byte RgBreserved [32] ; // Reserved} PAINTSTRUCT; BeginPaint Sending WM_ERASEBKGND messages to Window Object Drawing Area into Background Color Application To call BeginPAint at WM_PAINT Failure Back Null See Endpaint, Getdc ---------------------------------- Name Endpaint Prototype BOOL WINAPI Endpaint (hwnd HWND, Const PainTSTRUCT * LPPAINT) Description Drawing After the end of the drawing is released from the graphic device descriptor obtained by BeginPaint. This function must be combined with the BeginPaint function using the HWND window handle LPPAINT drawing area pointer, calling BeginPaint to see BeginPaint ------- ---------------------------- Name settextcolor prototype ColorRef W INAPI SetTextColor (HDC, ColorRef) Description Settings Character Color HDC Graphics Device Description Table Handle CRCOLOR color value, if the system is not the color return value: the old color value of the graphics device, such as failure returns CLR_INVALID see Textout , GetTextColor, EXTTEXTOUT ----
-------------------------------- Name GetTextColor Protothel ColorRef WinAPI GetTextColor (HDC) Description Get the character output color of the specified display device HDC graphics device description table script returns: successful return color value, such as failure to return CLR_INVALID see Textout, SetTextColor, EXTTEXTOUT ---------------------------------------------------------------------------------------------------------- -------- Name Setbkcolor Prototype ColorRef WinAPI SetBkcolor (HDC, ColorRef) Description Settings The background color, including the handle CRCOLOR color value of the background color HDC graphics device for Textout and ExtTextout, if the system is not in this color value Select the closest color return value: the old color value of the graphics device, such as failure to return CLR_INVALID see getBkcolor ----------------------------- ------ Name GetBkcolor Prototype ColorRef WinAPI GetBkcolor (HDC) Description Get the background color HDC graphic device of the currently specified graphics device Return value: the old color value of the graphics device, such as failure returns CLR_INVALID See setbkcolor ---- ------------------------------ Name getsyscolor prototype DWORD WINAPI GETSYSCOLOR (INT NINDEX) Description Current from the specified display element Color NINDEX color index value,
It must be one of the following: Return Value: color value, such as failure to return 0 See setsyscolor ---------------------------- ------- Name Setsyscolor Prototype ColorRef WinAPI SetsysColor (INT NINDEX, ColorRef Crcolor) Description Settings the index value of the specified display element NINDEX color, which must be one of the following: CRCOLOR color value returns value: the successful return of the old color value, else return 0 see GetSysColor ----------------------------------- name SetBkMode Prototype INT WINAPI SetBkMode (HDC HDC, INT IBKMODE) Description Setting Description Tablet Mixed Mode HDC Graphics Device Description Table Skill IBKMODE Specify Background Mode, currently supporting the background color of the graphic device with a background color of the graphic device before the Opaque drawing. This is the default mode.
Return Value: Return Value: Successful return old mode, failure to return 0 See getBKMode -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Name GetBkmode Prototype Int getBKMode (HDC HDC); Description Get The background mixing mode of the specified display device See setbkmode ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------ Name DrawText Prototype Int WinAPI DrawText (HDC HDC, LPCSTR LPSTRING, INT NCOUNT, LPRECT LPRECT, UINT UFORMAT) Description Description Table HDC Graphics Device Description Table Handle LPString String Pointer Ncount To display the number of characters .
As it is -1, then the LPString parameter must be a string ending with NULL. At this time, the DrawText will automatically calculate the number of characters to the number of RETC structure uformat specified by the RETC structure of the text display area, which can be the combination of the following list. : DT_calcRect only calculates the width of the display area, stores LPRECT, returns the character height immediately, and does not display the character dt_center display character in the display area's positive DT_Right display character in the rightmost DT_LEFT display character in the display area, the left side of the display area, this Is the system default return value: success return characters height, failure to return 0 See Textout ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --- Name Textout Prototype BOOL WINAPI TEXTOUT (HDC HDC, INT X, INT Y, LPCSTR LPSZSTRING, INT CBSTRING) Description Use the currently selected font, background and font color, displaying a string HDC graphics device descriptor handle in the specified location display X The beginning of the upper left corner Y the starting line of the upper left corner Lpszstring points to the string to be displayed, this string does not have to end with NULL, because CBString will specify the length of the CBString string length return value: successful return non-zero Value; failure to return 0 See SelectObject, SetBkcolor, SetTextColor ---------------------------------- Name ExtTextout prototype BOOL WinAPI EXTTEXTOUT (HDC HDC, INT X, INT Y, UINT FuOptions, Const Rect * LPRC, LPCSTR LPSZSTRING, UINT CBCOUNT, Const INT * LPDX) Description ----------------- -----------
------ Name ExtTextoutw prototype BOOL WINAPI EXTTEXTOUTW (HDC HDC, INT X, INT Y, UINT FuOptions, Const Rect * LPRC, LPCWSTR LPSZSTRING, UINT CBCOUNT, Const Int * LPDX) Description Active and EXTTEXTOUT is equivalent See EXTTEXTOUTW ------------------------------------ Name DrawTextw Prototype Int WinAPI DrawTextw (HDC HDC, LPCWSTR LPSTRING, INT NCOUNT, LPRECT LPRECT, UINT UFORMAT) Description Different DrawText ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---- Name SetTextAlign Prototype Uint WinAPI SetTextAlign (HDC HDC, UINT FMODE) Description Settings The same text set in the specified device description table can have different arrangements, such as a horizontal row, from left to right Also, you can also from right to left; the ancient books have more from the top right to the left.
HDC device Description Table Handle FMode arrangement, it can be a combination of unable conflict in the list below: TA_BASELINE returns the value from the top left to the right down: Success returns the previous arrangement; failure returns GDI_ERROR See ExtTtextout, Textout ----- ------------------------------ Name Setrop2 Prototype Int WinAPI Setrop2 (HDC HDC, INT FNDRAWMODE) Description Setting the current drawing Scene mixing mode It defines how color on the brush or brush How to specify a hybrid mode with the existing image to superimpose HDC device descriptive table handle fnDrawMode, which can only select a R2_Xorpen or mode from the list, ie superposition effect R2_copypen Mode, that is, coverage effect, this is the system default return value: successfully returns the last mode; failure returns 0 See ---------------------- ---------- Name GetPixel Prototype ColorRef WinAPI Getpixel (HDC HDC, INT X, INT Y) Description Color HDC Device Description Table File The X Point Pixel Obal Y Point Location The pixel longitudinal standard is not all devices support getPixel, and an application insurance should call getDeviceCaps to determine if support.
Return Value: Return the color of the pixel point; if this point is outside the current client area, return to CLR_INVALID to see SetPixel, getDevicecaps ----------------------- ----------- Name SetPixel Prototype ColorRef WinAPI SetPixel (HDC HDC, INT X, INT Y, ColorRef CRCOLOR) Describes the pixel point of the specified location to specify a color HDC device description table clip X position pixel Better Y Pixabay Pixel Bad CRCOLOR Color Value Return Value: Successful Return Color Value; Failback Return -1 See getpixel -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------- Name MoveToex Prototype BOOL WINAPI (HDC HDC, INT X, INT Y, LPPOINT LPPOINT) Description This function does not draw line, it just sets a "current location" attribute draw a straight line must Use two functions, this function specifies the start point of the line, the second function LINETO specifies the end point in the default device descriptor table, the current location is originally located in (0, 0) HDC device description table handle X starting point crossbar y startout LPPOINT points to the pointer of the Point structure, after returning from the function, the x, y in the Point structure saves the previous current location.
If this parameter is useless to you (most of this), then fill it into NULL return value: success return to 0; failure to return 0 See lineto ---------------- ------------------ Name LineTo prototype BOOL WINAPI LINETO (HDC HDC, INT X, INT Y) Description This function draws a function from "current position" to the specified location Both lines as described above, LINETO must be combined with MoveToex using HDC device description table handle X end point crossbar yet longitudinal return value: success return non-0; failback Return 0 See MoveToex -------------- ---------------------- Name Polyline prototype BOOL WINAPI POLYLINE (HDC HDC, Const Point * LPPT, INT CPOINTS) Description Painted a set of straight line HDC device descriptors The handle LPPT points to a Point structure array, each structure defines a pixel point Coints specified the number of pixel points, this number must be> = 2 Apply this function to connect these points to draw a series of straight returns: successful return non-0 Value; failure to return 0 See Lineto, MoveToex ---------------------------------- Name Polygon prototype BOOL WINAPI POLYGON (HDC HDC, Const Point * LPPOINTS, INT NCOUNT) describes a polygon composed of a plurality of straight edges, and the current color brush fill HDC device description table clip LPPoints point to a Point structure array, stores various vertex coordinate ncount of polygonal polygons NCOUNT specified Multilateral vertex number, must be> = 2 return value:
Successful return non-0 value; failure to return 0 See polyline -------------------------------- Name Polypolygon prototype BOOL WinAPI Polypolygon (HDC HDC, Const Point * LPPOINTS, LPINT LPPOLYCUNTS, INT NCOUNT) Description Painting Series Closed Polygon HDC Device Description Table Handle LPPOINTS Points to a Point Structure Array, stores each vertex of multiple polygons, LPPOLYCOUNTS points to each polygonal vertex Array of coordinates, this number must be> = 2 ncount specified multilateral vertex number, must be> = 2 return value: successful return non-0 value; failback to return 0 See Polygon, POLYLINE ------------- ---------------------- Name Ellipse prototype BOOL WINAPI Ellipse (HDC HDC, INT NLEFTRECT, INT NTOPRECT, INT NRIGHTRECT, INT NBOTTOMRECT); Description Draw Ellipse HDC Device Description Table Extracts NLEFTRECT Left upper horns NLEFTRECT Left upper corner longitudinal NRIGHTRECT Right lower horizontal NBOTTOMRECT Return Return Value: Success Returns Non 0 value; fail return 0 See arc ------------- --------------------
Arc name Prototype BOOL WINAPI Arc (HDC hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect, int nXStartArc, int nYStartArc, int nXEndArc, int nYEndArc) describes an arc Videos hdc device context handle nLeftRect left upper left corner abscissa nTopRect Corner longitudinal NRIGHTRECT Right lower horizontal NBOTTOMRECT Right lower corner Longitudinal NXSTARC arc horizontal start NYSTARC arc vertical start NXENDARC arc horizontal end point NYENDARC arc vertical end point return value: success return non-0 value; fail return 0 See Ellipse-- -------------------------------- Name PIE prototype BOOL WINAPI PIE (HDC HDC, Int NLEFTRECT, INT NTOPRECT, INT nRightRect, int nBottomRect, int nXRadial1, int nYRadial1, int nXRadial2, int nYRadial2) describes a circular Videos upper left corner of the top left bottom right corner of the lower right corner hdc device description table handle nLeftRect nTopRect abscissa ordinate nRightRect nBottomRect abscissa ordinate nXRadial1 left horizontal radius nYRadial1 Left vertical radius NXRADIAL2 Right Level radius NYRADIAL2 Right vertical radius return value: success return non-0 value; fail return 0 See arc ----------------------- ---------- Name Rectangle prototype BOOL WINAPI Rectangle (HDC HDC, Int NLEFT, INT NTOP, INT NRIGHT, INT N Bottom) Description Draw a rectangular HDC graphic device handle NLEFT Left upper horizontal coordinate Ntop Left upper corner vertical sector NRIGHT Right lower horizontal coordinate NBOTTOM Return Return: Success Return true, failure Return False See ---- -
------------------------------ Name FillRect Prototype Int WinAPI FillRect (HDC HDC, Const Rect * Lprc, Hbrush HBR) Description The handle of the specified brush fill the rectangular HDC graphics device is directed to the rectangular RECT structure pointer HBR filled rectangular brush handle brush can also be obtained by GetStockObject function.
Return value: successful return non-0 value; failure returns 0 See getStockObject, ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Name SetRect Prototype BOOL WINAPI SETRECT (LPRECT LPRC, INT XLEFT, INT YTOP, INT XRIGHT, INT Y / INTTOM) Description Set a rectangular new shape LPRC pointing to the setting rectangular Rect structure pointer XLEFT new left upper horns YTOP new left upper corner longitudinal XRIGHT New upper corner horizontal ybottom new upper right corner longitudinal return value: success return non-0 value; failure returns 0 See setRectempty ------------------------------------------------------------------------------------------------------------------------------------------------------------------ -------- Name SETRECTEMPTY BOOL WINAPI SETRECTEMPTY BOOL WINAPI SETRECTEMPTY (LPRECT LPRC) Description Creating an empty rectangular LPRC pointing to this empty rectangular Rect pointer return value: successful return 0 value; failback 0 See SetRect, CopyRect - ---------------------------------- Name CopyRect Prototype BOOL WINAPI COPYRECT (LPRECT LPRCDST, Const * Lprcsrc) Description Copy a rectangular RECT structure pointer to another LPRCSST structure pointer lprcdrc points to the destination rectangular RECT structure pointer return value: success return non-0 value; failback 0 See setRect, setRectempty ------------------------------------------------------------ ------------
------------ Name Xorrect prototype void xorRect (HDC HDC, Rect * RECT) Description Reverse rectangular or, i.e., an anti-color display HDC graphics device handle RECT pointing to rectangular RECT structure pointers See free of charge ---------------------------------- Name IsRectempty prototype BOOL WINAPI IsRectempty (Const Rect * Lprc Describe the detection of whether or not a empty rectangle (invalid rectangle) LPRC pointing to the rectangular RECT structure pointer return value: TRUE invalid rectangle; false effective rectangle See ------------------- -------------- Name Inflaterect prototype BOOL WINAPI INFLATERECT (LPRECT LPRC, INT DX, INT DY) Description Add or Reduce the high and wide LPRC of the specified rectangle to point to the rectangular Rect structure pointer DX increase or Reduced width value DY increase or decreases the height value Dx, DY is a symbol, the positive table is increased, the plural is reduced return value: successful return 0 value; fail return 0 See OffsetRect ------- ---------------------------- Name IntersectRectRectRect (LPRECT DEST, Const Rect * SRC1, Const Rect * SRC2) Description Rectangular 2 Directional Srib 1 Dest pointing to the cross section rectangular SRC1 pointing to the rectangle 1 SRC2 pointing the rectangle 2 Return Value: If it is possible to return a non-0 value, return 0 See inflaterect, OffsetRect-
---------------------------------- Name OffsetRECT prototype BOOL WINAPI OffsetRect (LPRECT LPRC, INT DX, INT DY) Description Level or Vertical Move Rectangular LPRC points to the rectangular RECT structure pointer DX horizontally moving the value, the positive number represents the right shift; the negative table left shift DY vertical movement value, the positive number indicates down; the negative table is moved backward: successfully returned non 0 Value; failure to return 0 See INFLATERECT ---------------------------------- Name InvalidateRect Prototype BOOL WINAPI InvalidateRect (hwnd HWND, Const Rect * LPRECT, BOOL BERASE This is described to add a rectangular display area to the specified window. This also enables the customer area to redraw the HWND window handle such as NULL to redraw the entire window LPRECT point to the rectangular RECT structure pointer to be added. If it is NULL, the entire client area is added to the update area Berase background erase ID, the current version can only fill in the True return value: return value: successful return non-0 value; failback 0 See ValidateRect ----- ---------------------------- Name ValidateRect Prototype BOOL WINAPI VALIDATERECT (HWND HWND, Const Rect * LPRC) Describes to the specified window update area Reduce the rectangular display area HWND window handle If NULL is re-drawing the entire window LPRECT pointing to the rectangular RECT structure pointer to be NULL, the entire client area is subtracted to return the return value: return value: successful return non-0 value; failed Return 0 See INVALIDATERECT ----
------------------------------ Name GetUpdateRect Prototype BOOL WINAPI GetUpdateRect (HWND HWND, LPRECT LPRECT, BOOL BERASE) Description Get specified The exact display area of the window HWND window handle LPRECT points to the obtained display area rectangular Rect structure pointer berase background erase ID ------------------------------------ Name UnionRect prototype BOOL WINAPI UNIONRECT (LPRECT DEST, Const Rect * SRC1, Const Rect * SRC2) Describes the combination of two rectangles, which gives the minimum rectangular DEST containing the two rectangles to point to the rectangular rectangular SRC1 to merge the rectangle 1 SRC2 to merge the rectangle 2 Return value: return value: successful return 0 value; failure to return 0 See INFLATERECT, OFFSETRECT ---------------------------------- Name EqualRect prototype BOOL WINAPI EqualRect (const2) Describes whether the two rectangles are the same by comparing whether the specified two rectangles is the same RECT1 pointing to the rectangle 1 RECT2 pointing to the rectangle 2 returns: equal return True, not waiting to return False See ------------------------
---------- Name SubtractRectRectRectRectRect (LPRECT DEST, Const Rect * src1, const rect * src2) Description Get rectangular DEST after subtracting rectangular SRC2 from rectangular SRC1 points to the same reduction Rectangular SRC1 The rectangular rectangle to be subjected to rectangular SRC2 to be subtracted must occupy a complete section in the source rectangle, for example, if SRC1 is (10, 10, 100, 100) SRC2 is (50, 50, 150, 150) subtracting the resulting result is also ( 10, 10, 100, 100);,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, -------------------- Name getStockObject prototype HGDiobj WinAPI getStockObject (int Nobject) Description Get the default stored graphic object in the system device description table, such as brush, brush, font and other graphic objects nObject supports the following types of graphic objects in the current MicroWindow version: WHITE_BRUSH LTGRAY_BRUSH GRAY_BRUSH DKGRAY_BRUSH BLACK_BRUSH NULL_BRUSH HOLLOW_BRUSH WHITE_PEN BLACK_PEN NULL_PEN OEM_FIXED_FONT ANSI_FIXED_FONT ANSI_VAR_FONT SYSTEM_FONT DEVICE_DEFAULT_FONT DEFAULT_PALETTE SYSTEM_FIXED_FONT DEFAULT_GUI_FONT DC_BRUSH DC_PEN Stock_Last See SelectObject, DeleteObject -----------------------------------
Name SelectObject prototype HGDiobj WinAPI SelectObject (HDC HDC, HGDiobj Hobject) Describes a graphic object to the specified device description table, the new object will replace the object graphics device descriptor of the previously the same type of object, which is defined for a set of graphics objects and related The structure of the property, you must use this function to set the related graphic object when we need to draw a graphics device. There are 6 graphics objects, including bitmaps, brushes, brushes, fonts, regions, and palettes. In addition to the palette, these objects are selected from the device description table by SelectObject. After the device descriptor is released, you can use DeleteObject to delete the selected object. When using a graphic object, the following rules should be followed: × To delete all graphic objects you created × When the graphic object is in a valid device description table, do not delete it × Do not delete an existing object HDC device description table handle HOBJECT supported table objects must be created with the following function at the appropriate object handles: bitmap bitmap CreateCompatibleBitmap brush brush CreateSolidBrush Font font GetSystemFontObject Pen brush CreatPen region region CreateRectRgn see DeleteObject, CreateCompatibleBitmap, CreateSolidBrush, GetSystemFontObject CreatPen, CreateRectRgn ------ ------------------------------ Name DeleteObject Prototype BOOL WINAPI DELETEOBJECT (HGDiobj Hobject); Description Delete a graphic object and release it related to it System Resource HOBJECT Graphic Object Handle Return Value: Successful Return true, Failback Back False See SelectObject ---------------------------------------------------------------------------------------------------------------------------------------------- --- Name CreateSolidbrush Prototype HBrush WinAPI Createsolidbrush (ColorRef CRCOLOR) Description Creates a logical brush and selecting its device description table to fill the intra-graphical internal area.
After getting the brush handle, you can use SelectObject to select the device descriptor, and remove it with deleteObject after use. CRCOLOR brush color value return value: successfully returned to brush handle; failure to return Null See SelectObject, deleteObject ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---- Name Createpen Prototype HPEN WINAPI CREATEPEN (INT NPENSTYLE, INT NWIDTH, ColorRef crcolor) Description Generate a specified type, width, color brush brush that determines the color, width, and line style of the drawing line, default device description The brush is Black_Pen, which is a black single line brush. If you don't need the currently selected brush in the table, you need to create your own brush. NPENSTYLE brush type, current version of MicroWindow only supports two types: PS_SOLID SUP PS_NULL does not display line NWIDTH Specifies line pixel width CRCOLOR line color, the system converts it to the most similar color return value that can be represented by the device: successfully returned the last brush Handle; if the last time no pen hand is returned to Null See SelectObject, deleteObject ---------------------------------- Name getSystemFontObject Prototype HFONT GETSYSTEMFONTOBJECT (VOID) Description Getting the system specified by the system If you do not call this function, you can't display Chinese characters. You can only display 6 * 13 ASCII characters now only 12 * 12 Chinese characters (Jane, Traditional " And it is not recommended to use createFont () with CreateFont (). Because this may make system chaos If you want to use textOut (), TextOut () to display text, then write as follows Program: SelectObject (HDC, getSystemFontObject ()); to assign font objects to the device descriptor table (DC), and do not need to call deleteObject () release.
Return Value: Font Handle See SelectObject, DeleteObject ---------------------------------- Name CreateCompaPiBitMap prototype HbitMap WinAPI CreateCompablebitMap (HDC HDC, INT NWIDTH, INT NHEIGHT) Describes to the specified device description table Creating a bitmap color format created by this function in this function in this function inherits the device specified by the HDC parameter, this bitmap can be selected to describe the memory device description Table. Generally we use this function to create a bitmap to memory and then draw to the display buffer using Bitblt. When you create this bitmap, you also need to use SelectObjct to associate it into the specified HDC. When we don't need this bitmap, you should call DeleteObject to delete it. HDC device Description Table Handle NWIDTH Specified bitmap width nHEIGT in pixels NHEIGT NHEIGT NETRY Return Value: Successful Return Bits File, Failback Return Null See CreateCompatiBedc, DeleteObject, SelectObject --------- -------------------------- Name CreateCompaTibleDC Prototype HDC WinAPI CreateCompaBLEDC (HDC HDC) Description Creating a Memory Device Description of a Specified Device Description Table Handle Memory Device Description The table segment is only built in memory. There is only one pixel size when it is created. When an application needs to use it to complete the drawing operation, it must be given a correct size bitmap. Usually we use createCompATIBLEBITMAP to specify the size of the bitmap. When we no longer use this device description table, it is still deleted with deletedc. HDC points to the device description table handle.
When it is null, point to the current screen return value of the current application: successfully returns a memory device description table script; failure returns Null See CreateCompatibleBitmap, Deletedc ----------------- ---------------- Name CreateRectrGN prototype HRGN WINAPI CREATERECTRGN (INT LEFT, INT TOP, INT RIGHT, INTTTOM) Description Created a rectangular area graphic object Left rectangle left upper horizontal strobe TOP rectangle top left Corner longitudinal Right rectangular upper right corner crossbar Bottom rectangular upper right corner longitudinal return value: successfully returned the handle of the created area; failure to return Null See deleteObject, SelectObject -------------------------------------------------- ------------------ Name CreateRectrGnIndirect prototype HRGN WINAPI CREATERECTRGNIRECT (Const Rect * Rect) Description Another method of creating a rectangular area graphic object This method creates a rectangular area and use CreateRectrGn is exactly the same, but the parameter is different. Rect points to the Rect structure pointer return value to create a rectangular area: successfully returns the handle of the created area; Failback Returct, SelectObject, CreateRectrGN -------------- -----------------------
Name SetRectRGN Prototype Void WinAPI SetRectRGN (HRGN HRGN, INT LEFT, INT TOP, INT RIGHT, INTTOM) Description Change the left upper left corner of the rectangular left upper corner of the hrg n-left upper left corner of the hrGN region of the size hrgn area of a specified area graphic object The longitudinal Right changed the rectangular Right Change The upper right corner of the Bottom changed the rectangle in the lower right corner. The current version of the function is not returned. See CreateRectrgn --------------------- -------------- Name CreateroundRectrGN prototype HRGN WINAPI CREATEROUNDRGN (int LEFT, INT TOP, INT RIGHT, INT BOTTOM, INT Ellipse_Width) Description Create a Rounded Rectangular Area Graphic Object LEFT Rectangle Left upper corner horizontal TOP rectangular left upper corner longitudinal Right rectangular upper corner crossbar Bottom Rectangular upper corner longitudinal NWIDTHELLIPSE Rounded elliptical width NHEighTellipse Rounded Elliptic Height Return Value: Successfully returned the handle of the area; Failback Null See deleteObject, selectObject , CreateRectrignInderct ---------------------------------- Name CreatellipticRGN prototype HRGN WINAPI CREATEELLIPTICRGN (int LEFT, INT Top, int right, int intom Description Create an elliptic area graphic object Left Left upper horns horizontal TOP left upper corner longitudinal Right Right upper right upper horizontal Bottom upper right angle longitudinal return value: Successful returns the handle of the created area; Failback Null See deleteObject, SelectObject ------- -----------------------
---- Name CreatellipticRGNDirect prototype HRGN WINAPI CREATEELLIPTICRGNIIRECT (const reference *) Description Another way to create an elliptic area graphic object This method created the ellipse area is identical to CreatellipTRGN, but the parameters are different, RECT points to create RECT structure pointer returns to the ellipse area: successfully returns the handle of the created area; failed to return NULL to see CreateellLipTicRGN -------------------------------------------------------------------------------------------------------------------------------------------------------------- -------- Name GetRegionData Prototype DWORD WINAPI GETREGONDATA (HRGN HRGN, DWORD COUNT, LPRGNDATA RGNDATA) Description Getting Data HRGN Area Handle COUNT Store Data Buffer The length Rgndata points to the buffer to obtain data. Pointer return value: successful returns 1, failed: If count is not enough to return the required length, otherwise return 0, see ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -------- Name PtinRegion prototype BOOL WINAPI PTINREGION (HRGN HRGN, INT X, INT Y) Description Judging whether a point is in the specified area hrgn area handle X The point crossbacker Y. The point longitudinal return value: This area returns True, otherwise returns false See RectinRegion ---------------------------------- Name RectinRegion prototype BOOL WINAPI RectinRegion (HRGN HRGN, CONST Rect * RECT) Declats whether a rectangle is in the specified area HRGN area handle RECT pointing to the rectangular pointer return value: Returns true in this area,
Otherwise returning false See PtinRegion ---------------------------------- Name EqualRGN prototype BOOL WINAPI EqualRGN (HRGN HRGN1, HRGN HRGN2) Describe the size and shape of the two regions to determine if it is the same HRGN1 area 1 handle HRGN2 area 2 handle return value: equal return true, otherwise returning false See CreateRectrgn, CreateRectrGnIndirect ----------- ------------------------ Name Combinergn Prototype Int WinAPI Combinergn (HRGN HDEST, HRGN HSRC1, HRGN HSRC2, INT MODE) Combination Two Area Graphic Objects For a HDEST destination area handle HSRC1 area 1 HSRC2 area 2 MODE combination mode, it must be one of the following list: RGN_and two areas "and", pay the set part RGN_OR two areas "or", merge set RGN_XOR two The area "distal or" in the region RGN_COPY is directly copied from the region 1 RGN_COPY. The RGN_Diff combines two regions different parts return value: As the combination result is different, it returns one of the following values: NullRegion area is empty intenderegion The area is a single rectangular ComplexRegion area for multiple rectangular combined ERROR regions that are not created CreateRectrGN, CreateRectrGnIndirect ------------------------------------------------------------------------------------------------------------------------------------------------------------------ -----
Name OffsetRGN Prototype INT WINAPI OFFSETRGN (HRGN HRGN, INT X, INT Y) Description Move the area graphic object to the specified direction hrgn area pointer X lateral mobile unit, positive table left shift, negative table right shift Y longitudinal mobile unit, positive table Upload, negative table move back the return value: It returns one of the following values: NullRegion area is the empty SIMPLEREGION area for a single rectangular ComplexRegion area for multiple rectangular combined Error area is not created ---------- ------------------------ Name getRGNBOX prototype INT WINAPI GETRGNBOX (HRGN HRGN, LPRECT RECT) Description The boundary rectangular size of the area hrgn area handle Rect point to storage Rectangular size data pointer returns: zone properties, which returns one of the following values: NullRegion area is an empty SIMPLEREGION area for a single rectangular ComplexRegion area for multiple rectangular combined ERROR regions Not created -------------------------------------------------- -------------------------- Name InvalidaterGn Prototype BOOL WINAPI InvaliderGN (HWND HWND, HRGN HRGN, BOOL BERASE) Describes to the specified window update area increase area Coverage HWND window handle HRGN area handle Berase background erase ID, current version can only fill in TRUE Return value: Always return 0 See INVALIDATERECT, VALIDATERECT, VALIDATERGN ---------------------------------------------- -------------------
Name GetUpdaterGn Prototype INT WINAPI GetUpdatergn (HWND HWND, HRGN HRGN, BOOL BERASE) Description Get All Display Area HRGN The HRGN of the Specified Window HRGN Pointer to the Get The Structure Pointer BERASE The current version does not use this parameter return value: area properties, It returns one of the following values: NullRegion area is an empty SIMPLEGION area for a single rectangular ComplexRegion area for multiple rectangular combined ERROR regions are not created ------------------- -------------- Name ValidaterGn Prototype BOOL WINAPI VALIDATERGN (HWND HWND, HRGN HRGN) Describes to the specified window update area minus area coverage HRGN area handle Return value: success Return non-0 value; failure to return 0 See ---------------------------------- Name DrawDIB prototype BOOL WINAPI DRAWDIB (HDC HDC, INT X, INT Y, PMWIMAGEHDR PIMAGE) Description Drawing in the specified location, the current version supportable drawing file type is BMP, color 2, 4, 16 color HDC pointing to the existing device description table handle.
X Draw Big Better YDo Biographic Pinged Picture Pointer Pointer If graphics data in the BMP file, and makefile There is this compilation file, you can use it as follows: BMP file arrow.bmp extern mwimagehdr Image_arrow; DrawDIB (HDC, 0, 0, & image_arrow); Return Value: Successful Return true; Failed Return False See ----------------------------- ------ Name Bitblt Prototype BOOL WINAPI Bitblt (HDC HDCDEST, INT NXDEST, INT NYDEST, INT NWIDTH, INT NHEIGHT, HDC HDCSRC, INT NXSRC, INT NYSRC, DWORD DWROP) Description Bitblt (read bit blit) function implementation Block transfer function. It transmits the pixels of a rectangular area to the target device description table in the target device description table. By this function, the conveyed tile is directly displayed in the target device.
HDCDEST Target Description Table Check NXDext Target Rectangular Left Ultra Bid NYDEST Target Rectangular Left upper corner Longao NWIDTH Target Rectangular Width NHEIGHT Target Rectangular Height HDCSRC Source Device Description Table Check NXSRC Source Rollength Left Ultra Oral Operators NYSRC Source Rolume Left upper corner longitudinal DWROP light Delete operation The current MicroWindow version only supports srccopy mode, ie direct copy return value: successful returning non-zero value; failure return 0 See -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ----------- Name GDJPEG prototype #include device.h gdjpeg (PSD PSD, Mwcoord Destx, Mwcoord Desty, Mwcoord Width, MWCoRD Height, MWBOOL FAST_GRAYSCALE, CHAR * FileName) Description This is supported by MicroWindow The JPEG support engine is used to read the JPEG image file and write it to the specified device descriptor by pixel. Because it is the underlying function, there are many parameters, and to include the application.h header file PSD device description table points to the PSD structure (Microwindow) Screen display device) The PSD structure is an item included in the HDC, defined in Device.h: typedef struct _mwscreenDeevice * psd; typedef struct _MWScreenDef struct _mwscreenDevice {mwcoord xres; / * x screen res (real) * / mwcoord yres; / * Y Screen Res (REAL) * / MWCOORD XVIRTRES; / * X DRAWING RES (WILL BE FLIPPED In portrait mode) * / mwcoord yvirtres; / * y drawing res (will be flipped in portrait mode) * / int shape; / * # planes * / int bpp; / * # bpp * / int linealen; / * line length in BYtes for BPP 1, 2, 4, 8 * / / * Line Length in Pixels for BPP 16, 24, 32 * / INT Size
/ * size of memory; / * # screen colors * / int pixType; / * format of pixel value * / int flags; / * device flags * / void * addr; / * address of memory allocated (MEMDC OR FB) * / ... (see Details in Device.h)} ScreenDeevice; DestX Target's Left upper corner crossbarrat DestY target's left upper corner longitudinal Width JPEG image pixel width Heigth JPGE image pixel height fast_grayscale true resolution JPEG map Conversion (fast, recommended) False indicates that the file name of the FileName JPEG image will be converted to the file name of the FileName JPEG image. This function is not returned.
See gdbmp ---------------------------------- Name GDBMP prototype INT GDBMP (PSD PSD, Mwcoord Destx, Mwcoord Description This is the engine PSD device description of this is the engine PSD device description table for MicroWindow BMP files PSD structure (MicroWindow screen display device) DestX target's left upper corner of the Desty target The pixel width of the standard Width BMP image Height BMP image pixel height FileName BMP image file name return value: successful return 0, failback Return -1 See gdjpeg ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------------ Name GetsystemPaletteentries Prototype Uint WinAPI GetSystemPaletteEntries (HDC HDC, UINT ISTARTINDEX, UINT NENTRIES, LPPALETTEENTRY LPPE) Describes the Numerical HDC from the specified device description table : Graphics Equipment Handle iStartIndex: Palette Start Series Number NNTRIES: Get the total number of system palette values: Storage value memory pointer return value: success, get the number of system palette values; failure returns 0 See ----------------------------------- ************** ******************************************************************************************************************************************************************************************************************************************* *******
---------------------------------- Name CreateMenu Prototype HMENU WINAPI CREATEMENU (Void) Description Creating a Menu System Creating a menu The internal data structure returns: success, menu handle, fail, NULL see destroymenu ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --- Name LoadMenuex Prototype HMENU WINAPI LOADMENUEX (NameInfo * Minfo, LPCSTR LPMENUNUNUNAME, INT Count) Describes the data defined by the system load menu, which is a MICROWINDOW's private function Minfo menu data pointer If the menu is defined in the resource file, this parameter must be used Fixed name MENU_INFO, for example: extern nameinfo menu_info []; ...... LoadMenuex (Menu_INFO, "Test-Menu", Max_Menunumber); LPMENUNAME pointing to a string pointer point menu_info resource file The total number of menus defined in the menu is actually, and the resource file is compiled. The menu section data is placed in the menu_info array, and the loadMenuex function is positioned in the MENU_INFO array and then loads.
Return Value: Successfully returned to the menu handle; failure to return NULL See CreateMenu ------------------------------------------ Name DESTROYMENU Prototype BOOL WINAPI DESTROYMENU (HMENU HMENU) Description Destroyed Menu This function is used to destroy the menu that is not a window, a menu assigned to the window automatically deletes the HMENU menu handle when the program is turned off: successfully returns 0 value; failure Return 0 See CreateMenu, DeleteMenu, RemoveMenu ---------------------------------- Name InsertMenu prototype BOOL WINAPI INSERTMENU ( HMENU HMENU, UINT UIPOSITION, UINT UIFLAGS, UINT UIIDNEWITEM, LPCSTR LPNEWITEM) Description Insert a new menu item in the menu has been replaced by INSERTMENUITEM, but if you don't want to use INSERTMENUITEM, INSERTMENU can still be used.
HMENU menu handle UIPosition menu insertion position, or menu ID number UIFlags insertion mode, it must be one of the following: mf_byposition follows the Position (UIPosition) Insert menu item MF_BYCOMMAND Follow the ID Item UIIDNEWITEM This menu Id number LPNewItem Point this menu The string pointer of the item, if null is a blank menu return value: successfully returns true; failed to return false See appendmenu, deletemenu, InsertMenuItem ----------------- ---------------- Name Appendmenu prototype BOOL WINAPI APPENU (HMENU HMENU, UINT UIFLAGS, UINT UIIDNEWITEM, LPCSTR LPNEWITEM) Description Add a new menu item at the end of the menu Add a new menu item This function has been included in InsertMenuItem Alternative, but if you don't want to use INSERTMENUITEM, Appendmenu is still available.
HMENU menu handle UIFLAGS This parameter is currently useless to add menu item ID LPNewItem points to the string pointer of this menu item. If null is a blank menu return value: Successful return true; failure returns false See deletemenu, InsertMenuItem, InsertMenu ---------------------------------- Name InsertMenuitem prototype BOOL WINAPI INSERTMENUITEM (HMENU HMENU, UINT UIITEM, BOOL FBYPOSITION , LPMenuItemInfo LPMII) Description Insert a new menu item in the menu designation location ----------------------------------- MODIFYMENU prototype BOOL WINAPI MODIFYMENU (HMENU HMENU, UINT UIPSITION, UINT UIFLAGS, UINT UIIDNEWITEM, LPCSTR LPNEWITEM) Description Modifying an existing menu item HMENU Menu Handle UIPosition Menu Insert location, or a menu ID number UIFlags insertion method, it must be One of the following: mf_byposition Insert menu items MF_BYCOMMAND Follow the ID Insert menu item UIIDNEWITEM This menu item ID number LPNEWITEM points to the string pointer of this menu item content, if null is a blank menu Return value: successfully returned True; Failed to return False See appendmenu, insertmenu ---------------------------------
Name RemoveMenu Prototype BOOL WINAPI REMOVEMENU (HMENU HMENU, UINT ITEM, UINT FLAGS) Description Delete Menu Item in which itself does not have a submenu HMENU menu handle Item menu, the menu ID number Flags operation ID, can be one of the following: MF_BYPOSITION Delete position Wait to Item Menu Item MF_BYCOMMAND Delete ID is equal to Item menu item Return Value: successfully returns true; Failed to return false See deleteMenu, getSubmenu ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ---------- Name DeleteMenu Prototype BOOL WINAPI DELETEMENU (HMENU HMENU, UINT ITEM, UINT FLAGS) Description Delete menu item, such a menu item with submenu, delete HMENU menu handle Item menu arrangement Or menu ID number Flags operation ID, can be one of the following: mf_byposition delete position equal to item menu item MF_BYCOMMAND Delete ID equal to Item menu item Return Value: Successful returning true See GetSubmenu, RemoveMenu ------ ------------------------------ Name GetSubmenu Prototype HMENU WINAPI GetSubmenu (HMENU HMENU, INT POS) Description Sub-menu for specified menu items Handle HMENU menu handle POS menu item Return Value: Successful return submenu handle; if the menu item is no submenu, return null See -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------
Name ENABLEMENUITEM Prototype BOOL WINAPI ENABLEMENUITEM (HMENU HMENU, UINT ITEM, UINT FLAGS) Description Enables the menu item activation, disabling or measuring the HMENU menu handle Item menu location or ID Flags function ID, is the following two types of combinations: 1: MF_BYPOSITION position is equal to Item menu item MF_BYCOMMAND ID is equal to Item menu item 2: The MF_DISABLED menu item is forbidden to use the MF_ENABLED to activate the menu item MF_GRAYED menu item forbidden use, and become a gray return value: successfully returns true; Failed return false See CheckMenuItem ----- ---------------------------- Name CHECKMENUITEM prototype BOOL WINAPI CHECKMENUITEM (HMENU HMENU, UINT UIIDCHECKITEM, UINT UICHECK) Description Setup Menu item check Marking properties, that is, "Hook" HMENU menu handle UIIDCHECKITEM menu location or ID UICHECK function ID, is a combination of two categories: MF_BYPosition location equal to UIIDCHECKITEM menu item MF_BYCOMMAND ID is equal to UIIDCHECKITEM menu item 2: MF_CHECKED front There is no "pair" MF_unchecked, there is no "对" back value: successful return true; failure returns false See EnableMenuItem -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------- Name TrackPopUpMenu Prototype BOOL WINAPI TRACKPOPUPMENU (HMENU HMENU, UINT UIFLAGS, INT X, INT Y, INT NSYSTEMUNU, HWND HWND, Const Rect * LPreserved) Description In the specified location pop-up menu HMENU menu handle UIFlags operation ID, only TP_TRACKPOPUP is currently
That is, pop-up submenu X pop-up position Left upper corner horizontal Y pop-up position Left upper corner longitudinal nsystemMenu This parameter is currently invalid HWND menu The window handle LPRESERVED This parameter is currently invalid return value: success return true; failure Back False See getSubmenu ------ ------------------------------ Name MessageBox prototype MessageBox (HWnd HparentWnd, LPCSTR PSZTEXT, LPCSTR PSZCAPTION, UINT DWSTYLE) Description popping up a message Box This message box contains the program defined message, the title icon and the parent window of the button HParentWnd message window Disztext window Displayed Character Pszcaption window The title name DWStyle window The properties of the DWStyle window There is
Generate pop-up a dialog This is a dedicated function of MicroWindow. There is no Dialogbox function Hinst instance handle, which is fixed here, and the resource file dialog is defined (ignore the case) hWnd dialog box parent window handle LPDLGFUNC The dialog message processing function address is actually in which the handle of the dialog is explicitly passed to the LPDLGFUNC, using this handle to close the dialog message, with the resource file, fixed to Dialog_info, for example. ..... extern nameinfo dialog_info []; ... Dialogboxex (NULL, "DEMO", HWND, DEMO_PROC, DIALOG_INFO, DLGNUM); In fact, after the resource file is compiled, the dialog section is saved in Dialog_info array In the DialogBoxEx function, it is read from the Dialog_info array to read the data according to LPDialog.
In the count resource file, the total number of dialogs defined is returned: successful returns 0; failed to return -1 See EndDialog ------------------------- ---------- Name Checkradiobutton Prototype Void WinAPI CheckRadiobutton (HWND HDLG, INT NIDFIRST, INT NIDLAST, INT NIDCHECKBUTTON) Description Set a set of radio button control HDLG dialog handle NidFirst Setting up a set of radio buttons End ID NiDLAST Sets a set of radio button The end ID NIDCHECKBUTTON The Id number of the single options to select the NIDCHECKBUTTON ID number The single option of the NidCheckButton ID number is selected for the single option in Nidfirst and Nidlast. No selected this function. no return value see CheckDlgButton ----------------------------------- name SetDlgItemInt prototype void WINAPI SetDlgItemInt (HWND hDlg, INT NID, UINT WPARAM, BOOL, BSIGNED) Description Transfer the integer of the specified control in the dialog to the ID number of the display character HDLG dialog handle NID control, converted to display character bsigned here fixed-filling TRUE This function does not return value to get DETDLGITEMINT ------------------------------------ Name getdlgitemint prototype uint WinApi getdlgitemint (HWND HDLG, INT NID, BOOL * LPTRANSLATED, BOOL BSIGNED Description Turn the text of the specified control in the dialog to an integer HDLG dialog handle NID control ID number LPTRANSLATED to point to the integer of the character overflow,
If you spill True Bsigned true is a symbol number return value: integer values see setdlgitemint ----------------------------------------------------------------------------------------------- - Name SetdlgiteMtext Prototype Void WinAPI SetdlgiteMtext (HWND HDLG, INT NID, LPSTR LPSTR) Description Settings Dialog The title or text HDLG dialog box handle NID control ID number LPSTR storage string address This function does not return the value to see getDlgitemtext ---------------------------------- Name getDlgitemtext prototype int WinAPI getdlgitemtext (hwnd HDLG, INT NID, LPSTR LPSTR, INT NMAX) Description Get Title or Text HDLG Dialog Box Handle NID Control Id NMAX Address Memory Length Return Value: Failed Return NULL Refer to setdlgiteMtext ----- ------------------------------ Name Checkdlgbutton Prototype Void WinApi CheckdlgButton (HWND HDLG, INT Nidbutton, Uint Wcheck) Description Set Buttons Status HDLG dialog box handle Nidbutton button ID WCHECK setting status, two, true and false See -----------------------
------------------------ -------------------------------- ×××××××××××××××××× ××× × × other system functions ×× × ×××××××××××××××××××
---------------------------------- Name: Mwuserinit prototype: int mwuserinit (int AC, char ** av) Description : Provide the user with a name interface. You can pass command line parameters. The function call is before the MicroWindow GUI is established, before the Winmain () function. The number of int AC parameters CHAR ** AV Each parameter pointer: int mwuserinit (int Argc, char ** argv) {systemgc = argc; systemargv = argv;
INITCATEGORY (); getConfig (& Config);
IF (config.Sortby> = 2) config.Sortby = sort_by_alp; return 0;} Return value:> = 0 success 0 Return Value: True: Write protection false: No write protection ------------------------------- Name: getSystemPowerStatus prototype: Bool getSystemPowerStatus (System_Power_Status * LPPW) Description: Get the state of the battery, the data structure is as follows: TypeDef struct {byte aclinestatus; // 0: Unconlined, 1: Connection, 255: Unknown Byte Batteryflag; // 1: High 2: Low 4: Criteria 8: Charging 255: Unknown Byte BatterylifePercent; // 0 ~ 100, OR 255: Unknown BYTE RESERVED1; // 0 int hi; / / Voltage high-end value int Lo; / / voltage low end value} system_power_status; return Value: True: Success FALSE: Failure Note: If USB Slots Online, Aclinestatus = 1, Batteryflag = 8 ------------------------- ------ Name: Showabout prototype: int showabout (char * file) Description: Display information. FILE calls the function name registered with the module in the system program registration database. Example: Showabout ("abc"); here ABC is the program name return value: 0 About information 1 Non-information ------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Help documentation let users understand the functionality of this interface. Name: Document Directory and help document name cache area. BUF: The program interface name cache area. For example: showhelp ("abc", "main"); here ABC is the program name, main means to start displaying from the main mark from the help document: Help text name is the same as the package. Such as npd / npd.hlp, guess / guess.hlp. Different interface display help in the same program should call: such as the main interface showhelp ("npd", "main"); open the interface showhelp ("NPD", "Open "); Help documentation should be written in the following format: [main] First help text [open] open the interface help text ....-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------- ××××××××××××××××××× × × × database function ×× ×× ××××××××××××××××××××××××××××××××××××××××××××××××××××× --------------------------------- Description: This database system is a database system that GGV is specifically made for developers. Applying this system can be easily established, saved, and edit databases. If you use WalkPad Designer, the dynamic link library of the database function library will be associated by default. We can use these functions as long as we contain the header file #include "pub / dbodm / newdbiah". -------------------------------- Name: db_create prototype: int db_create (char * filename, db_key * key, db_record * REC) Description: Create a database file. Create a newly created file in the open state. Because three files are created, control both files, data files, and an index table file, so who need to choose who is called before this function Set index tables for keywords. FileName: The database file name to be created: Select index table REC: TypeDef struct {char name [20]; CHAR AGE [4];} REC_RECORD; return value:> = 0 Normal-1 failure See: db_open ---------------------------------- Name: db_open prototype: int DB_Open CHAR * FileName, int MODE) Description: Open an existing database file. If you can't open it, use DB_CREATE to build. FileName: The database file name to open. Mode: ON mode (O-RDONLY: read-only mode, O-RDWR: reading and writing mode) Return value: Normal:> = 0 Failure: -1 Enter the file name is empty or length is zero or system error -2 Database file There is no -3 In the control file read control file according to the file name, the error is in the control file, the error is changed when the structure is converted in the control file, the error is created, the error is created, the error is created, the error-7 index table file error -99 Error (more than 30 database handles) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Name: DB_SELIDX prototype: int DB_SELIDX (INT FD, DB_KEY * Key) Description: Select a configured word index. The index table is selected to select a new index for the keyword of this index table. After the table, the current record is not necessarily the first record of the database file. FD: File Identifier Key: Select index table according to different keyword combinations:> = 0 Success-1 failure See: db_delidx, db_addidx ---------------------------------------------------------------------------------------------------------------------------------------- ------------- Name: db_addidx prototype: int DB_ADDIDX (INT FD, DB_KEY * Key) Description: Add a configured word. The index table keyword in the database file can be created up to 3 keyword combinations. The type of keyword must be the same, and Char and unsigned char are considered the same in this DBODM, but Typebin cannot be used as a keyword. There can be up to 10 index meters in the database file. FD: file ID * Key: Select different keyword combination establishment index table Return Value:> = 0 Normal-1 failure See: db_delidx, db_selidx ------------------- ---------------- Name: db_delidx prototype: int db_delidx (int FD, DB_KEY * Key) Description: Delete a configured word. FD: file ID * Key: Select the index table to be deleted according to different keyword combination Return Value:> = 0 Normal-1 failure See: db_addidx, db_selidx ---------------------------------------------------------------------- ------------------- Name: DB_Remove Prototype: INT DB_REMOVE (CHAR * FileName) Description: Delete database files. Filename: The database file name to be deleted is returned:> = 0 Normal-1 Failure See: db_create, db_open --------------------------- -------- Name: DB_ORG Prototype: INT DB_ORG (Char * FileName) Description: Reforming the storage of database files, after reorganization offset will change, and generate a name in the directory of the AP storage database file For the * .eorg ("*" represents the name of the database .AP can determine if the file is reorganized by judging if this file exists. FILENAME: The database file name to be reforming. Return value:> = 0 Normal-1 failure See: DB_CREATE, DB_OPEN, DB_CLOSE --------------------------------- - Name: DB_CLOSE Prototype: INT DBCLOSE (INT FD) Description: Turn off the database file. FD: File Identifier FD can be obtained from db_create, db_open. Example: static int dbindex_fd; dbindex_fd = db_create (filename, & db_key, & db_close); ... db_close (dbindex_fd); ... return value: 0 normal <0 Failure See: db_create, db_open --------- -------------------------- Name: dbget_cur_off prototype: OFF_T DBGET_CUR_OFF (INT FD) Description: Take the offset value of the current record, the file is empty When it is taken, it is the start address of the store. FD: file ID Return Value:> = 0 Normal-1 Failure See: DB_Close --------------------------------- ------- Name: db_readn_before_seek prototype: OFF_T DBREADN_BEFORE_SEEK (INT FD, UNSIGNED CHAR * Key, INT * Keylen, Int) Description: After reading the current record, the file pointer is positioned Specify a record. Return the value of the recorded value fd: file identifier Key: Pointer keylele pointer to the keyword value of the record: Keyword length Record: Pointer pointer to the data value in the record: Pointing Record the length of the data length mode: Locate to the specified record CSMLEST: Located to the minimum record CLAGEST: Located to the largest record cnxtlag: Located to the next record of the current record CPRVSML: Position to the previous record of the current record : int rec_len, key_len; ... DBINDEX_fd = DB_create (FileName, & db_key, & db_record); DB_read_before_seek (DBINDEX_fd, (DBREC) & db_key, & key_len, (DBREC) & rec, & rec_len, CNXTLAG); ... return value: ormal : RTN_OFFSET FAIL: <0 where return thptr = After reading the current record, move the cursor to the specified position OK: 0 END OF FILR or Begin of File: -2 Error: -1 See: db_read_after_seek, DB_READ_CUR -------------------------------------- Name: DB_READ_CUR prototype: OFF_T DB_READ_CUR (INT FD, Unsigned Char * RECORD) Description: When the index table is selected, read the current record in the index table. Return the value of the current recorded offset value fd: file identifier Record: pointing The structure pointer of the data value is returned: Normal: RTN_Offset Current data offset value error: <0 See: db_read_after_seek --------------------- ---------------- Name: DB_READ prototype: OFF_T DB_READ (INT FD, Unsigned Char * Record, INT MODE) Description: Read the record of the specified key value and use it as the current Record. Return value for the current recorded offset value, the key here is taken from the replan according to the index table, so the key is just an outlet, and the input key should be input from the RECORD input by the index table. The structure of the data value Mode: CKEY Database file is the same key Clekey as the input key value. If the database file is not the same in the database file, the file pointer is positioned to the first KEY. Record. If the next key does not exist, return a negative number csekey if there is no key with the same key value in the database file, then position the file pointer to the previous record. If the last record does not exist, return a negative number return Value: Normal: RTN_OFFSET Current Data Offset Address Error: <0 ----------------------------------- ------ Name: DBREAD_OFFSET Prototype: OFF_T DBREAD_OFFSET (INT FD, Unsigned Char * Record, Off_t Offset) Description: Remove the data specified by the correct OFFSET, the OFFSET must be correct. FD: File ID Record: Buffer pointer to the data value in the record: Offset address return value: Normal: RTN_OFFSET Current data Error: <0 -------------- ---------------------------- Name: db_seek prototype: int db_seek (int FD, int N, int mode) Description: Current record Located to a record (Offset = db_end, positioning to the last one; offset = db_begin, positioning to starting; otherwise, according to the key, offset value is positioned to the specified one). FD: file identifier mode: position mode mode = db_end -1; mode = db_begin -2; mode = db_cur = 0 N:> 0 backward N = 0 Current <0 forward N return value: 0 Normal 0 FD: File Identifier Record: Structural pointer to the data value in the record: dbindex_fd = db_create (filename, & db_key, & db_record); ... db_insert (dbindex_fd, (dbrec) REC_FILE, SIZEOF (Rec_Record), (DBREC) & DB_Key SIZEOF (db_key)); ... return value: normal: RTN_Offset failed: <0 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ---------- Name: DB_MODIFY prototype: OFF_T DB_MODIFY (INT FD, Unsigned CHAR * RECORD) Description: Modify the value of the current record. The offset address of the modified record and the offset address recorded before the modification Different, the ID is the same. (ID is obtained by the function db_getid) FD: file identifier Record: The structure pointer to the data value in the record: Normal: RTN_Offset failed: <0 See: db_getid --------------- -------------------------- Name: DB_MODIFY_CUR prototype: OFF_T DB_MODIFY_CUR (INT FD, Unsigned Char * Record) Description: Selected in the index table In the case, modify the content of the current record in the index table, after the modification of the OFFSET is constant, the keyword is constant, the Rawid is unchanged (Rawid is not changed) fd: file ID: Record: Pointed a structure pointer to the data value in the record Value: Normal: RTN_OFFSET FAIL: <0 -------------------------------------- Name : DB_MODIFY_OFFSET Prototype: OFF_T DBMODIFY_OFFSET (INT FD, Unsigned Char * Record, Off_t Offset) Description: In the case where the index table is selected, in the index table find the corresponding record according to the OFFSET, replace the original Content, after modification, the keyword is unchanged, the keyword is constant, the Rawid is unchanged (Rawid is not changed by the function DBGET_RAWID) FD: file ID: the structure pointer to the data value in the record: Normal: RTN_Offset Fail: <0 ---------------------------------------name: DB_CHANGE_KEY_CUR prototype: OFF_T DB_CHANGE_KEY_CUR (INT FD, Unsigned Char * Record) Description: In the case where the index table is selected, modify the content of the current record in the index table, the modified OFFSET changes, the Rawid is unchanged (Rawid is obtained by the function DBGET_RAWID) , File pointer points to the modified record fd: file identifier replaord: pointing to the structure pointer of the data value in the record returns: Normal: RTN_Offset Fail: <0 ----------------- -------------------------- Name: db_change_key_offset prototype: OFF_T DB_CHANGE_KEY_OFFSET (INT FD, Unsigned Char * Record, Off_t Offset1) Description: In the index table In the case of the selected case, enter the correct OFFSET in the index table, find the corresponding record according to OFFSET, replace the original content with the input content, modified the offset change, the RAWID is unchanged (Rawid is made by the function dbget_rawid), The file pointer points to the modified record. FD: file identifier Record: The structure pointer of the data value pointing to the record offset1: Offset address return value: Normal: RTN_Offset Fail: <0 -------------------------------------------------------------------------------------------------------------------------------------------------- ----------------------- Name: db_delete_offset prototype: int dbdelete_offset Description: Delete the specified record, remove the file pointer Point to the next record of the deleted record, if the last record is deleted, then: If there is only one record in the key where the last record is located, then the file pointer points to the first key of the first key. If the last one If there is more than one record in the record, then the file pointer points to the previous record until the last record is deleted after the last record is deleted, and the file pointer points to the first record of the upper key (Key and Offset must be correct. of). FD: file identifier OFFSET: Offset address Return Value: Normal: 0 Error: <0 ----------------------------- ------------- Name: DB_DELETE prototype: int DBDelete (int FD, unsigned char * record) Description: Delete the first record of the specified key, indicate the file pointer to the deleted record after deleting the file pointer Next record, if the last record is deleted, the file pointer points to the first record of the upper key to record the key from the index table, and the input key is input from the RECORD input according to the index table. FD: File ID Record: Pointing the structural pointer of the keyword value in the record returns:> = 0 Normal-1 failed ------------------------ -------------- Name: db_delete_cur prototype: int DB_DELETE_CUR (INT FD) Description: Delete the current record, and will record the latter record as the current record, if the last record is the last record, then : If there is only one record in the key where the last record is located, then the file pointer points to the first record of the previous key. If there is more than one record in the key in the last record, then the file pointer points to the previous one. Record until the last record is deleted after the last record is deleted, the file pointer points to the first record of the upper KEY. FD: File ID Return Value: Normal:> = 0 Failure: -1 See: dbclose ------------------------------- ------- Name: db_key_rec_count prototype: int DB_key_rec_count (int FD, Unsigned Char * Record) Description: How many records under a KEY value in the database file, the file pointer points to the key to Key is based The index table is taken from the Record, so entering the key to enter from the Record according to the index table. FD: File Identification Record: Data Structure Pointer Return Value: Normal:> = 0 File Record Number Failed: <0 See: DbClose -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------- Name: db_rec_count prototype: int db_rec_count (int FD) Description: How many records in the computational database file, the file pointer points to the FD: file ID Return value: Normal:> = 0 The number of file records failed: -1 See: db_close ------------------------------------------------------------------------------- - Name: db_key_count prototype: int DBKEY_COUNT (INT FD) Description: FD: file ID Return Value: Normal:> = 0 Fail: -1 See: db_close ---------------- -------------------- Name: db_get_dbversion prototype: int db_get_dbversion (unsigned char * verbuf) Description: Take the version number VERBUF: The version number of the obtained database is returned: Normal: 0 failed: <0 See: ----------------------------- ---- Prototype: int db_get_dbversion: The version number of the database file is obtained. The obtained version number indicates which version of the database file is operated by the database operation VERBUF: The version number of the obtained database file is returned: normal : 0 Failure: <0 See: --------------------------------- Name: db_write_apversion prototype: int db_write_apversion (int FD, Unsigned Char * Apverbuf) Description: Write the version of the application to the database file (the first write must be correct, write again to write the return negative value) FD: file identifier Apverbuf: write The application version number returns: normal: = 0 Failure: <0 See: ------------------------------- -------------------------------------------------- ---------- Name: DB_READ_APVERSION prototype: int DB_READ_APVERSION (INT FD, UNSIGNED CHAR * APVERBUF) Description: Read the version of the application from the database file: FD: file identifier Apverbuf: Read the application Version number return value: Normal: 0 failed: <0 See: ---------------------------------------------------------------------------------------------------------------------------------------------------------------- : DB_LOCK prototype: INT DB_LOCK (INT FD) Description: Unlocked the entire database file. FD: File ID Return Value: Normal:> = 0 Failure: <0 See: DB_Close ----------------------------- ---- Name: DB_UNLOCK (INT FD) Prototype: INT DBUNLOCK (INT FD) Description: Unlock the entire database file. FD: File ID Return Value: Normal:> = 0 Failure: <0 See: DB_Close ----------------------------- ---- Name: DB_FLUSH (INT FD) Prototype: INT DBFLUSH (INT FD) Description: Refresh The entire database file FD: file ID Return value: Normal:> = 0 Failure: <0 See: db_close -------- ------------------------------ Name: DB_SEEK_RAW prototype: int DB_Seek_raw (int FD, int MODE) Description: Position according to MODE to the specified Record fd: file identifier Mode: Positioning mode DB_BEGIN Located to the first record DB_END positioning to the last record CNXTLAG positioning to the next record CPRSML positioning to the previous record Return Value: Normal: 0 Fail: <0 ----- -------------------------------- Name: db_read_cur_raw prototype: int DB_READ_CUR_RAW (INT FD, UNSIGNED CHAR * RECORD) Description : Directly reading the current data file pointer directly from the data file FD: file identifier Record: The structure pointer pointing to the data value in the record: Normal: 0 Fail: <0 ---------- ---- ------------------------- Name: DBGET_RAWID prototype: OFF_T DBGET_RAWID (INT FD, OFF_T Offset) Description: This article is obtained according to a record of offset Recorded RAWID and returned it as a return value (here the offset referring to a certain index table) FD: file identifier OFFSET: Offset Address Return Value: Normal: This record ID Fail: < 0 -------------------------------------- Name: db_read_rawid prototype: int db_read_rawid (Int FD, Off_t Rawid, Unsigned Char * Record Description: According to a recorded RAWID reads this recorded content fd: file identifies OFFSET: Id Record: Normal pointer to the data value in the record: Normal: 0 Fail: <0 ----------------------------------- ××××××××××××××××××××× ×××××××××××××××××××××××××××××× ×× ----------------------------------- Description: This is the time related part of GGV for developers Dedicated functions, if you use WalkPad Designer, the system will default to the dynamic link library of the clock function, we only need to join: #include "pub / time / timepub.h" --------- -------------------------- Name: DATE_CMP prototype: int Date_cmp (char * DATE_1, CHAR * DATE_2) Description: Compare DATE_1 and DATE_2 size . CHAR * DATE_1 shaped, CCYYMMDD format string char * DATE_2, such as ccyymmdd format string YYMMDD range 1950 to 2049 return value: <0: DATE_1 char * sdate start date, such as 960301 char * edate termination date, such as 991010 struct DATESTRU * date_array; output of the form: maximum interval of several structures described between 960301961231970101971231980101981231990101991010 int max_years sdate and edate: struct DATESTRU {char sdate [6]; Char edate [6];}; return value: 0 Success-1 sdate> edate -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------- Name: FTIME prototype: ftime (char * date) Description: Returns the formatted string of the current time. Date returned - Parameter results such as: SAT, APR 28, 2001 04:04 PM -------------------------------------------------------------------------------------------------------------------------------------------------- -------------- Name: get_hms prototype: int GET_HMS (Char ctime []) Description: Return to the current format time CTIME format (hhmmss) CTIME Current format time return value: 0 --- ------------------------------------------ Name: GET_MD prototype: int GET_MD (CHAR * MMDD) Description: Return the current format time MMDD format (MMDD) MMDD Current format time return value: MMDD format time ----------------------- ------------------ Name: get_ymd prototype: int GET_YMD (CDATE) Description: Returns the current format time CDATE format (cdylemmdd) cdate Current Format Time Example: Char MyDate [ 11]; char yy [2]; get_ymd (mydate); Strncpy (YY, & ZZ [2], 2); MessageBox (Null, YY, "Year", MB_OK); Return Value: Ccymmdd time format ---- ------------ ---------------------------------- Name: get_ymdhms prototype: int GET_YMDHMS (CHAR * DTIME) Description: Return to the current format Time DTIME Format is (ccyymmddhhmms) DTIME Current Format Time Return Value: CCYYMMDDHHMMSS Time Format See: GET_YMD -------------------------------------------------------------------------------- ------------------------------------------------name: Isdate prototype: int isdate (char * STR, CHAR * DATEFMT) Description: Check if the string meets the specified date type time format of the DATEFMT format. String String Datefmt Date String Format / * "CCYYMMDD", "MMDDCYY", "DDMDCYY", "MMDD" × / Return Value: 1 Combine DATEFMT Format 0 does not comply with DateFMT format ---------- ------------------------------ Name: ISTIME prototype: int tentime (char * str, char * TIMEFMT) Description: Check Character Whether the string complies with the specified time format of the DateFMT format char * TIMEFMT Timing string CHAR * TIMEFMT Timing string "hhmmms", "MMSS"; can also return a value for any combination: 1 Combine TIMEFMT format 0 does not comply with TIMEFMT format -------------------------------------------- Name: NewDate prototype: NewDate (CHAR * Olddate, Char * NewDate, INT Days) Description: Under the premise of knowing the old date, the number of days (DAY) of the plus / decrease is offset to get a new date. Olddate Enter the old date format string (ccymmdd) Olddate can be unsatisfactory, such as: 19981254 can be automatically changed to 19990123 NewDate New Date (Output) Days New Date and the Old Date Interval Number Number Return Values: NewDate's Weekday (0: Sunday 1: Monday ... 6: Saturday) ----------------------------------------------------------------------------------------------------------------------- ---------- Name: NewTIME prototype: NewTIME (Char * Oldtime, Char * NewTime, INT MINS) Description: Under the premise of knowing the old date time, the number of minutes of the plus / miniature Move, get new date time. Oldtime Enter the old date Time format string (i) Oldtime can be unregistered MMDDHHMMSS, such as: 19981254256567 automatic change to 19990124020607 Newtime new date time (output) Mins Number of minutes from the new time and the old time: Newtime's Weekday (0: Sunday 1: Monday ... 6: Saturday) ----------------- ---------------------------- Name: Time2HMS prototype: void Time2HMS (Time_t DT, Char * HMS) Description: Local Time LocalTime ( Represents the number of seconds from 19700101080000 Tz such as: DT = 4 hms = "08:00:04" conversion date Time Variable DT is a time format string (HH: mm: ss) If DT = 0L, take the current time . DT input time interval (second) HMS "hh: mm: s" format string pointer (output) return value: no ---------------------- -------------------- Name: Time2ymdhms Prototype: Time2ymdhms (Time_t LTIME, CHAR * STIME) Description: Use local time localtime () Represents the number of seconds starting from 19700101000000 TZ conversion date Time Variable LTIME (relative to 0:0:05 January 1 January 1970) is a datetime format string (CcymmddhhmmMMSS). LTIME input time interval (second) Stime returned date time format string (output) ------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------ Name: Time_cmp Prototype: Time_cmp (Char * Time_1, Char * Time_2) Description: Comparison Date Time Format Strings TIME_1 and TIME_2 Size; TIME_1 and TIME_2 The maximum length of 12 is compared. Time_1 Date Time Format (CCYMMMDHMMMS) String Time_2 Date Time Format (CCYYMMDDHMMS) String Return Value: <0 STR1 less than STR2 = 0 STR1 equal to STR2> 0 STR1 greater than STR2 ------------------------------------------ ------------------------ Name: YMDHMS2TIME prototype: int ymdhms2time (char * TIME_STR, long * stime) Description: Local time string of YMDHMS format Converted to a second-second unit of 0 seconds 0 seconds 0:05 January 1, 1970. Time_str YMDHMS format string stime in seconds-unit time value (output) -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------ Name: Date2Date prototype: int Date2Date (char * DATE1, CHAR * DATE2) (Year> = 1900) Description: Change the normative time form is the correct time form (Year> = 1900) Returns the correct time form. Date1 irregular date form CCYYMMDD DATE2 correct date form CCYYMMDD (output) return value: 0 Correct Other errors --------------- ------------------ Name: getDays prototype: int getDays (char * ptr) Description: How much PTR form is calculated from January 1, 1800 to the input date Ccymmdd date string return value: from January 1, 1800 to the number of days during the input day ---------------------------------------------------------------------------------------------------------------------------------- --------------- Name: getdatefromccymmww prototype: int getdatefromccymmwwd (char * ptr, char * rett) Description: Convert form for ccymmwwd to ccymmdd form and judgment this month Whether there is input weekly PTR form for ccyymmwwd date string REPTR form is CCYYMMDD date string (output) return value: 1: This month has this week 0: This month does not have this week ----- -------------------------------------- Name: getDateFromwwwd prototype: void getdateFromwww (char * ptr, CHAR * RETPTR) Description: Conversion of a date string of ccymmwwd into ccyymmdd in the form of ccymmdd is a date string of ccymmwwd to ccymmmdd's date string (output) return value: None ------------------------------------------------ ------------------------ Name: getformatday prototype: void getformatday (char * ptr, char * reteptr, char * format) Description: Shape input Transforming to a specified form of a string for a specified form of a string for a specified format, Retptr is an empty string. PTR shape CCYYMMDD date string RePTR shape as a date string (output) format specified by Format CCYYMMDD CCYY-MM-DD CCYY-MM CCYY CC YYMMDD YY-mm-dd -ylemm -yy-mm -Mmdd ... return value: no ------------------------------------------------------------------------------------------------------------------ Name: GetMaxDayofmonth prototype: int GETMAXDAYOFMONTH (CHAR * PTR) Description: The date string of input-shaped ccymmmdd finds the date of the month's maximum day PTR form is a date string of ccymmdd: the day of the bigest day ---- ------------------------------------------ Name: getweekday prototype: void getWeekday (charr * PTR, CHAR * BUF, CHAR * ARGV []) Description: Find the date of the date where the input shape is ccymmdd, the date PTR form of each day of the week is ccyymmdd's date string argv [] Form is ccymmmdd date string array (Output) Return value: None ------------------------------------------- - Name: get_weekofmonth prototype: int GET_WEEKOFMONTH (Char * PTR, Char * Retptr) Description: Transforming the date string of the input shape CCyymmdd into ccymmwwd form string PTR form is a date string of ccyymmdd RetPTR shaped the date string (output) of ccymmwwwd (output) Return value: Get the first month of the first month Zhou's week ------------------------------------- Prototype: struct datetm * mkdate (int Days) Description: Depending on the number of days from January 1, 1800, a structural pointer DAYS is returned from January 1, 1800: get the structure pointer ------------- -------------------------------------------------- -------- Name: MKDATECHAR prototype: struct datetm * mkdatechar (char * ptr) Description: Enter a date string of ccymmdd Returns the time structure pointer PTR shape as ccymmdd date string (i) return value : Get the structural pointer ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------ Name: weekdayofmonth prototype: int Weekdayofmonth (Char * Ptr, Int Week, int weekday, char * Retptr) Description: Enter the date of the date and month and the date of the day, the date string of ccyymmdd, PTR shape, the date string of ccyymm, Week, the last few weeks Retptr, the shape of the shape ccymmdd (output) Weekday week return value: 0 : Correct 1: Error ---------------------------------------- Name: DateType1 prototype: INT daystype1 (char * startptr, int day) Description: This program satisfies the loop law: input start date and interval number every few days, whether the specified date of the verification input is from the start date in several intervals The date. StartPTR Start Date String Pointer CCYYMMDD THEPTR Specify Date String Pointer CCYYMMDD DAY Space Number Return Value: Returns 0 If the input specified date does not meet the loop law, return 0, if the specified date input is from the beginning date, after several times the number of days from the start date Date Back 1 -------------------------------------- Name: DateType2 prototype: int daystype2 Char * StartPtr, int Week, Char * Weekday) Description: This program meets the loop law: every week *** input start date and interval weeks and days, the specified date of the inspection input is From the start date, you specify the date of the week after several intervals. StartPTR Start Date String Pointer CCYYMMDD THEPTR Specify Date String Pointer CCYYMMDD Week Interval Week Week Date Return Value: If the input specified date does not meet the loop law, return 0, if the input specified date is from the start date After several intervals, the date of the week is specified, returns 1 ------------------------------------ - Name: DateType3 prototype: int daystype3 (char * startptr, char * theptr, int month) Description: This program meets the loop rules: Enter the start date and interval month of the day, whether the specified date of the verification input is From the date of the start date, the date after several intervals. StartPTR Start Date String Pointer CCYYMMDD THEPTR Specify Date String Pointer CCYYMMDD Week Interval Week Week Date Return Value: If the input specified date does not meet the loop law, return 0, if the input specified date is from the start date Return 1 after the date of the day after the month, the date -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Name: DateType4 prototype: int daystype4 (Char * Startptr, CHAR * THEPTR, INT MONTH, INT WeekDay) Description: This program meets the loop law of the procedure: weekly input start date and interval number, inspection input Specifies whether the date is specified from the start date after several intervals after a few intervals. StartPTR Start Date String Pointer CCYMMDD THEPTR Specified Date String Pointer CCYMMMDD MONTH Space Month Week Date Measurement Several (i) Return Value: Returns 0 Return 0 If the input specified date does not meet the loop law, if the input specified date is from start The date will be specified after several intervals and return to 1 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------- Name: DateType5 prototype: int daystype5 (char * startptr, char * theptr, int year) Description: This program meets the loop rules: starting the day on the day of the month Date and interval, whether the specified date of the inspection input is from the date of the month after several intervals. StartPTR Start Date String Pointer CCYYMMDD THEPTR Specify Date String Pointer CCYYMMDD YEAR Interval Number Return Value: Returns 0 If the input specified date does not meet the loop law, return 0, if the input specified date is from the start date in several intervals after several intervals Return 1 on the day ------------------------------------ Name: DateType6 prototype: int Daytype1 (Char * Startptr, CHAR * THEPTR, INT Year, INT WeekDay) Description: This program meets the loop rules: Every year, the start date and interval in the week and the number of intervals and interval in the month, inspection input Whether the specified date is from the start date in several interval days, the date is specified as a date on weekdays. StartPTR Start Date String Pointer CCYMMDD THEPTR Specified Date String Pointer CCYMMDD YEAR Interval WeekDay When Weekly Return Value: Returns 0, if the input specified date does not meet the loop law, return 0, if the input specified date is from the start date After several intervals, the date of the week is the day of the week, the date is returned to 1. -------------------------------------------- Name: FindType1 prototype: INT FINDTYPE1 (Char * StartPtr, Char * enddate, int day, char * rete) Description: This program meets the loop rules: input start date, the range of cyclic dates and interval numbers, inspection input The specified date is from the date after several intervals from the start date. StartPTR Start Date Character StartDate Range The start time Enddate range End Time DAY Cycle Rules, Retide Return Value Every day: Return Value: Return 0, if the input specified date does not meet the loop law, return 0, if the input specified date is from start Return 1 after the date of several times the number of days after the date ------------------------------------- ---------- Name: Findtype2 prototype: int FindType2 (Char * Startptr, Char * StartDate, Char * Enddate, int Week, Char * WeekDay, Char * Retptr) Description: This program meets the loop law: Every week *** Enter the start date and the interval number and the specified day of the week, whether the specified date of the verification input is the date of the week after several intervals from the start date. StartPtr Start Date Character StartDate Range The start time Enddate range end time (Week loop rules, weekly weekday loop rules, weekly RetPtr Return Value (output) Return value: If the input specified date does not meet the loop law, return 0, if The specified date of the input is to specify the date of the week after several intervals from the start date. Back 1 -------------------------- ------------ Name: FindType3 prototype: int FindType3 (Char * StartPtr, Char * StartDate, Char * Enddate, int MONTH, CHAR * RETPTR) Description: This program meets the loop law: each In a few months, the start date and the number of monthly months were entered. The specified date of the inspection input was the date after a certain period of time from the start date. STARTPTR Start Date Character StartDate Range The start time Enddate range End Time MONTH loop rules, Retptr Return Value (Output) Return Value per month: Return 0, if the input specified date does not meet the loop law, return 0, if the specified date is started Return 1 after the date of several intervals after several intervals, 1 ----------------------------------- ---------- Name: Findtype4 prototype: int FindType4 (Char * Startptr, Char * StartDate, Char * Enddate, Int Month, Int WeekDay, Char * Retptr) Description: This program meets the loop law: On the weekly weekly input start date and interval number, the specified date of the verification input is specified after several intervals after a certain period of time from the start date. StartPTR Start Date Character STARTDATE Range The start time Enddate Range End Time Month Cycle Rules, WeekDay Cycle Rules, Week Retptr Return Values (Output) Return Value: Return 0, if the input specified date does not meet the loop law, return 0, if input The specified date is from the start date in several subsidal months after the date of the week, return 1 -------------------------- ------------ Name: FindType5 prototype: int FindType5 (Char * Startptr, Char * StartDate, Char * Enddate, int year, char * RETPTR) Description: This program meets the loop law: each In the month, the date of the start date and interval in the day, whether the specified date of the inspection input is the date of the day after a certain period of time since the start date. StartPTR Start Date Character STARTDATE Range The start time Enddate range End Time Year Cycle Rules, Retptr Return Value (Output) Return Value Every year: Returns 0, if the input specified date does not meet the loop law, return 0, if the input specified date is from start The date will return to the date of the day after several intervals, return 1 ----------------------------------- --- Name: FindType6 prototype: int findType6 (Char * Startptr, Char * StartDate, Char * Enddate, int year, int weekday, char * RETPTR) Description: This program meets the loop law: starting the day on the day of the day The date and interval number and the week week week, the specified date of the verification input is a period of several times the week after several intervals from the start date. StartPTR Start Date Character StartDate Range The start time Enddate range end time Year cycle rules, weekday cycle regular, weekly RetPtr Return value (output) Return value: Return 0, if the input specified date does not meet the loop law, return 0, if input The specified date is from the start date after several interval days after the date of the week, the date is specified for a week, returns 1. -------------------------------------------- Name: MONTHTYPE1 prototype: INT MONTHTYPE1 (Char * Startptr, int DAY, CHAR * RETPTR) Description: This program satisfies the loop law: Enter the start date and interval number every few days, whether the specified date of the verification input is from the start date Date after a number of intervals. StartPTR Start Date String Pointer CCYYMMDD Theptr Specify Date String Pointer CCYMMDD DAY Space The number Retptr contains the requirements Specify the date string pointer (output) Return value: Return 0, if the input specified date does not meet the loop law, return 0, if the specified date is input The length of the string containing these months is returned from the date after the number of days after the start date. ------------------------------------------ Name: MONTHTYPE2 prototype: int MONTHTYPE2 ( Char * Startptr, CHAR * WEEKDAY, CHAR * RETPTR) Description: This program meets the loop rules: every week *** input start date and interval number and week, inspection input The specified date is the date of the week after several intervals from the start date. StartPTR Start Date String Pointer CCYYMMDD THEPTR Specify Date String Pointer CCYMMDD Week Interval Week Date Specified Week Retptr Contains Message Specified Date String Pointer (Output) Return Value: If the specified date of the input does not meet the loop law Return 0 If the input specified date is the date of the day of the day, the date of the day date is returned after the date of the start date is specified after several interval weeks. ---------------------------------------------- Name: MONTHTYPE3 prototype : Int MONTHTYPE3 (Char * Startptr, int MONTH, CHAR * RETPTR) Description: This program satisfies the loop law: Enter the start date and interval number of starts every few months, whether the specified date of the verification input is starting The date starts on the date after several intervals. StartPTR Start Date String Pointer Ccymmdd Theptr Specify Date String Pointer CCYMMMDD MONTH Interval Retptr Contains Date String Pointer (Output) Return Value: If the specified date of the input does not meet the loop law, return 0, if the specified specified The date is the length of the string containing the requirements that meet the requirements of the month from the start date after several intervals. ---------------------------------------- Name: MONTHTYPE4 prototype: int MONTHTYPE4 (Char * StartPtr, CHAR * THEPTR, INT MONTH, INT WeekDay, Char * Retptr Whether the date is from the start date in several intervals after the number of days after the number of times a week. StartPTR Start Date String Pointer CCYYMMDD THEPTR Specify Date String Pointer CCYMMDD MONTH Space Month Week Date Specified Week Retptr Contains Date String Pointer (Output) Return Value: If the input specified date does not meet the loop law Returns 0, if the input specified date is the date of the weekly date of the month after several intervals, the desired date is returned from the date of the number of each interval, and the previous month. ------------------------------------------ Name: MONTHTYPE5 prototype: int MONTHTYPE5 (char * startptr, int year, char * reteptr) Description: This program meets the loop law: the number of start date and interval in the day of the day, whether the specified date of the inspection input is from the start date Several date of the day after the number of days. StartPTR Start Date String Pointer CCYYMMDD THEPTR Specify Date String Pointer CCYYMMDD YEAR Interval Number Retptr Contains String (Output) Return Value: If the input specified date does not meet the loop law, return 0, if the specified date is input It returns a string length that contains the date of the month after the date of the month after the start date of the month. -------------------------------------------- Name: MONTHTYPE6 prototype: MONTHTYPE6 (Char * Startptr, CHAR * THEPTR, INT Year, INT WeekDay, Char * RETPTR) Description: This program meets the loop rules: Every year, the number of start date and interval and weekly, inspection The specified date of the input is a date that is a week after the month after the start date of several intervals. StartPTR Start Date String Pointer CCYYMMDD THEPTR Specify Date String Pointer CCYYMMDD MONTH Space Month Week Date Specified String Retptr When Week Week Retptr Contains String (Output) Return Value: If the specified date of the input is not compliant Regular returns 0, if the input specified date is from the start date in the month after the date of the number of interval, returns a string length containing the date that meets the requirements. ------------------------------------------ Name: weektype1 prototype: int weektype1 ( CHAR * STARTPTR, CHAR * THEPTR, INT DAY, CHAR * RETPTR) Description: This program meets the loop law: Enter the start date and interval number every few days, whether the specified date of the verification input is from the start date in several intervals The date after the number of days. StartPTR Start Date String Pointer CCYMMMDD Theptr Specify Date String Pointer CCYMMDD DAY Space The number Retptr Contains String Pointer (Output) Return Value: If the input specified date does not meet the loop law, return 0, if the specified specified The date is the length of the measured string containing these conformance requirements from the date after the number of days after the start date. -------------------------------------------- Name: weektype2 prototype: int WeekType2 (Char * Startptr, CHAR *, CHEEK, CHAR * WeekDay, Char * RETPTR) Description: This program meets the loop law: every week *** start date and interval number and week, inspection input The specified date is the date of the week after several intervals from the start date. StartPTR Start Date String Pointer CCYYMMDD THEPTR Specify Date String Pointer CCYYMMDD Week Interval Week Weekday Specified Week Retptr Contains String Pointer (Output) Return Value: If the specified date of the input is not compliant, return Return 0, if the input specified date is the date of the scheduled specified date string that specifies these periods of the week after the date of the week is specified from the start date in several intervals. -------------------------------------------- Name: weektype3 prototype: int WeekType3 (Char * Startptr, int MONTH, CHAR * RETPTR) Description: This program satisfies the loop law: Enter the start date and interval month of the day, whether the specified date of the verification input is from the start date The date after several intervals. STARTPTR Start Date String Pointer CCYYMMDD Theptr Specify Date String Pointer CCYMMMDD MONTH Space Month Retptr Contains String Pointer (Output) Return Value: If the input specified date does not meet the loop law, return 0, if input The specified date is the length of the string that contains the surrounding date from the start date after several intervals. -------------------------------------------- Name: WeekType4 prototype: Int weektype4 (Char * StartPtr, CHAR * THEPTR, INT MONTH, INTWEEKDAY, CHAR * RETPTR) Description: This program meets the loop law: a few-week input start date and the number of interval numbers in a few months The specified date of the inspection input is a date with the week after several intervals after several intervals. StartPTR Start Date String Pointer CCYYMMDD THEPTR Specify Date String Pointer Ccymmdd Month Interval Monthly Weekday Specified String Retptr Contains String Pointer (Output) Return Value: If the specified date of the input is not compliant Regular returns 0, if the input specified date is the date of the weekly date of the measurement, the date of the measurement of the requirements is returned from the date of the period after several intervals, from the start date. ------------------------------------------ Name: Weektype5 prototype: int Weektype5 (char * startptr, int year, char * reteptr) Description: This program meets the loop law: the number of start date and interval in the day of the day, whether the specified date of the inspection input is from the start date Several date of the day after the number of days. StartPTR Start Date String Pointer CCYYMMDD Theptr Specify Date String Pointer CCYMMDD YEAR Interval Number Retptr Contains String Pointer (Output) Return Value: If the input specified date does not meet the loop law, return 0, if the specified specified The date is a string length that contains the requirements that meet the requirements of the week from the date of the month after the date of the start date. -------------------------------------------- Name: weektype6 prototype: int WeekType6 (Char * Startptr, CHAR * THEPTR, INT Year, INT WeekDay, Char * Retptr) Description: This program satisfies the loop law: every few years of the start date and interval number and weekly, inspection The specified date of the input is a date that is a week after the month after the start date of several intervals. StartPTR Start Date String Pointer CCYYMMDD THEPTR Specified Date String Pointer Ccymmdd Month Interval Monthly Weekday Specified String Retptr Contains String Pointer Return Value: If the input specified date does not meet the cycle law Returns 0, if the input specified date is from the start date, the date of the week, the date of the week, which is required to meet the requirements of the week, is returned. -------------------------------------- Name: get_dayofweek prototype: int GET_DAYOFWEEK (Char * PTR) Description: If the input string is empty, return the system time on the day of the day, otherwise it will return the date of the input date. PTR-shaped CCYYMMDD format string or null - Current time return value: Return to the day ----------------------------------------------------------------------------------------------------------------------------- --------------- Name: getMonth prototype: void getMonth Description: Calculates a new date after a certain day is added. StartPTR-shaped Ccymmdd Format string Month Month Retptr New Date (Output) Return Value: None ----------------------------- ---------- Name: DUMP_D Prototype: Void Dump_D (Char * Ptr) Description: Use characters in the string to display the string of the string of the string of the PTR in Monthtypepub.c ----- ------------------------------------------ Name: Ifweekinptr Prototype: ifWeekinPtr (INT K , Char * PTR) Description: Check that the specified character in the string is verified. K Entered Characters (1-7) PTR Enter string Return Value: Returns 1 if the specified character in the string is specified, otherwise it returns 0. -------------------------------------- Name: getmon prototype: int GETMON (Char * theptr) Description: Returns the number of days of the week on the week to the week to January 1, 1800. The specified date string of theptr input returns: Returns the number of days on the week on the week and the number of days in January 1, 1800. ---------------------------------------- Name: getccymmddfromDays prototype: void getccymmdddfromDays (int days Description: According to the number of days and the number of days in January 1, 1800, the character string DAYS for Ccymmmdd and the number of days Retptrs obtained by the difference in January 1, 1 January 1, the character of ccymmdd characters. String (output) return value: no ---------------------------------------- Name: set_ymd Prototype: int set_ymd (int year, int mon, int day) Description: Set the date of the system time. Year of Year Setting Mon Setting Month Day Settings Day Return Value: If the success setting is set, return 0 ------------------------- -------------- Name: SET_HMS prototype: int set_hms (int Hour, int min, int sec) Description: Sets the minute-time second HOUR setting for the hour min set by minute Second return value set by sec: If successful settings return 0 --------------------------------- --- ×××××××××××××××××××××× × × infrared transmission and reception × × ×××××××××××××××× ××××××××××× -------------------------------------- Description: You can send a file or receive a file, you can The file type sent and received is as follows: 1) .vcf file complies with the business card file of the VCARD protocol 2) .gnp file memo file 3) .vcs file stroke file and stand items 4) .PRG file executable file 5) .wzp file Exchange Rate Document 6) .EBK file reading file Send a file method to save the information you want to send as a file, such as /TMP/WL.VCF, then execute SwitchTo ("/ MWIN / BIN / IRDA_AP", "/ TMP / WL. VCF "); that is, note: /TMP/WL.vcf will finally be deleted by IrDa_ap. The method of receiving the file can be pressed, if the reception is successful, the corresponding application is evoked according to the received file type, and the full path name of the received file is transmitted to the application as the first parameter. -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------