mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-28 16:17:09 +08:00
327 lines
16 KiB
Plaintext
327 lines
16 KiB
Plaintext
.\" This manpage is Copyright (C) 2000 Wei Yongming
|
|
.\" 2000 BluePoint Software
|
|
.\"
|
|
.\" Permission is granted to make and distribute verbatim copies of this
|
|
.\" manual provided the copyright notice and this permission notice are
|
|
.\" preserved on all copies.
|
|
.\"
|
|
.\" Permission is granted to copy and distribute modified versions of this
|
|
.\" manual under the conditions for verbatim copying, provided that the
|
|
.\" entire resulting derived work is distributed under the terms of a
|
|
.\" permission notice identical to this one.
|
|
.\"
|
|
.\" Since MiniGUI is constantly changing, this
|
|
.\" manual page may be incorrect or out-of-date. The author(s) assume no
|
|
.\" responsibility for errors or omissions, or for damages resulting from
|
|
.\" the use of the information contained herein. The author(s) may not
|
|
.\" have taken the same level of care in the production of this manual,
|
|
.\" which is licensed free of charge, as they might when working
|
|
.\" professionally.
|
|
.\"
|
|
.\" Formatted or processed versions of this manual, if unaccompanied by
|
|
.\" the source, must acknowledge the copyright and authors of this work.
|
|
.TH "MainWindow" "3" "August 2000" "MiniGUI"
|
|
|
|
.SH "NAME"
|
|
MainWindow \- function about main window in MiniGUI.
|
|
|
|
.SH "SYNOPSIS"
|
|
.B #include <minigui/gdi.h>
|
|
.PP
|
|
.BI "BOOL GUIAPI ExcludeWindowStyle" "(HWND hWnd, DWORD dwStyle);"
|
|
.br
|
|
.BI "BOOL GUIAPI IncludeWindowStyle" "(HWND hWnd, DWORD dwStyle);"
|
|
.br
|
|
.BI "HWND GUIAPI CreateMainWindow" "(PMAINWINCREATE pCreateStruct);"
|
|
.br
|
|
.BI "BOOL GUIAPI DestroyMainWindow" "(HWND hWnd);"
|
|
.br
|
|
.BI "int DefaultMainWinProc" "(HWND hWnd, int message, WPARAM wParam, LPARAM lParam);"
|
|
.br
|
|
.BI "int DefaultControlProc" "(HWND hWnd, int message, WPARAM wParam, LPARAM lParam);"
|
|
.br
|
|
.BI "void GUIAPI UpdateWindow" "(HWND hWnd, BOOL bErase);"
|
|
.br
|
|
.BI "BOOL GUIAPI ShowWindow" "(HWND hWnd, int iCmdShow);"
|
|
.br
|
|
.BI "BOOL GUIAPI EnableWindow" "(HWND hWnd, int fEnable);"
|
|
.br
|
|
.BI "BOOL GUIAPI IsWindowEnabled" "(HWND hWnd);"
|
|
.br
|
|
.BI "BOOL GUIAPI GetClientRect" "(HWND hWnd, PRECT prc);"
|
|
.br
|
|
.BI "int GUIAPI GetWindowBkColor" "(HWND hWnd);"
|
|
.br
|
|
.BI "HCURSOR GUIAPI GetWindowCursor" "(HWND hWnd);"
|
|
.br
|
|
.BI "HCURSOR GUIAPI SetWindowCursor" "(HWND hWnd, HCURSOR hNewCursor);"
|
|
.br
|
|
.BI "DWORD GUIAPI GetWindowStyle" "(HWND hWnd);"
|
|
.br
|
|
.BI "DWORD GUIAPI GetWindowExStyle" "(HWND hWnd);"
|
|
.br
|
|
.BI "DWORD GUIAPI GetWindowAdditionalData" "(HWND hWnd);"
|
|
.br
|
|
.BI "DWORD GUIAPI SetWindowAdditionalData" "(HWND hWnd, DWORD newData);"
|
|
.br
|
|
.BI "DWORD GUIAPI GetWindowAdditionalData2" "(HWND hWnd);"
|
|
.br
|
|
.BI "DWORD GUIAPI SetWindowAdditionalData2" "(HWND hWnd, DWORD newData);"
|
|
.br
|
|
.BI "DWORD GUIAPI GetWindowClassAdditionalData" "(HWND hWnd);"
|
|
.br
|
|
.BI "DWORD GUIAPI SetWindowClassAdditionalData" "(HWND hWnd, DWORD newData);"
|
|
.br
|
|
.BI "char* GUIAPI GetWindowCaption" "(HWND hWnd);"
|
|
.br
|
|
.BI "BOOL GUIAPI SetWindowCaption" "(HWND hWnd, char* spCaption);"
|
|
.br
|
|
.BI "BOOL GUIAPI InvalidateRect" "(HWND hWnd, const RECT* prc, BOOL bEraseBkgnd);"
|
|
.br
|
|
.BI "HDC GUIAPI BeginPaint" "(HWND hWnd);"
|
|
.br
|
|
.BI "void GUIAPI EndPaint" "(HWND hWnd, HDC hdc);"
|
|
.br
|
|
.BI "int GUIAPI ClientWidthToWindowWidth" "(DWORD dwStyle, int cw);"
|
|
.br
|
|
.BI "int GUIAPI ClientHeightToWindowHeight" "(DWORD dwStyle, int ch, BOOL hasMenu);"
|
|
.br
|
|
.BI "void GUIAPI ClientToScreen" "(HWND hWnd, int* x, int* y);"
|
|
.br
|
|
.BI "void GUIAPI ScreenToClient" "(HWND hWnd, int* x, int* y);"
|
|
.br
|
|
.BI "void GUIAPI WindowToScreen" "(HWND hWnd, int* x, int* y);"
|
|
.br
|
|
.BI "void GUIAPI ScreenToWindow" "(HWND hWnd, int* x, int* y);"
|
|
.br
|
|
.BI "BOOL GUIAPI IsMainWindow" "(HWND hWnd);"
|
|
.br
|
|
.BI "BOOL GUIAPI IsControl" "(HWND hWnd);"
|
|
.br
|
|
.BI "BOOL GUIAPI IsWindow" "(HWND hWnd);"
|
|
.br
|
|
.BI "HWND GUIAPI GetParent" "(HWND hWnd);"
|
|
.br
|
|
.BI "BOOL GUIAPI IsWindowVisible" "(HWND hWnd);"
|
|
.br
|
|
.BI "BOOL GUIAPI GetWindowRect" "(HWND hWnd, PRECT prc);"
|
|
.br
|
|
.BI "HWND GUIAPI GetHosting" "(HWND hWnd);"
|
|
.br
|
|
.BI "HWND GUIAPI GetFirstHosted" "(HWND hWnd);"
|
|
.br
|
|
.BI "HWND GUIAPI GetNextHosted" "(HWND hHosting, HWND hHosted);"
|
|
.br
|
|
.BI "int GUIAPI GetWindowTextLength" "(HWND hWnd);"
|
|
.br
|
|
.BI "int GUIAPI GetWindowText" "(HWND hWnd, char* spString, int nMaxLen);"
|
|
.br
|
|
.BI "BOOL GUIAPI SetWindowText" "(HWND hWnd, char* spString);"
|
|
.br
|
|
.BI "HWND GUIAPI SetFocus" "(HWND hWnd);"
|
|
.br
|
|
.BI "HWND GUIAPI GetFocus" "(void);"
|
|
.br
|
|
.BI "HWND GUIAPI GetFocusChild" "(HWND hMainWnd);"
|
|
.br
|
|
.BI "HWND GUIAPI SetActiveWindow" "(HWND hMainWnd);"
|
|
.br
|
|
.BI "HWND GUIAPI GetActiveWindow" "(void);"
|
|
.br
|
|
.BI "HWND GUIAPI SetCapture" "(HWND hMainWnd);"
|
|
.br
|
|
.BI "HWND GUIAPI GetCapture" "(void);"
|
|
.br
|
|
.BI "void GUIAPI ReleaseCapture" "(void);"
|
|
.br
|
|
.BI "BOOL GUIAPI MoveWindow" "(HWND hWnd, int x, int y, int w, int h, BOOL fPaint);"
|
|
.br
|
|
.BI "void GUIAPI ScrollWindow" "(HWND hWnd, int iOffx, int iOffy, const RECT* rc1, const RECT* rc2);"
|
|
.br
|
|
.BI "BOOL GUIAPI EnableScrollBar" "(HWND hWnd, int iSBar, BOOL bEnable);"
|
|
.br
|
|
.BI "BOOL GUIAPI GetScrollPos" "(HWND hWnd, int iSBar, int* pPos);"
|
|
.br
|
|
.BI "BOOL GUIAPI GetScrollRange" "(HWND hWnd, int iSBar, int* pMinPos, int* pMaxPos);"
|
|
.br
|
|
.BI "BOOL GUIAPI SetScrollPos" "(HWND hWnd, int iSBar, int iNewPos);"
|
|
.br
|
|
.BI "BOOL GUIAPI SetScrollRange" "(HWND hWnd, int iSBar, int iMinPos, int iMaxPos);"
|
|
.br
|
|
.BI "BOOL GUIAPI ShowScrollBar" "(HWND hWnd, int iSBar, BOOL bShow);"
|
|
.br
|
|
.BI "BOOL GUIAPI SetScrollInfo" "(HWND, int, LPCSCROLLINFO, BOOL);"
|
|
.br
|
|
.BI "BOOL GUIAPI GetScrollInfo" "(HWND, int, LPSCROLLINFO);"
|
|
.br
|
|
.BI "HWND GUIAPI GetMainWindowHandle" "(HWND hWnd);"
|
|
.br
|
|
.BI "int GUIAPI CreateThreadForMainWindow" "(pthread_t* thread, pthread_attr_t* attr, void * (*start_routine)(void *), void * arg);"
|
|
.br
|
|
.BI "pthread_t GUIAPI GetMainWinThread" "(HWND hMainWnd);"
|
|
.br
|
|
.BI "void GUIAPI MainWindowThreadCleanup" "(HWND hMainWnd);"
|
|
.br
|
|
.BI "int GUIAPI WaitMainWindowClose" "(HWND hWnd, void** returnval);"
|
|
.br
|
|
.BI "BOOL GUIAPI LoadSystemBitmap" "(PBITMAP pBitmap, const char* szItemName);"
|
|
.br
|
|
.BI "HICON GUIAPI LoadSystemIcon" "(const char* szItemName, int which);"
|
|
|
|
.SH "DESCRIPTION"
|
|
.PP
|
|
\fBExcludeWindowStyle\fP function removes one window style indicate by parameter \fBdwStyle\fP style set.
|
|
.PP
|
|
\fBIncludeWindowStyle\fP function adds window style indicate by parameter \fBdwStyle\fP into style set.
|
|
.PP
|
|
\fBCreateMainWindow\fP function creates main window and initialize with parameter \fBpCreateStruct\fP.
|
|
.PP
|
|
\fBDestroyMainWindow\fP function destroys main window and release relative resource.
|
|
.PP
|
|
\fBDefaultMainWinProc\fP function handles window default message.
|
|
.PP
|
|
\fBDefaultControlProc\fP function handles control default messgae.
|
|
.PP
|
|
\fBUpdateWindow\fP function updates the client area of the specified window by sending a WM_PAINT message to the window.
|
|
.PP
|
|
\fBShowWindow\fP function sets the specified window's show state with one in (SW_SHOWNORMAL,SW_SHOW,SW_HIDE).
|
|
.PP
|
|
\fBEnableWindow\fP function enables or disables mouse and keyboard input to the specified window or control. When input is disabled, the window does not receive input such as mouse clicks and key presses. When input is enabled, the window receives all input.
|
|
.PP
|
|
\fBIsWindowEnabled\fP function determines whether the specified window is enabled for mouse and keyboard input.
|
|
.PP
|
|
\fBGetClientRect\fP function retrieves the coordinates of a window's client area. The client coordinates specify the upper-left and lower-right corners of the client area. Because client coordinates are relative to the upper-left corner of a window's client area, the coordinates of the upper-left corner are (0,0).
|
|
.PP
|
|
\fBGetWindowBkColor\fP function returns window current background color.
|
|
.PP
|
|
\fBGetWindowCursor\fP function gets current cursor of window or control aasociate with parameter \fBhWnd\fP.
|
|
.PP
|
|
\fBSetWindowCursor\fP function sets current cursor of window or control with parameter \fBhNewCursor\fP.
|
|
.PP
|
|
\fBGetWindowStyle\fP function gets style set of window or control aasociate with parameter \fBhWnd\fP.
|
|
.PP
|
|
\fBGetWindowExStyle\fP function gets expand style set of window or control aasociate with parameter \fBhWnd\fP..
|
|
.PP
|
|
\fBGetWindowAdditionalData\fP function returns additional data of window or control aasociate with parameter \fBhWnd\fP.
|
|
.PP
|
|
\fBSetWindowAdditionalData\fP function sets additional data of window or control and return old data.
|
|
.PP
|
|
\fBGetWindowAdditionalData2\fP function is same with \fBGetWindowAdditionalData\fP.
|
|
.PP
|
|
\fBSetWindowAdditionalData2\fP function is same with\fBSetWindowAdditionalData\fP.
|
|
.PP
|
|
\fBGetWindowClassAdditionalData\fP function gets additional data of control class.
|
|
.PP
|
|
\fBSetWindowClassAdditionalData\fP function sets additional data of control class and return old one.
|
|
.PP
|
|
\fBGetWindowCaption\fP function returns the text of the specified window's title bar.
|
|
.PP
|
|
\fBSetWindowCaption\fP function changes the text of the specified window's title bar with parameter \fBspCaption\fP.
|
|
.PP
|
|
\fBInvalidateRect\fP function adds a rectangle to the specified window's update region. The update region represents the portion of the window's client area that must be redrawn, and remain background if parameter bReaseBkgnd is set.
|
|
.PP
|
|
\fBBeginPaint\fP function prepares the specified window by parameter \fBhWnd\fP for painting.
|
|
.PP
|
|
\fBEndPaint\fP function marks the end of painting in the specified window. This function is required for each call to the BeginPaint function, but only after painting is complete.
|
|
.PP
|
|
\fBClientWidthToWindowWidth\fP function returns window width computed with client area width, window border and scroll width.
|
|
.PP
|
|
\fBClientHeightToWindowHeight\fP function returns window width computed with client area width, window border,window caption,window menu and scroll width.
|
|
.PP
|
|
\fBClientToScreen\fP function converts the client coordinates of a specified point to screen coordinates.
|
|
.PP
|
|
\fBScreenToClient\fP function converts the screen coordinates of a specified point on the screen to client coordinates.
|
|
.PP
|
|
\fBWindowToScreen\fP function converts the window coordinates of a specified point to screen coordinates.
|
|
.PP
|
|
\fBScreenToWindow\fP function converts the screen coordinates of a specified point on the screen to window coordinates.
|
|
.PP
|
|
\fBIsMainWindow\fP function tests if window associate with parameter \fBhWnd\fP is main window, return true if does.
|
|
.PP
|
|
\fBIsControl\fP function tests if window associate with parameter \fBhWnd\fP is control, return true if does.
|
|
.PP
|
|
\fBIsWindow\fP function determines whether the specified window handle identifies an existing window.
|
|
.PP
|
|
\fBGetParent\fP function retrieves a handle to the specified child window's parent window.
|
|
.PP
|
|
\fBIsWindowVisible\fP function retrieves the visibility state of the specified window.
|
|
.PP
|
|
\fBGetWindowRect\fP function retrieves the dimensions of the bounding rectangle of the specified window. The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.
|
|
.PP
|
|
\fBGetHosting\fP function gets current window's hosting windows, a window share message queue with its hosting window.
|
|
.PP
|
|
\fBGetFirstHosted\fP function gets current window's first hosted window, current window is hosting window of return window.
|
|
.PP
|
|
\fBGetNextHosted\fP function gets next hosted window of parameter \fBhHosted\fP, window indicated by \fBhHosted\fP is one hosted window of list.
|
|
.PP
|
|
\fBGetWindowTextLength\fP function retrieves the length, in characters, of the specified window's text. If the specified window is a control, the function retrieves the length of the text within the control.
|
|
.PP
|
|
\fBGetWindowText\fP function copies the text of the specified window's into a buffer. If the specified window is a control, the text of the control is copied.
|
|
.PP
|
|
\fBSetWindowText\fP function changes the text of the specified window's text. If the specified window is a control, the text of the control is changed with parameter \fBsPstring\fP.
|
|
.PP
|
|
\fBSetFocus\fP function sets the keyboard focus to the specified window. The window must be associated with the calling thread's message queue.
|
|
.PP
|
|
\fBGetFocus\fP function retrieves the handle to the window that has the keyboard focus, if the window is associated with the calling thread's message queue.
|
|
.PP
|
|
\fBGetFocusChild\fP function retrieves the handle to the window's active child that has the keyboard focus, if the window is associated with the calling thread's message queue.
|
|
.PP
|
|
\fBSetActiveWindow\fP function activates a window. The window must be associated with the calling thread's message queue.
|
|
.PP
|
|
\fBGetActiveWindow\fP function retrieves the window handle to the active window associated with the calling thread's message queue.
|
|
.PP
|
|
\fBSetCapture\fP function sets the mouse capture to the specified window belonging to the current thread. Once a window has captured the mouse, all mouse input is directed to that window, regardless of whether the cursor is within the borders of that window. Only one window at a time can capture the mouse.
|
|
If the mouse cursor is over a window created by another thread, the system will
|
|
direct mouse input to the specified window only if a mouse button is down.
|
|
.PP
|
|
\fBGetCapture\fP function retrieves the handle of the window (if any) that has captured the mouse. Only one window at a time can capture the mouse; this window receives mouse input whether or not the cursor is within its borders.
|
|
.PP
|
|
\fBReleaseCapture\fP function releases the mouse capture from a window in the current thread and restores normal mouse input processing. A window that has captured the mouse receives all mouse input, regardless of the position of the cursor, except when a mouse button is clicked while the cursor hot spot is in the window of another thread.
|
|
.PP
|
|
\fBMoveWindow\fP function changes the position and dimensions of the specified window. For a top-level window, the position and dimensions are relative to the upper-left corner of the screen. For a child window, they are relative to the upper-left corner of the parent window's client area.
|
|
.PP
|
|
\fBScrollWindow\fP function scrolls the content of the specified window's client area. The ScrollWindow function exists.
|
|
.PP
|
|
\fBEnableScrollBar\fP function enables or disables one or both scroll bar arrows.
|
|
.PP
|
|
\fBGetScrollPos\fP function retrieves the current position of the scroll box (thumb) in the specified scroll bar. The current position is a relative value that depends on the current scrolling range.
|
|
.PP
|
|
\fBGetScrollRange\fP function sets the position of the scroll box (thumb) in the specified scroll bar and, if requested, redraws the scroll bar to reflect the new position of the scroll box.
|
|
.PP
|
|
\fBSetScrollPos\fP function sets the position of the scroll box (thumb) in the specified scroll bar and, if requested, redraws the scroll bar to reflect the new position of the scroll box.
|
|
.PP
|
|
\fBSetScrollRange\fP function sets the minimum and maximum position values for the specified scroll bar.
|
|
.PP
|
|
\fBShowScrollBar\fP function shows or hides the specified scroll bar.
|
|
.PP
|
|
\fBSetScrollInfo\fP The SetScrollInfo function sets the parameters of a scroll bar, including the minimum and maximum scrolling positions, the page size, and the position of the scroll box (thumb). The function also redraws the scroll bar, if requested.
|
|
.PP
|
|
\fBGetScrollInfo\fP The GetScrollInfo function retrieves the parameters of a scroll bar, including the minimum and maximum scrolling positions, the page size, and the position of the scroll box (thumb).
|
|
.PP
|
|
\fBGetMainWindowHandle\fP function retrieves the handle of the control's main window if hWnd point to a control,otherwise it just return hWnd.
|
|
.PP
|
|
\fBCreateThreadForMainWindow\fP function creates a thread belong to the calling
|
|
process's main window.
|
|
.PP
|
|
\fBGetMainWinThread\fP function retrieves the main thread of the main window.
|
|
.PP
|
|
\fBMainWindowThreadCleanup\fP function clean up all the threads belong to the main window.
|
|
.PP
|
|
\fBWaitMainWindowClose\fP function waits untill the window's main thread exits.
|
|
.PP
|
|
\fBLoadSystemBitmap\fP function load in bitmaps provided by the system.Parameter 2 specify the name of the bitmap,and the loaded in bitmap is returned as a pointer in parameter 1.
|
|
.PP
|
|
\fBLoadSystemIcon\fP function load in icons provided by the system. Parameter 2 specify which icon to load in,and the loaded in icon is returned as a pointer in parameter 1.
|
|
.SH "RETURN VALUE"
|
|
.PP
|
|
|
|
.SH "NOTE"
|
|
.PP
|
|
|
|
.SH "SEE ALSO"
|
|
|
|
.SH "AUTHOR"
|
|
.PP
|
|
This manual page was edited by Kevin <kevin@minigui.org>.
|
|
If you have any problems, comments or found some bugs, please send messages to me.
|