Originally posted by: Eugene
It's known problem.
But Size of drop-down list!!!! It's lost
Originally posted by: Gemiur
I found an example from MSDN on how to use SetHorizontalExtent function to make list box part horizontal scrollable. But it didn't work. Anyone knows how to implement it. Appreciate any response.
ReplyOriginally posted by: AAG
I draw combobox on dialog. but when i execute my program & when i click on vertical scroll the combobox did not appear as drop down i set property visible=true, i make sort=true,vertical scroll = true,type= drop down , ownerdraw=no,
i insert following code in InitDialog()
m_combo.AddString("sdad");
m_combo.AddString("sdad");
m_combo.AddString("sdad");
m_combo.AddString("sdad");
m_combo.AddString("sdad");
m_combo.SetCurSel(1);
but my program doesn't work properly, when i click on vertical scroll of combo it does not dropsdown, it it requires additonal code then please give me the complete procedure only to draw combobox on dialog
Thank u
ReplyOriginally posted by: Arun
since i am new to VC++ struggling to build one ocx, in which your tips also useful to me to expand the width of the listbox.... can u just guide me what is that listwidth and from where to get the listwidth... etc.
ReplyOriginally posted by: Michael Lance
...everywhere I do that, the width is always much wider than needed. I have heard a rumor that the DC used to finally draw the list box contents has a different font. Am I missing something between m_hDC and m_hAttribDC?
ReplyOriginally posted by: Will Pittenger
My combobox contains items whose names constantly change. (Every second, a time in name is updated.) The only technique available when I was using a plain combobox was to empty it and refill. That prevented the user from tracking the item they wanted because it ceased to exist in the combobox every second. This became really hard if the user had to scroll the list to get their item. We also need to change the sort order to match a numerical ID (Item 2 had to be before Item 10).
I tried to solve the problem by making the combobox owner drawn as a class derived from CComboBox. I overrode CompareItem to solve the sorting problem. I ensured that the name displayed was not looked up until DrawItem was painting that name. Next, I added a function that was called by the parent after the item names had changed which invalidated the combobox.
Unfortunately, that didn't affect the list box portion of the combobox (DROPLIST style). There seemed to be no way to retrieve a handle to the listbox under Windows 95 or Windows NT SP5 or older. I was ready to abandon the combobox altogether when I saw this article.
The article did not match what I needed, but it did help. The author used the combobox's OnCtlColor to access listbox's HWND. So, I memorized that and when the item names changed, I was able to invalidate the listbox. It is now working.
Originally posted by: Dimitar Andreev
It's a nice method to get combobox's list window handle!
Thanks!
Originally posted by: Wayne Zhang
There is no SetDroppedHeight() member function available
ReplyOriginally posted by: Sunil Agrawal
When we add a combo box resource in the dialog, the width remains constant. How can we increase the width of the combo box?
ReplyOriginally posted by: JeongHwan Cho
It's a nice method to get combobox's list window handle!
Thanks!
Reply