Click here to Skip to main content
15,915,864 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How do i get an the iItem property of an item in a ListView if i have it's lParam value? Pin
redeemer13-Jun-02 2:01
redeemer13-Jun-02 2:01 
GeneralRe: How do i get an the iItem property of an item in a ListView if i have it's lParam value? Pin
srinivas vaithianathan13-Jun-02 8:17
srinivas vaithianathan13-Jun-02 8:17 
GeneralAdd MFC support to ATL project Pin
Hans Ruck13-Jun-02 0:52
Hans Ruck13-Jun-02 0:52 
GeneralRe: Add MFC support to ATL project Pin
Rama Krishna Vavilala13-Jun-02 1:02
Rama Krishna Vavilala13-Jun-02 1:02 
GeneralRe: Add MFC support to ATL project Pin
Nish Nishant13-Jun-02 1:23
sitebuilderNish Nishant13-Jun-02 1:23 
GeneralRe: Add MFC support to ATL project Pin
Rama Krishna Vavilala13-Jun-02 1:17
Rama Krishna Vavilala13-Jun-02 1:17 
GeneralRe: Add MFC support to ATL project Pin
Nish Nishant13-Jun-02 1:31
sitebuilderNish Nishant13-Jun-02 1:31 
GeneralDynamically Changing CComboBox From Dropdown To Droplist Pin
John Clump13-Jun-02 0:45
John Clump13-Jun-02 0:45 
Hi everyone. I have a dialog with 2 combo boxes, one is for setting what kind of data which will be put into the second combo box. For example, "String" will set the data box into a dropdown were the user can type in a string, or "boolean", which would set the data box into a drop list (where there are two entires, "Yes" or "No". I want to be able to do this dynamically, as the user selects either "String" or "boolean".

I tried the following to set the data combobox from a dropdown to a drop list, with the dropdown already successfully created by default in the resource editor. When this code is run, the combo box font changed, the size of the box changed, and I could not set the drop down width to anything, and the width would be zero. The combobox did change to droplist though.

Is it possible to change the combobox from sropdown to drop list dynamically? Is there a correct way to do it, so I don't have to use an extra combobox? Thanks in advance for any help!

<br />
// pFrom is a pointer to a CComboBox control<br />
CRect rect;<br />
pFrom->GetWindowRect(rect);<br />
ScreenToClient(rect);<br />
<br />
pFrom->DestroyWindow();<br />
pFrom->Create(CBS_DROPDOWNLIST, rect, this, IDC_CBO_DATA);<br />
pFrom->AddString("Yes");<br />
pFrom->AddString("No");<br />
pFrom->SetCurSel(0);<br />
pFrom->ShowWindow(TRUE);<br />
pFrom->EnableWindow(TRUE);<br />
pFrom->SetDroppedWidth(70);<br />
<br />

GeneralRe: Dynamically Changing CComboBox From Dropdown To Droplist Pin
Nish Nishant13-Jun-02 1:00
sitebuilderNish Nishant13-Jun-02 1:00 
GeneralRe: Dynamically Changing CComboBox From Dropdown To Droplist Pin
srinivas vaithianathan13-Jun-02 8:22
srinivas vaithianathan13-Jun-02 8:22 
GeneralRe: Dynamically Changing CComboBox From Dropdown To Droplist Pin
Phil J Pearson17-Jun-02 6:23
Phil J Pearson17-Jun-02 6:23 
GeneralRe: Dynamically Changing CComboBox From Dropdown To Droplist Pin
John Clump17-Jun-02 20:02
John Clump17-Jun-02 20:02 
GeneralAbout WebBrowser control Pin
sundararaman13-Jun-02 0:01
sundararaman13-Jun-02 0:01 
Generala question in visual studio.net! Pin
G.Richard12-Jun-02 23:49
G.Richard12-Jun-02 23:49 
GeneralRe: a question in visual studio.net! Pin
Rama Krishna Vavilala13-Jun-02 1:18
Rama Krishna Vavilala13-Jun-02 1:18 
GeneralRe: a question in visual studio.net! Pin
G.Richard13-Jun-02 21:42
G.Richard13-Jun-02 21:42 
GeneralCurrent Directory run time Pin
12-Jun-02 23:03
suss12-Jun-02 23:03 
GeneralRe: Current Directory run time Pin
Renjith Ramachandran12-Jun-02 23:07
Renjith Ramachandran12-Jun-02 23:07 
GeneralRe: Current Directory run time Pin
Fredrik Skog13-Jun-02 0:33
Fredrik Skog13-Jun-02 0:33 
GeneralRe: Current Directory run time Pin
Rama Krishna Vavilala13-Jun-02 1:32
Rama Krishna Vavilala13-Jun-02 1:32 
GeneralRe: Current Directory run time Pin
Fredrik Skog13-Jun-02 2:06
Fredrik Skog13-Jun-02 2:06 
GeneralRe: Current Directory run time Pin
dazinith13-Jun-02 3:24
dazinith13-Jun-02 3:24 
GeneralRe: Current Directory run time Pin
Fredrik Skog13-Jun-02 3:43
Fredrik Skog13-Jun-02 3:43 
GeneralRe: Current Directory run time Pin
JohnnyG13-Jun-02 3:41
JohnnyG13-Jun-02 3:41 
GeneralRe: Current Directory run time Pin
lucy13-Jun-02 5:00
lucy13-Jun-02 5:00 

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.