Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Now what???/
Message
De
27/06/2000 14:44:48
 
 
À
27/06/2000 14:17:21
Tom Gahagan
Alliance Computer Solutions
Thomaston, Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00385272
Message ID:
00385299
Vues:
11
>In answer to my post about auto droping the calendar in the date time picker Paul M sent this code....
>
>#DEFINE WM_KEYDOWN 0x0100
>#DEFINE VK_F4 0x73
>
>hWnd = THISFORM.OleControl1.hWnd
>=SendMessage(hWnd, WM_KEYDOWN, VK_F4, 0)
>
>.... in main prg
>
>DECLARE INTEGER SendMessage IN WIN32API ;
> INTEGER hWnd, ;
> INTEGER Msg, ;
> INTEGER wParameter, ;
> INTEGER lParameter
>
>IT WORKS GREAT! The calendar pops up automaticaly just as I want.
>
>Except for one problem. Code that I had in the closeup event of the control now does not work at all.
>
>Do I need to reset or "unset" something? Thanks for any thoughts.

A keystroke is a combination of a WM_KEYDOWN, and a ....hmmmm.... WM_KEYUP message; Windows itself takes care of generating an intervening WM_CHAR message.

If the behavior is similar to a standard ComboBox control, it may be more advantagous to use the CB_SHOWDROPDOWN message to cause the dropdown without the keystroke
#DEFINE CB_SHOWDROPDOWN 0x14F

=SendMessage(hWnd,CB_SHOWDROPDOWN,1,0)  && display dropdown for ComboBox and derived types
=SendMessage(hWnd,CB_SHOWDROPDOWN,0,0)  && hide dropdown
(Helps to read the docs, but it takes a while...)

So many Windows messages, and so little time... < BEG >
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform