drop down list box - doesn't drop, doesn't list, doesn't remember.

drop down list box - doesn't drop, doesn't list, doesn't remember.

Post by Michael Feue » Sat, 26 Feb 1994 02:01:34



I have a drop down list box defined, called WH_QUERY.
I want to put things in it, and allow the user to select from the things
I put in it, or enter something new. If they enter something new, I'd like
to see it added into the list box. (iot behave like a ddlb should behave)

I've poured through the MS SDK manuals, and through the petzold book.
The closest any of them came was when Petzold called a font dialog from
commdlg that *used* a drop down list box. But there was no mention of
how to implement your own dialogs that use them.

I have the following code...
case WM_COMMAND:
 switch(wParam) {
 case WH_QUERY :
  GetDlgItemText(hDlg, WH_QUERY, (LPSTR) wh_query, CMD_LEN);
  SendDlgItemMessage (hDlg, WH_QUERY, LB_ADDSTRING, 0,(LONG)(LPSTR) wh_query);
  return(0);
 }

(strange indentation is so that it'll fit on one line)

what else do I need? As this is *not* enough...

 
 
 

1. drop down COMBObox - doesn't drop, list, or remember.

I have a drop down list combo defined, called WH_QUERY.
I want to put things in it, and allow the user to select from the things
I put in it, or enter something new. If they enter something new, I'd like
to see it added into the list box. (iot behave like a ddlb should behave)

I've poured through the MS SDK manuals, and through the petzold book.
The closest any of them came was when Petzold called a font dialog from
commdlg that *used* a drop down combobox. But there was no mention of
how to implement your own dialogs that use them.

I have the following code...
from .rc file
    COMBOBOX        WH_QUERY,31,29,66,12,CBS_DROPDOWN |
                    CBS_OWNERDRAWVARIABLE | CBS_SORT | CBS_HASSTRINGS |
                    WS_VSCROLL | WS_TABSTOP
--from dialog.c
switch (message) {
case WM_INITDIALOG:
 SetDlgItemText(hDlg, WH_QUERY,  (LPCSTR) wh_query1);
 SendDlgItemMessage (hDlg, WH_QUERY, CB_ADDSTRING, 0,(LONG)(LPSTR) wh_query2);
case WM_COMMAND:
 switch(wParam) {
 case WH_QUERY :
  GetDlgItemText(hDlg, WH_QUERY, (LPSTR) wh_query, CMD_LEN);
  SendDlgItemMessage (hDlg, WH_QUERY, CB_ADDSTRING, 0,(LONG)(LPSTR) wh_query);
  return(0);
 }
(strange indentation is so that it'll fit on one line)

what else do I need? As this is *not* enough...
Do I have to do special handling for when the user presses the button
to drop open the combo box? or does it only open if there is data in it?

2. BayCHI (Aug 9) - Organizational Obstacles / Jonathan Grudin

3. Setting the height of a combo box's drop down list

4. Personal Iris /connecting modems

5. List box doesn't show horizontal scroll

6. TV Remote Control Interface for a Microprocessor.

7. List box horizontal scroll doesn't work

8. Please Help: ET4000 and 1024x768 interlaced

9. Drop-list won't drop !

10. Common file dialog that DOESN'T allow new folders, editing, and drag/drop

11. adding drag and drop facilities to a programming language that doesn't support it.

12. TAPI drops call but remote modem doesn't hang up.

13. Can't move dialog boxes, close button doesn't work