msctls_updown32 - Spin control loses focus when pressing the Home key! How to set it back?

B

Bogdan Mazilu

Hi,

I'm developping an application for the Smartphone. I'm using the
Smartphone SDK 2003.

I have found the following problem in my application (and also in some
sample applications): I am using a list box and an associated spin
control (msctls_updown32). When pressing the joystick, the spin
control will display a dialog box with all the entries from the list
box. The user can choose here one of the entries (with joystixk
up/down) and close this spin control dialog box again (by pressing the
joystich again or the Ready menu entry).

The problem happens when this spin box dialog is open and, by some
reason, the application is being sent to the background (for example,
when the telephony application displays an incoming call). When the
user tries to swich back to the old application, the spin control
dialog is still being displayed, but there is no way to interact with
this dialog box again... :( Why?

I have observed the UI from the system applications which are
delivered with the phone (Settings, etc.). The default behaviour there
is that this spin control dialog box closes itself when the
application loses the focus. How could I get the same behaviour in my
application? Or, how could I get the focus set again to the right
control?

Could anyone, maybe, tell me how to open and then to close the spin
control from code? I am already able to open the spin control with the
following code line:

PostMessage(theList, WM_KEYDOWN, 0x0D, 0x01);

where theList is the HWND to the list box associated with the spin
control, but I unable to close it again from the code.

Thank you in advance,
Bogdan Mazilu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top