Click here to Skip to main content
16,006,440 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalignore function Pin
Steve L.1-May-02 12:22
Steve L.1-May-02 12:22 
GeneralRe: ignore function Pin
Christian Graus1-May-02 13:01
protectorChristian Graus1-May-02 13:01 
GeneralRe: ignore function Pin
Mike Nordell1-May-02 13:20
Mike Nordell1-May-02 13:20 
Generalhelp with a dialog based application Pin
atomicluis1-May-02 11:50
atomicluis1-May-02 11:50 
GeneralRe: help with a dialog based application Pin
Ravi Bhavnani1-May-02 12:07
professionalRavi Bhavnani1-May-02 12:07 
GeneralRe: help with a dialog based application Pin
Nish Nishant1-May-02 12:08
sitebuilderNish Nishant1-May-02 12:08 
GeneralRe: help with a dialog based application Pin
Chris Losinger1-May-02 12:09
professionalChris Losinger1-May-02 12:09 
GeneralDynamic combo boxes Pin
1-May-02 10:51
suss1-May-02 10:51 
//I want to dynamically create a new combo box just to the right of an existing combo box. The problem is I do not seem to be able to set the size of the dynamically created combo box. Any suggestions???
CComboBox* pExistingCombo = (CComboBox*)GetDlgItem(IDC_COMBO1);

//The new control should have the same stlye as the existing control
DWORD dwStyle = ::GetWindowLong(pExistingCombo->m_hWnd, GWL_STYLE);

//Get the edit area and drop area of the old control so they can be the same
//size in the new control
CRect rEditArea, rDropDownArea;
pExistingCombo->GetWindowRect(rEditArea);
ScreenToClient(rEditArea);
pExistingCombo->ShowDropDown();
//get the size of the drop area
pExistingCombo->GetDroppedControlRect(rDropDownArea);
pExistingCombo->ShowDropDown(FALSE);
ScreenToClient(rDropDownArea);

//Move the new control over to the right a little
rEditArea.right += 150;
rEditArea.left += 150;

//Build the new combo control
m_pComboNew = new CComboBox;
m_pComboNew->Create(dwStyle, rEditArea, this, 1222);
m_pComboNew->AddString("one");
m_pComboNew->AddString("two");
m_pComboNew->AddString("three");

//Question??? - How do I set the drop down size of new combo to be same as existing combo?

m_pComboNew->ShowDropDown();

Cry | :(( Thanks
GeneralRe: Dynamic combo boxes Pin
Shog91-May-02 12:23
sitebuilderShog91-May-02 12:23 
GeneralRe: Dynamic combo boxes Pin
1-May-02 13:51
suss1-May-02 13:51 
GeneralSending Mouse Events to Window Pin
vins1-May-02 9:56
vins1-May-02 9:56 
GeneralRe: Sending Mouse Events to Window Pin
Jeremy Falcon1-May-02 10:03
professionalJeremy Falcon1-May-02 10:03 
GeneralRe: Sending Mouse Events to Window Pin
vins1-May-02 21:43
vins1-May-02 21:43 
GeneralGetting the control inside a View's handle from another process Pin
1-May-02 8:52
suss1-May-02 8:52 
GeneralCmdline driving me crazy Pin
1-May-02 8:46
suss1-May-02 8:46 
GeneralRe: Cmdline driving me crazy Pin
l a u r e n1-May-02 10:34
l a u r e n1-May-02 10:34 
GeneralRe: Cmdline driving me crazy Pin
Navin1-May-02 10:44
Navin1-May-02 10:44 
GeneralRe: Cmdline driving me crazy Pin
Nish Nishant1-May-02 12:48
sitebuilderNish Nishant1-May-02 12:48 
GeneralChanging icon in executable Pin
Tili1-May-02 6:30
Tili1-May-02 6:30 
GeneralRe: Changing icon in executable Pin
Navin1-May-02 6:41
Navin1-May-02 6:41 
GeneralRe: Changing icon in executable Pin
Tili1-May-02 7:32
Tili1-May-02 7:32 
GeneralRe: Changing icon in executable Pin
Navin1-May-02 8:05
Navin1-May-02 8:05 
GeneralSolution Found Pin
Tili1-May-02 21:35
Tili1-May-02 21:35 
GeneralRe: Changing icon in executable Pin
Renjith Ramachandran1-May-02 7:25
Renjith Ramachandran1-May-02 7:25 
GeneralRe: Changing icon in executable Pin
Tili1-May-02 21:53
Tili1-May-02 21:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.