Windows API Guide: Reference: Structures


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 CB_GETDROPPEDSTATE message to a combo box determines if its list box portion is currently visible. In most combo boxes, the list box can be either dropped down or hidden. This message only works if the combo box has that capability.

Return Value

If the message returns 0, the list box portion is currently hidden. If the message returns a non-zero value, the list box is visible.

Visual Basic-Specific Issues

None.

Parameters

wParam
Not used -- set to 0.
lParam
Not used -- set to 0.

Constant Definitions

Const CB_GETDROPPEDSTATE = &H157

Example

' This code is licensed according to the terms and conditions listed here. ' Declarations and such needed for the example: ' (Copy them to the (declarations) section of a module.) Public Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hWnd _ As Long, ByVal Msg As Long, wParam As Any, lParam As Any) As Long Public Const CB_GETDROPPEDSTATE = &H157 ' Determine if the list box of combo box control Combo1 is currently ' in its dropped down, visible state. Dim isdropped As Long  ' is it dropped down or not? isdropped = SendMessage(Combo1.hWnd, CB_GETDROPPEDSTATE, ByVal CLng(0), ByVal CLng(0)) Select Case isdropped Case 0 Debug.Print "The list box portion is not visible." Case Else Debug.Print "The list box portion is visible." End Select

See Also

CB_SHOWDROPDOWN

Category

Combo Boxes

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


Last Modified: April 16, 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/c/cb_getdroppedstate.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