Sender: |
|
Date: |
Fri, 25 May 2001 17:04:47 -0500 |
Reply-To: |
|
Subject: |
|
MIME-Version: |
1.0 |
Content-Transfer-Encoding: |
7bit |
In-Reply-To: |
<01C0E53B.BCB9D3A0@IGNITOR> |
Content-Type: |
text/plain; charset="iso-8859-1" |
From: |
|
Parts/Attachments: |
|
|
> Let's say I would like to manage a keypress or a mouse click in a windows
> form I created using either the win32ada binding, or Windez. How would I
go
> about that? Here's example names for the sake of an example.
>
> Form: frmClientEntry
> Control: txtPhoneNumber (this is a regular windows' text box).
> cmdSave (this is a regular windows' command button).
>
> say I want ot know when they pressed the "enter" key from that text box.
> and say I want to know if they clicked the Save button so I can save?
Sounds like you need to learn how to program Windows. If you're going to use
Win32Ada (which I do NOT recommend), then you should read a book like
Petzold. Claw contains a couple of tutorials that would help you get started
(in the Introductory version, use the tutorial in the Builder). I don't know
if there is anything for Windex.
To answer your questions specifically, the button is handled by handling the
WM_COMMAND message in the dialog box, usually for the "clicked"
notification.
To handle "Enter" in the edit control, you have to subclass the control.
That can be a bit tricky. Claw will do it for you if it is necessary; you
just have to override the When_Character action routine to detect an
<Enter>. I don't know if Windex will do it for you. For Win32, you better
get a book.
A reminder: the Claw Introductory Edition is free for evaluation and for
non-commercial use; download it from www.rrsoftware.com.
If you're confused by the terminology above, see my first suggestion.
Randy.
|
|
|