🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.vdbase.forms
Article #102

Re: jim's cbDrop.CC

#102
From: Jens Korth
Date: Sat, 13 Mar 1999 00:00
53 lines
1742 bytes
Dear Romain,

this is the code which does not work under WinNT:

* cbDrop.CC
* By Jim Sare - jimsare@worldnet.att.net
* Created: 09/10/1997
* Last Modified: 06/06/1998
*
* Fixes a problem with VdB 5.6 and 7.x ComboBox.AutoDrop when
* clicking on the pull-down button when the ComboBox does not
* have focus, the drop-down list drops, and then immediately
* pulls back up the first time clicked.
*

CLASS cbDrop(f) Of ComboBox(f) Custom

 If Type("PostMessage") # "FP"
   extern CLONG PostMessage(CHANDLE, CINT, CLONG, CLONG) User32;
      From "PostMessageA"
 EndIf
 If Type("SendMessage") # "FP"
   extern CLONG SendMessage(CHANDLE, CINT, CLONG, CLONG) User32;
      From "SendMessageA"
 EndIf
  #ifndef WM_USER
   #define WM_USER  HToI("400")
  #endif
  #ifndef CB_SHOWDROPDOWN
   #define CB_SHOWDROPDOWN WM_USER + 15
  #endif
  #ifndef WM_CANCELMODE
   #define WM_CANCELMODE HToI("1F")
  #endif

 this.AutoDrop =  .t.

 PROCEDURE OnGotFocus
  If this.AutoDrop
   SendMessage(this.hWND, WM_CANCELMODE, 0, 0)
   this.Drop()
  EndIf

 PROCEDURE Drop
  PostMessage(this.hWND, CB_SHOWDROPDOWN, 1, 0)

ENDCLASS  && cbDrop Of ComboBox

* EOF: cbDrop.CC


--
Jens
Technical Details
Message-ID: <7ce3ms$ptf18@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7cc1se$ohl8@forums.borland.com> <MPG.11540dbffe2846b498a05e@forums.inprise.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 15bdfb,86f124643230d007
X-Google-Attributes: gid15bdfb,public
From: "Jens Korth" <XJens.KorthX@wanadoo.fr>
Subject: Re: jim's  cbDrop.CC
Date: 1999/03/13
Message-ID: <7ce3ms$ptf18@forums.borland.com>
X-Deja-AN: 454572696
References: <7cc1se$ohl8@forums.borland.com> <MPG.11540dbffe2846b498a05e@forums.inprise.com>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.vdbase.forms