View previous topic :: View next topic |
Author |
Message |
kot1990 Expert Cheater
Reputation: 1
Joined: 06 Sep 2009 Posts: 131 Location: Greece
|
Posted: Fri Apr 23, 2010 5:56 pm Post subject: combo box problem |
|
|
I got a little problem with combo boxes. Even if there are selections in the combo box, the only thing that appears when I click the arrow is this little line/box whatever.
I am able to select with keyboard up/down keys.
Why does this happen?
|
|
Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Fri Apr 23, 2010 6:00 pm Post subject: |
|
|
lol. don't know why that happens. it happened to me too when i used combo boxes. i was using resources at the time and solved that problem by making the height of that control include the bit it extends down to.
|
|
Back to top |
|
 |
kot1990 Expert Cheater
Reputation: 1
Joined: 06 Sep 2009 Posts: 131 Location: Greece
|
Posted: Fri Apr 23, 2010 6:21 pm Post subject: |
|
|
I thought about the height too, but how do you include the bit you say?
|
|
Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Fri Apr 23, 2010 7:06 pm Post subject: |
|
|
if you're doing it in resources, manually set the height to a bigger number. if you're doing it with createwindow/ex, just set the y to be bigger
|
|
Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Fri Apr 23, 2010 8:24 pm Post subject: |
|
|
the height affects the drop down menu, not the height of the actual control.
so if you try and set the height to perfectly match the size of the control or something, you'll get that result
|
|
Back to top |
|
 |
kot1990 Expert Cheater
Reputation: 1
Joined: 06 Sep 2009 Posts: 131 Location: Greece
|
Posted: Sat Apr 24, 2010 6:38 pm Post subject: |
|
|
sorry, but there's no option for the height of the combo box.
See this:
EDIT: maybe a resize function would help?
|
|
Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Sat Apr 24, 2010 6:41 pm Post subject: |
|
|
yes, i edited mine by viewing the .rc as code.. there's probably a better way but yea..
|
|
Back to top |
|
 |
kot1990 Expert Cheater
Reputation: 1
Joined: 06 Sep 2009 Posts: 131 Location: Greece
|
Posted: Sat Apr 24, 2010 7:01 pm Post subject: |
|
|
thank you! it works
Code: |
RECT comboRECT;
combo1 = GetDlgItem(skills_tab_hwnd,IDC_COMBO1);
GetClientRect(combo1,&comboRECT);
SetWindowPos(combo1,HWND_TOP,comboRECT.left,comboRECT.right,150,150,SWP_SHOWWINDOW);
|
|
|
Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Sat Apr 24, 2010 7:04 pm Post subject: |
|
|
kot1990 wrote: | thank you! it works
Code: |
RECT comboRECT;
combo1 = GetDlgItem(skills_tab_hwnd,IDC_COMBO1);
GetClientRect(combo1,&comboRECT);
SetWindowPos(combo1,HWND_TOP,comboRECT.left,comboRECT.right,150,150,SWP_SHOWWINDOW);
|
|
instead of doing it in the code, you can set the initial size values in the code of the .rc file. view the .rc file as text and edit the respective values there
|
|
Back to top |
|
 |
kot1990 Expert Cheater
Reputation: 1
Joined: 06 Sep 2009 Posts: 131 Location: Greece
|
Posted: Sat Apr 24, 2010 7:07 pm Post subject: |
|
|
yeah! because my code is a mess right now, so many calls to do a simple thing pfff/
|
|
Back to top |
|
 |
|