For Programmers: Free Programming Magazines  


Home > Archive > Smartphone Developer Forum > October 2005 > Simple UI question









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Simple UI question
Matt

2005-10-17, 7:01 pm

Hello,

On a form I simply have a list box and a spinner control, so I can
select different things in the list box. I want to be notified when
this list box changes, so I set something up in my message map. My
message map looks like:

BEGIN_MSG_MAP(form)
COMMAND_HANDLER(IDC_LIST, LBN_SELCHANGE, function)
END_MSG_MAP()

The only thing is that when I select different things in the list box,
the function never gets called. Is there anything that I am doing
wrong?

Note: there are no typos in the form, ID, or function. I know because
when I change it to LBN_KILLFOCUS, the function will run.

Thanks for all of your help.

Matt

Matt

2005-10-18, 7:04 pm

Thanks to anyone who read this. I actually went at this through a
different approach. I made my message map look like this:

BEGIN_MSG_MAP(form)
MESSAGE_HANDLER(WM_HSCROLL, function)
END_MSG_MAP()

and in my function I put a check to see if the focus was on the
listbox.

Thanks again,
Matt

riki

2005-10-19, 3:58 am

Matt wrote:
> Thanks to anyone who read this. I actually went at this through a
> different approach. I made my message map look like this:
>
> BEGIN_MSG_MAP(form)
> MESSAGE_HANDLER(WM_HSCROLL, function)
> END_MSG_MAP()
>
> and in my function I put a check to see if the focus was on the
> listbox.

I think i did that once too, but have set the 'LBS_NOTIFY' style for
that control? that will cause that issue too.

riki

"Some mornings it just doesn't seem worth it to gnaw through the leather
straps." -- Emo Phillips
By Night:
ThemeChanger for Smartphone : http://homepages.inspire.net.nz/~gambit/
AbstractStart for Smartphone :
http://homepages.inspire.net.nz/~gambit/AbstractStart/
By Day: http://www.EmbeddedFusion.com
Matt

2005-10-19, 7:02 pm

Wait, I am by your post. Will setting the "LBS_NOTIFY" style
cause an issue or not setting "LBS_NOTIFY" cause an issue? Right now I
do not set this style and I am not seeing any issues.

riki

2005-10-19, 7:02 pm

Matt wrote:
> Wait, I am by your post. Will setting the "LBS_NOTIFY" style
> cause an issue or not setting "LBS_NOTIFY" cause an issue? Right now I
> do not set this style and I am not seeing any issues.
>



NOT setting it will mean your don't get notified of selection changes.

riki


Whiskey Tango Foxtrot?
By Night:
ThemeChanger for Smartphone : http://homepages.inspire.net.nz/~gambit/
AbstractStart for Smartphone :
http://homepages.inspire.net.nz/~gambit/AbstractStart/
By Day: http://www.EmbeddedFusion.com
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com