45 lines
1.8 KiB
Markdown
45 lines
1.8 KiB
Markdown
|
# APIGID32.BAS Documentation
|
||
|
=====================================
|
||
|
|
||
|
### Overview
|
||
|
|
||
|
This is a Visual Basic (VB) module named `APIGID32.BAS` that provides a set of functions and declarations for working with the Windows API.
|
||
|
|
||
|
### Declarations
|
||
|
|
||
|
* `Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long`
|
||
|
* `Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long`
|
||
|
* `Public Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long`
|
||
|
* `Public Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long`
|
||
|
|
||
|
### Functions
|
||
|
|
||
|
* `GetWindowLong`: Retrieves the value of a specified 32-bit integer property from the window.
|
||
|
* `SetWindowLong`: Sets the value of a specified 32-bit integer property for the window.
|
||
|
* `GetWindowText`: Retrieves the title bar text of the specified window.
|
||
|
* `SetWindowText`: Sets the title bar text of the specified window.
|
||
|
|
||
|
### Constants
|
||
|
|
||
|
* `GWL_STYLE`: Retrieves the window style.
|
||
|
* `GWL_EXSTYLE`: Retrieves the extended window style.
|
||
|
* `GWLP_HWNDPARENT`: Retrieves the handle to the parent window.
|
||
|
* `GWLP_ID`: Retrieves the identifier of the window.
|
||
|
|
||
|
### Notes
|
||
|
|
||
|
This module is intended for use in a VB application that requires interaction with the Windows API. The functions and declarations provided in this module can be used to manipulate window properties and retrieve information about windows.
|
||
|
|
||
|
### Example Usage
|
||
|
|
||
|
```vb
|
||
|
Dim hwnd As Long
|
||
|
Dim style As Long
|
||
|
|
||
|
hwnd = GetWindowLong(Me.hwnd, GWL_STYLE)
|
||
|
style = hwnd And &HFFFF0000
|
||
|
If style = &H10000000 Then
|
||
|
' Window is minimized
|
||
|
Else
|
||
|
' Window is not minimized
|
||
|
End If
|