locked
Rotate combo box on screen RRS feed

  • Question

  • I am creating a combobox like so:

     

    m_ccTest = new CComboBox;
     m_ccTest ->Create(WS_CHILD | WS_VISIBLE |WS_VSCROLL | CBS_DROPDOWNLIST,CRect(182, 185, 240, 300), this, IDC_TEST_COMBO);

     

    I wish to know how to create the combobox so that it is rotated 90 degrees.  It is for a PPC application in which the user must rotate the device and look at it landscape view.

     

    Thanks

     

    Harry

     

    Friday, January 18, 2008 2:30 PM

Answers

  • CB (and all other controls) would be rotated automatically as you rotate the screen. That is supported on many devices starting PPC 2003 SE. See this for more info.

    Saturday, January 19, 2008 12:46 AM

All replies

  • You might be able to apply a view transform to the device context, though I'm not sure whether that would work.

     

    Check out this link:

    http://msdn2.microsoft.com/en-us/library/ms533187(VS.85).aspx

    Friday, January 18, 2008 8:37 PM
  • CB (and all other controls) would be rotated automatically as you rotate the screen. That is supported on many devices starting PPC 2003 SE. See this for more info.

    Saturday, January 19, 2008 12:46 AM
  • Hello Ilya, as a matter of fact, I nearly have the same problem which HarryBoy123 has, I don't just want to rotate a control, but I want to rotate the whole dialog or window that contains the controls, and at the same time, rotating the screen is not an option for me, I just want to rotate my application, or the dialog of the application that contains the controls, I saw an application  like that, but I have no idea how was it done!!
    Monday, May 18, 2009 11:27 AM