Windows APIWindows API Function Calls in RapidQ2.INC Windows

These functions are included in the RapidQ2.inc file for extension of the language using Windows API function calls. For documentation on
these functions visit www.msdn.microsoft.com

AlphaBlend (hdc1 As Long, X1 As integer, Y1 As integer, Width1 As integer, Height1 As integer, hdc2 As Long, X2 As integer, Y2 As integer, Width2 As integer, Height2 As integer, BLEND As BLENDFUNCTION) As Long

AnyPopup () As Long

BFMoveMemory (byref Destination AS LONG, byref Source AS BLENDFUNCTION, Length AS LONG)

BitBlt ( ByVal hdcDest As Long, ByVal nXDest As Long, ByVal nYDest As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hdcSrc As Long, ByVal nXSrc As Long, ByVal nYSrc As Long, ByVal dwRop As Long) AS LONG

BringWindowToTop (ByVal hwnd As Long) As Long

CallWindowProc (lpPrevWndFunc As Long, hwnd As Long, Msg As Long, wParam As Long, lParam As Long) As Long

ChangeDisplaySettings (DevMo AS DevMode, ByVal dwFlags AS LONG) AS LONG

ChooseColorDlg (CC AS CHOOSECOLOR) AS LONG

ClearCommError (hFile AS LONG,_ '[IN] Handle to open Comm device

ClientToScreen (hwnd AS LONG, lpPoint AS LONG)

CloseHandle (hObject AS LONG) AS LONG 'If function succeeds, returns non-zero. If function fails, returns 0.

CommDlgExtendedError () As Long

CreateCompatibleBitmap (hdc As Long,nWidth As Long,nHeight As Long) As Long

CreateCompatibleDC (hdc As Long) As Long

CreateDC ( ByVal lpDriverName As String, ByVal lpDeviceName As String, ByVal lpOutput As String, lpInitData As DEVMODE) AS LONG

CreateFile (lpFileName AS STRING, dwDesiredAccess AS DWORD, dwShareMode AS DWORD, lpSecurityAttributes AS SECURITYATTRIBUTES, dwCreationDisposition AS DWORD, dwFlagsAndAttributes AS DWORD,_ '[IN] Specifies the file attributes and flags

CreatePen (nPenStyle As Long, nWidth As Long, crColor As Long) As Long

CreateSolidBrush (crColor As Long) As Long

CreateWindowEx (dwExStyle AS LONG, lpClassName AS STRING, lpWindowName AS STRING, dwStyle AS LONG, x AS LONG,y AS LONG, nWidth AS LONG, nHeight AS LONG, hWndParent AS LONG, hMenu AS LONG, hInstance AS LONG, lpParam AS LONG) AS LONG

DefMDIChildProc (hWnd AS LONG,uMsg AS LONG,wParam AS LONG,lParam AS LONG) AS LONG

DefWindowProc (hwnd AS LONG, msg as long, wparam as long, lparam as long) AS LONG

DeleteDC (hdc As Long) As Long

DeleteObject (hObject As Long) As Long

DragAcceptFiles (hWnd AS LONG, Accept AS LONG)

DragFinish (hDrop AS LONG)

DragQueryFile (hDrop AS LONG,iFile AS LONG,lpszFile AS LONG,cch AS LONG) AS LONG

DragQueryPoint (hDrop AS LONG, lppt AS POINTAPI) AS LONG

DrawCaption (hwnd AS LONG, hdc AS LONG, qrc AS QRECT, uFlags AS LONG) AS LONG

DrawEdge (hdc AS LONG, qrc AS QRECT, edge AS LONG, grfFlags AS LONG) AS LONG

DrawFrameControl (hdc AS LONG, qrc AS QRECT, utype AS LONG, ustate AS LONG) AS LONG

DrawIconEx (hdc As Long,xLeft As Long,yTop As Long,hIcon As Long,cxWidth As Long,cyWidth As Long,istepIfAniCur As Long,hbrFlickerFreeDraw As Long,diFlags As Long) As Long

Ellipse (hdc As Long,X1 As Long,Y1 As Long,X2 As Long,Y2 As Long) As Long

EnableWindow (ByVal hwnd AS LONG, ByVal fEnable AS LONG) AS LONG

EnumChildWindows (hWndParent AS LONG,lpEnumFunc AS LONG,lParam AS LONG) AS LONG

EnumDisplaySettings (byref DeviceName AS STRING, byval iModeNum AS DWORD, byref DevMo AS DevMode) AS LONG

ExitWindowsEx (ByVal uFlags AS LONG, ByVal dwReserved AS LONG) AS LONG

ExtFloodFill (hdc As Long,x As Long,y As Long,crColor As Long,wFillType As Long) As Long

FormatMessage (dwFlags AS DWORD, lpSource AS LONG, dwMessageId AS DWORD, dwLanguageId AS DWORD, BYREF lpBuffer AS STRING, nSize AS DWORD, lpArguments AS LONG) AS LONG ''If function succeeds, returns non-zero. If function fails, returns 0.

GetCapture () AS LONG

GetClassName (hwnd AS LONG,ByRef lpClassName AS STRING,nMaxCount AS LONG) AS LONG

GetClientRect (ByVal hwnd As Long, lpRect As RECT) As Long

GetCommState (hFile AS LONG, lpDCB AS DCB) AS LONG 'If function succeeds, returns non-zero. If function fails, returns 0.

GetCurrentObject (hdc As Long,uObjectType As Long) As Long

GetCurrentProcess () As Long

GetDC (ByVal hwnd AS LONG) AS LONG

GetDesktopWindow () AS LONG

GetDeviceCaps (ByVal hdc AS LONG, ByVal nIndex AS LONG) AS LONG

GetDriveType (nDrive As String) As Long

GetFocus () AS LONG

GetKeyState (ByVal nVirtKey As Long) As Integer

GetLastError () AS DWORD 'Returns last error code value

GetObject (hObject As Long,nCount As Long, lpObject AS TBITMAP) As Long

GetOpenFileName (pOpenfilename AS OPENFILENAME) AS LONG

GetParent (hwnd As Long) As Long

GetPixel (hdc as Long,x as Long,y as Long) as Long

GetPriorityClass (ByVal hProcess As Long) As Long

GetProp (ByVal hwnd As Long, ByVal lpString As String) As Long

GetSaveFileName (pOpenfilename AS OPENFILENAME) AS LONG

GetStockObject (nIndex As Long) As Long

GetSysColor (nIndex As Long) As Long

GetSystemMetrics (ByVal nIndex As Long) As Long

GetSystemPowerStatus (lpSystemPowerStatus As SYSTEM_POWER_STATUS) As Long

GetVersionEx (lpVersionInformation As OSVERSIONINFO) As Long

GetWindowLong (hwnd AS LONG, type AS LONG) AS LONG

GetWindowRect (ByVal hwnd As Long, lpRect As QRECT) As Long

GetWindowText (ByVal hwnd As Long, ByVal lpString As Long, ByVal cch As Long) As Long

GetWindowTextLength (ByVal hwnd As Long) As Long

IsIconic (ByVal hwnd As Long) As Long

IsWindowVisible (ByVal hwnd As Long) As Long

IsZoomed (ByVal hwnd As Long) As Long

LineTo (hdc As Long,x As Long,y As Long) As Long

LoadImage (hInst AS LONG,lpsz AS STRING, dwImageType AS LONG,dwDesiredWidth AS LONG, dwDesiredHeight AS LONG,dwFlags AS LONG) AS LONG

MDI_CreateWindow (dwExStyle AS LONG,lpClassName AS STRING,lpWindowName AS STRING,dwStyle AS LONG,x AS LONG,y AS LONG,nWidth AS LONG,nHeight AS LONG,hWndParent AS LONG,hMenu AS LONG,hInstance AS LONG,lpParam AS LONG) AS LONG

MDI_DefChildProc (hWnd AS LONG,uMsg AS LONG,wParam AS LONG,lParam AS LONG) AS LONG

MDI_EnumChild (hWndParent AS LONG,lpEnumFunc AS LONG,lParam AS LONG) AS LONG

MDI_GetClassName (hwnd AS LONG,ByRef lpClassName AS STRING,nMaxCount AS LONG) AS LONG

MDI_GetClientRect (hwnd AS LONG,lpRect AS QRECT) AS LONG

MDI_GetParent (hwnd As Long) As Long

MDI_GetProp (hwnd AS LONG,lpString AS STRING) AS LONG

MDI_GetRect (hwnd AS LONG, lpRect AS QRECT) AS LONG

MDI_GetText (hwnd AS LONG,ByRef lpString AS STRING,cch AS LONG) AS LONG

MDI_GetTextLenght (hwnd As Long) As Long

MDI_MoveWindow (hwnd AS LONG,x AS LONG,y AS LONG,nWidth AS LONG,nHeight AS LONG,bRepaint AS LONG) AS LONG

MDI_RegisterClass (pcWndClassEx AS MDI_CLASS) AS LONG

MDI_SendMessage (hwnd As Long, wMsg As Long, wParam As Long, lParam As Long) As Long

MDI_SetClassLong (hwnd As Long,nIndex As Long,dwNewLong As Long) As Long

MDI_SetFocus (hwnd AS LONG) AS LONG

MDI_SetLong (hwnd AS LONG,nIndex AS LONG,dwNewLong AS LONG) AS LONG

MDI_SetParent (hWndChild As Long,hWndNewParent As Long) As Long

MDI_SetProp (hwnd AS LONG,lpString AS STRING,hData AS LONG) AS LONG

MDI_SetText (hWnd AS LONG,lpString AS STRING) AS LONG

MDI_ShowWindow (hwnd As Long,nCmdShow As Long) As Long

MDI_isIconic (hwnd As Long) As Long

MDI_isZoomed (hwnd As Long) As Long

ModifyMenu (hMenu AS LONG,uPosition AS LONG,uFlags AS LONG,uIDNewItem AS LONG,lpNewItem AS LONG) AS LONG

mouse_event (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)

MoveToEx (hdc As Long,x As Long,y As Long, lpPoint As long) As Long

MoveWindow (hwnd AS LONG,x AS LONG,y AS LONG,nWidth AS LONG,nHeight AS LONG,bRepaint AS LONG) AS LONG

PatBlt (hdc As Long,x As Long,y As Long,nWidth As Long,nHeight As Long,dwRop As Long) As Long

PurgeComm (hFile AS LONG, dwFlags AS DWORD) AS LONG 'If function succeeds, returns non-zero. If function fails, returns 0.

ReadFile (hFile AS LONG, BYREF lpBuffer AS STRING, nNumberOfBytesToRead AS DWORD, BYREF lpNumberOfBytesRead AS DWORD, lpOverlapped AS OVERLAPPED) AS LONG 'If function succeeds, returns non-zero. If function fails, returns 0.

ReadFileEx (BYVAL hFile AS LONG, BYREF lpBuffer AS STRING, BYVAL nNumberOfBytesToRead AS DWORD, lpOverlapped AS OVERLAPPED,_ '[IN] Pointer to structure containing info if Comm device/file was opened in Overlapped mode.

Rectangle (hdc As Long,X1 As Long,Y1 As Long,X2 As Long,Y2 As Long) As Long

RegisterClassEx (pcWndClassEx AS WNDCLASSEX) AS LONG

ReleaseCapture () AS LONG

ReleaseDC (ByVal hwnd AS LONG, ByVal hdc AS LONG) AS LONG

RemoveProp (ByVal hwnd As Long, ByVal lpString As String) As Long

RoundRect (hdc As Long,X1 As Long,Y1 As Long,X2 As Long,Y2 As Long,X3 As Long,Y3 As Long) As Long

RtlMoveMemory (byref Destination AS LONG, byref Source AS LONG, Length AS LONG)

SLEEP (dwMilliseconds AS DWORD)

SelectObject (hdc As Long,hObject As Long) As Long

SendMessageAPI (hwnd As Long, wMsg As Long, wParam As Long, lParam As Long) As Long

SetActiveWindow (hWnd as integer) as integer

SetBkMode (hdc As Long,nBkMode As Long) As Long

SetCapture (hwnd AS LONG) AS LONG

SetClassLong (hwnd As Long,nIndex As Long,dwNewLong As Long) As Long

SetCommState (hFile AS LONG, lpDCB AS DCB) AS LONG 'If function succeeds, returns non-zero. If function fails, returns 0.

SetCommTimeouts (hFile AS LONG,_ '[IN] Handle to open Comm device

SetCursorPos (ByVal x As Long, ByVal y As Long) As Long

SetFocus (hwnd AS LONG) AS LONG

SetForegroundWindow (ByVal hwnd As Long) As Long

SetParent (hWndChild As Long,hWndNewParent As Long) As Long

SetPriorityClass (ByVal hProcess As Long, ByVal dwPriorityClass As Long) As Long

SetProp (ByVal hwnd As Long, ByVal lpString As String, ByVal hData As Long) As Long

SetROP2 (hdc As Long,nDrawMode As long) As Long

SetSuspendState (ByVal Hibernate As Long, ByVal ForceCritical As Long, ByVal DisableWakeEvent As Long) As Long

SetSystemPowerState (ByVal fSuspend As Long, ByVal fForce As Long) As Long

SetWindowLong (hWnd AS LONG,nIndex AS LONG, dwNewLong AS LONG) AS LONG

SetWindowPos (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long)

SetWindowText (ByVal hwnd As Long, ByVal lpString As String) As Long

SetupComm (hFile AS LONG,_ '[IN] Handle to open Comm device

ShellExecute (ByVal hwnd AS LONG, ByVal lpOperation AS STRING, ByVal lpFile AS STRING, ByVal lpParameters AS STRING, ByVal lpDirectory AS STRING, ByVal nShowCmd AS LONG) AS LONG

Shell_NotifyIcon (ByVal dwMessage As Long, lpData As QNOTIFYICONDATA) As Long

ShowWindow (hwnd As Long,nCmdShow As Long) As Long

StretchBlt (hdc As Long,x As Long,y As Long,nWidth As Long,nHeight As Long,hSrcDC As Long,xSrc As Long,ySrc As Long,nSrcWidth As Long,nSrcHeight As Long,dwRop As Long) As Long

SystemParametersInfo (uAction as Long,uParam as Long,lpvParam as Long,fuWinIni as Long) as Long

WriteFile (hFile AS LONG, lpBuffer AS STRING, nNumberOfBytesToWrite AS DWORD, BYREF lpNumberOfBytesWritten AS DWORD, lpOverlapped AS OVERLAPPED) AS LONG 'If function succeeds, returns non-zero. If function fails, returns 0.