Use CIPAddressCtrl class

Use CIPAddressCtrl class

Post by gary » Sun, 18 Jul 2004 02:20:37


using the CIPAddressCtrl class in a dialog wizard with a Next button.
i only want to enable the Next button if the user has typed in all 4 parts
of the address.

i'm catching the IPN_FIELDCHANGED notification message. doing
a GetAddress allows me to check via the return code that none of the
4 fields are blank.

however, this notification message is only caught when any of the 4 edit
fields in the IP Address control loses focus. so if i type in fields 1-3
i'm ok as i have to move to the next part to enter the next address part.
when i get to the 4th field, as soon as i type in a numeric i then want to
enable the Next button. currently, i have to lose focus from the 4th
field in order to get the button enabled.

is there a way to accomplish this.

thanks!
 
 
 

Use CIPAddressCtrl class

Post by Norman » Mon, 19 Jul 2004 05:07:54

Hi gary,
You can chage the window procedure of the IP control and check for the
message WM_COMMAND.
If the HIWORD(wparam) is EN_CHANGE, one of the fields have been changed.
From there you can do what ever you want.
Normand.


F7UJc.51$ XXXX@XXXXX.COM ...

 
 
 

Use CIPAddressCtrl class

Post by gary » Thu, 22 Jul 2004 10:53:49

normand,

thanks, that did the trick. when i get the EN_CHANGE, i then
do a CIPAddressCtrl GetAddress call to get the 4 addresses.
the return code is the number of non-blank fields. as long as the
retun code is 4, then i know the field is now complete.

thanks!




parts
1-3
part.
to