Man, I hate having to do this...
This is a discussion on Man, I hate having to do this... within the Windows Programming forums, part of the Platform Specific Boards category; Code:
COMBOBOX IDC_BIH_BITCOUNT, 187, 70, 35, 12, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL
Code:
SendDlgItemMessage(hwnd, IDC_BIH_BITCOUNT, CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)"1
");
SendDlgItemMessage(hwnd, IDC_BIH_BITCOUNT, ...
-
Work in Progress.....
Man, I hate having to do this...
Code:
COMBOBOX IDC_BIH_BITCOUNT, 187, 70, 35, 12, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL
Code:
SendDlgItemMessage(hwnd, IDC_BIH_BITCOUNT, CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)"1\0");
SendDlgItemMessage(hwnd, IDC_BIH_BITCOUNT, CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)"4\0");
SendDlgItemMessage(hwnd, IDC_BIH_BITCOUNT, CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)"8\0");
SendDlgItemMessage(hwnd, IDC_BIH_BITCOUNT, CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)"16\0");
SendDlgItemMessage(hwnd, IDC_BIH_BITCOUNT, CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)"24\0");
SendDlgItemMessage(hwnd, IDC_BIH_BITCOUNT, CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)"32\0");
I hate having to ask for help so much, but this one's got me stumped. I get nadda in the Combo Box's drop down list. I've looked through MSDN's stuff on Combo Boxes I don't know how many times. And don't say my problem is that hwnd isn't the Dialog or is NULL or something, cause I'm using the function on about twenty other Edit Controls and it works fine.
Code:
void function(void)
{
function();
}
-
It looks good, but you dont have to add \0 at the end of every string. If you use "sometext" the \0 is automaticaly added. I think you now have 2 "\0" at the end. But that shouldnt be the problem......
I THINK (dont know for shure) your problem is the "COMBOBOX " which should be "CONTROL" .
Anyway, here is some code that does work.
Code:
CONTROL "", IDCBITRATE, "ComboBox", WS_BORDER|CBS_DROPDOWNLIST|WS_VSCROLL|WS_TABSTOP, 68, 44, 40, 40
SendMessage(GetDlgItem(hwnd,IDCBITRATE), CB_ADDSTRING, 0, (LPARAM)"128");
-
Assuming the return value from CB_ADDSTRING is as it should be then increase the height of the combobox; the height is the total of the drop down list and edit parts.
>>this one's got me stumped<<
The height issue with comboboxes catches many, if not most, out. 
>>I THINK (dont know for shure) your problem is the "COMBOBOX " which should be "CONTROL" .<<
Both are acceptable: resource definition statements.
CProgramming FAQ
Caution: this person may be a carrier of the misinformation virus.
-

Originally Posted by
Ken Fitlike Assuming the return value from
>>I THINK (dont know for shure) your problem is the "COMBOBOX " which should be "CONTROL" .<<
Both are acceptable:
resource definition statements.
I always use a resource editor, so i dont know to much about resource files as you can see
-
Work in Progress.....
I had a feeling I needed to do something like that. But, the way I understood it was that you only needed to do any of that work for owner-drawn combo boxes. What messages and such should I be looking into?
Ahh, nevermind. Yay, now I can finally get some work done. Thanks a lot.
Last edited by Jaken Veina; 07-05-2005 at 12:45 AM.
Code:
void function(void)
{
function();
}
Popular pages Recent additions
Similar Threads
-
By willc0de4food in forum Windows Programming
Replies: 25
Last Post: 05-19-2005, 10:58 PM
-
By Srg Pepper in forum A Brief History of Cprogramming.com
Replies: 29
Last Post: 10-03-2002, 11:34 AM
-
By mithrandir in forum A Brief History of Cprogramming.com
Replies: 8
Last Post: 08-21-2002, 10:14 AM
-
By stevey in forum A Brief History of Cprogramming.com
Replies: 39
Last Post: 06-01-2002, 01:12 PM
-
By Cheeze-It in forum A Brief History of Cprogramming.com
Replies: 34
Last Post: 09-12-2001, 08:50 AM