Windows API Guide: UnregisterClass Function


Platforms

  • Windows 95: Supported.
  • Windows 98: Supported.
  • Windows NT: Requires Windows NT 3.1 or later.
  • Windows 2000: Supported.
  • Windows CE: Requires Windows CE 1.0 or later.

Description & Usage

Sending the WM_SETTEXT message to a window sets that window's text. For ordinary windows, the text is the text that appears in the title bar. The message is handled by the target window's default window procedure.

Return Value

If the message returns 0, an error occured. If the message returns a non-zero value, the window text was successfully set.

Visual Basic-Specific Issues

When sending the WM_SETTEXT message, the expression ByVal CLng(0) must be used for the wParam parameter. Additionally, the ByVal keyword must also preceed the string passed as the lParam parameter.

Parameters

wParam
Not used -- set to 0.
lParam
The string to set as the window text.

Constant Definitions

Const WM_SETTEXT = &HC

Example

' This code is licensed according to the terms and conditions listed here. ' Set the title bar text of window Form1 to "Caption Area". ' Do this by sending the proper message to a window. Dim wintext As String  ' string to set as the window's text Dim retval As Long  ' return value of message ' Store the desired text in a string. wintext = "Caption Area" ' Send a message telling window Form1 to make that string its text. retval = SendMessage(Form1.hWnd, WM_SETTEXT, ByVal CLng(0), ByVal wintext) ' Display the result of the message. If retval = 0 Then   Debug.Print "Unable to set the text of Form1." Else   Debug.Print "The text of Form1 was successfully set." End If

See Also

SetWindowText, WM_GETTEXT

Category

Windows

Back to the Message list.
Back to the Reference section.


Last Modified: January 25, 2000
This page is copyright © 2000 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/w/wm_settext.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