[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 340
  • Last Modified:

A ComboBox of Type DropDownCombo Having Drag and Drop Facility

Can I have  a ComboBox in VC++ with Drag and Drop Facility of its elements and having type DropDown Combo not Simple?
if it is developed as an Activex Component Where can i Find it and how do i implement it in my Project.
Suhas
0
SuhasBS
Asked:
SuhasBS
1 Solution
 
DanRollinsCommented:
If you need to drop files, just

1) Add a regular (dropdown) combo box to your dialog box.  In the properties box, clcik the "Extended Styles" tab and put a checkmnark in the "Accept files" checkbox.

2) Use the ClassWizard to derive a new class, say CMyComboBox from the standard CComboBox control.  

3) To that class, add a handler for WM_DROPFILES.  Make it so:

void CMyComboBox::OnDropFiles(HDROP hDropInfo)
{
      MessageBox("A file was dropped!");
      CComboBox::OnDropFiles(hDropInfo);
}

4) Use the ClassWizard to create a control-type variable for the combobox.  You can select the new class (CMyComboBox) from the list!

=-=-=-=-=-=-=-=-=-=-=-=-=
If you can make it that far, I'll tell you all about handling the HDROP parameter so you can figure out what was dropped.

-- Dan
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now