The CPMBOBOX list table in my program is NOT workable, it cannot be drag-down, but when I choose the control, it can be chose by the ??key......Why does this happen?

the .RS file define :

    COMBOBOX        IDC_MODEL,61,10,75,12,CBS_DROPDOWNLIST | WS_TABSTOP
    COMBOBOX        IDC_PN,195,10,107,12,CBS_DROPDOWNLIST | WS_TABSTOP

the ASM code :

.const
szTextM1 db '*',0
szTextM2 db '**',0
szTextM3 db '***',0
sz0 db '0',0
sz1 db '1',0
sz2 db '2',0

_ProcDlgMain proc uses ebx edi esi hWnd,wMsg,wParam,lParam
;********************************************************************
;                               eax == WM_INITDIALOG
;********************************************************************
invoke SendDlgItemMessage,hWnd,IDC_MODEL,CB_ADDSTRING,0,addr szTextM1
invoke SendDlgItemMessage,hWnd,IDC_MODEL,CB_ADDSTRING,0,addr szTextM2
invoke SendDlgItemMessage,hWnd,IDC_MODEL,CB_ADDSTRING,0,addr szTextM3
invoke SendDlgItemMessage,hWnd,IDC_MODEL,CB_SETCURSEL,0,0
;********************************************************************
;                               eax == WM_COMMAND
;********************************************************************
.if ax == IDC_MODEL
shr eax,16
.if ax == CBN_SELENDOK
invoke SendDlgItemMessage,hWnd,IDC_MODEL,CB_GETCURSEL,0,0
.if eax == 0
invoke MessageBox,hWinMain,addr sz0,NULL,MB_OK or MB_ICONEXCLAMATION
.elseif eax == 1
invoke MessageBox,hWinMain,addr sz1,NULL,MB_OK or MB_ICONEXCLAMATION
.else
invoke MessageBox,hWinMain,addr sz2,NULL,MB_OK or MB_ICONEXCLAMATION
.endif
.endif
                ...
                ...
                ...
;********************************************************************
.elseif ax == IDM_ABOUT
invoke DialogBoxParam, hInstance, ID_ABOUTDIALOG, hWnd, offset DlgProc, NULL
.endif
           .else
mov eax,FALSE
ret
           .endif
           mov eax,TRUE
           ret
_ProcDlgMain endp
;********************************************************************
DlgProc proc hWnd:HWND, uMsg:UINT, wParam:WPARAM, lParam: LPARAM
mov eax, uMsg
.if eax == WM_COMMAND
mov eax, wParam
shr eax, 16
.if ax == BN_CLICKED
invoke EndDialog, hWnd, NULL
.endif
.elseif eax == WM_DESTROY
invoke EndDialog, hWnd, NULL
.elseif eax == WM_CLOSE
invoke EndDialog, hWnd, NULL
.endif
xor eax,eax
ret
DlgProc endp
Posted on 2005-11-09 02:51:20 by Eric4ever
Eric4ever,

You need to create the ComboBox with the dimensions you want displayed when the ComboBox drops down, not when it is idle.  Change the "12" in your .rc file to "25" and try again.

hth,

farrier
Posted on 2005-11-09 03:06:07 by farrier

Eric4ever,

You need to create the ComboBox with the dimensions you want displayed when the ComboBox drops down, not when it is idle.  Change the "12" in your .rc file to "25" and try again.

hth,

farrier




farrier,

That's the point to solve the problem!:) I have tryied many times and methods to solve it but ...

Thank you for you help!

Yours gratefully Eric4ever
Posted on 2005-11-09 20:17:27 by Eric4ever