Windows API Guide: ExitWindowsDialog Function


Declare Function GetClassInfo Lib "user32.dll" Alias "GetClassInfoA" (ByVal hInstance As Long, ByVal lpClassName As String, lpWndClass As WNDCLASS) As Long

Platforms

  • Windows 95: Supported but Obsolete; use GetClassInfoEx instead.
  • Windows 98: Supported but Obsolete; use GetClassInfoEx instead.
  • Windows NT: Requires Windows NT 3.1 or later but Obsolete in Windows NT 3.5 or later; use GetClassInfoEx instead.
  • Windows 2000: Supported but Obsolete; use GetClassInfoEx instead.
  • Windows CE: Requires Windows CE 1.0 or later.

Description & Usage

GetClassInfo retrieves most of the information associated with a window class. The information is placed into the structure passed as lpWndClass.

Return Value

If an error occured, the function returns 0 (use GetLastError to get the error code). If successful, the function returns a non-zero value.

Visual Basic-Specific Issues

None.

Parameters

hInstance
A handle to the instance which owns the window class, or 0 if the window class is defined by the operating system.
lpClassName
The name of the window class to retrieve information about.
lpWndClass
Receives the information about the window class.

Example

' This code is licensed according to the terms and conditions listed here. ' Draw the icon and cursor from the window class to which window ' Form1 belongs.  The two images are drawn on Form1. Dim classinfo As WNDCLASS  ' receives the class information Dim classname As String  ' receives the name of the window class Dim slength As Long  ' the length of the window class's name Dim retval As Long  ' return value ' First, get the name of the window class to which Form1 belongs. classname = Space(255)  ' make enough room in the buffer slength = GetClassName(Form1.hWnd, classname, 255)  ' get the name classname = Left(classname, slength)  ' remove the empty space ' Get the information about the window class.  Since this is a Visual Basic- ' generated window, its window class belongs to the application. retval = GetClassInfo(App.hInstance, classname, classinfo) ' Now draw the window class's icon and cursor on window Form1. ' Draw the icon. retval = DrawIconEx(Form1.hDC, 0, 0, classinfo.hIcon, 0, 0, 0, 0, DI_NORMAL) ' Draw the cursor.  If it's animated, draw only the first frame of it. retval = DrawIconEx(Form1.hDC, 50, 0, classinfo.hCursor, 0, 0, 0, 0, DI_NORMAL)

See Also

GetClassInfoEx, GetClassLong

Category

Window Classes

Go back to the alphabetical Function listing.
Go back to the Reference section index.


Last Modified: August 21, 1999
This page is copyright © 1999 Paul Kuliniewicz. Copyright Information Revised October 29, 2000
Go back to the Windows API Guide home page.
E-mail: vbapi@vbapi.com Send Encrypted E-Mail
This page is at http://www.vbapi.com/ref/g/getclassinfo.html



Windows API Guide
Windows API Guide - Reference - Volume 1: Version 3.0 For the MS-DOS and PC-DOS Operating Systems
ISBN: B001V0KQIY
EAN: N/A
Year: 1998
Pages: 610

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net