Hi everyone.
I have a dialog, under Smartphone 2005 which has a ComboBox control. The project is an MFC Smart Device application, written, of course, in C++. The problem we have encountered is that when dropping a ComboBox control on the dialog designer, the control looks like a Pocket PC ComboBox. When the application is run, the looks of the ComboBox remain the same (PPC looks) as well as its behaviour. Is this a bug under Visual Studio 2005 How can I design a correct Smartphone ComboBox (also called spinner control) under Visual Studio 2005
The application has got to be developed under c++/MFC because we are actually porting this project from PPC to Smartphone. If developed under C# we will have to migrate lots of critical C++ code to dlls and that will cause lots of problems as well as lots of headaches.
Thanks in advance.

MFC Smart Device project with Visual Studio 2005 and ComboBox problem (POCKET PC BEHAVIOUR AND LOOKS!!).
PeterSt
Thanks for the reply.
Yes I have checked that out as well as this link on how to create it using CreateWindow, http://msdn2.microsoft.com/en-us/library/aa457782.aspx .
Since I am developing in MFC I was hoping to use MFC classes. Is there a way to do this A code sample perhaps
Thanks!
rbedick
Hi Vagrant,
Take a look here:
http://msdn2.microsoft.com/en-us/library/ms832351.aspx
-Mel
William Boatin
I have continued to research and try out different things. Here is where I am at now:
I have created a new project, single doc interface. I added a listbox control (and a member variable to the view class, m_ctrlList). I then added a spin control and a member variable to the view class, m_ctrlSpin. I set the properties, right align, and horizontal orientation on the spin control. I then edited the resoucre file and added UDS_EXPANABLE to the spin control. Next in the view's OnInitialUpdate() method I added the following line to tie the spin control to the list box:
m_ctrlSpin.SetBuddy(&m_ctrlList);
I then added some strings, represnting MAC addresses, to the list using m_ctrlList.AddString(). I compile and run the app on the smartphone. The control looks like what I would expect ( embedded spin control in right side of list box). However the list is initially blank unless I click on it, then the first in the list appears. However, clicking in the spin controls arrows do nothing to the list. Hitting the action button will bring up a full screen with the list and let me choose one ( adding UDS_EXPANABLE to the resource).
How do I tie actions on the spin control arrows to modify the list selection
How do I make the first item in the list appear on app startup without having to click the control
I am sure I am just overlooking somethinf here. Thanks for any information on this..........!!!
michaelos
Hi Eric,
The trick is not using a combobox but a listbox, also known as a "Spin Box". To find out how to do this, open your Smartphone SDK Help file, go under the search tab and type in Spin Box Control. You'll find the code to insert into the resource file (manually). Hope this helps.
-Mel Sampat (Microsoft)
http://blogs.msdn.com/melsam
BMoore
tfeaster
Hello,
I am running into the same issue. Where can I find info on the "Spin Box" control I was unable to find it in the Smartphone SDK help. I am using VS2005 to develop a MFC app for a smartphone (T-Mobile Dash). Thanks for any information.
Andy Wahrenberger MSFT
Example in my case the spin control is IDC_SPINVEHICLE
BEGIN
LISTBOX IDC_LIST2,2,24,87,12,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
CONTROL
"",IDC_SPINVEHICLE,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_HORZ | 0x200,79,23,14,14EDITTEXT IDC_ODOMETER,89,24,50,12,ES_CENTER | ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP
EDITTEXT IDC_CURRENT_MPG,9,48,57,14,ES_CENTER | ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP
EDITTEXT IDC_AVERAGE_MPG,74,48,57,14,ES_CENTER | ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP
CONTROL
"",IDC_LIST1,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,2,67,137,41GROUPBOX
" Current -Fuel Economy- Avg.",IDC_STATIC,2,39,137,27CONTROL 131,IDC_STATIC,
"Static",SS_BITMAP,2,0,115,23END