Click to See Complete Forum and Search --> : Clear a List box


Theone2k
December 15th, 2004, 07:23 AM
Im trying to clear a List box im using Visual c++ 6.

Currently the code im trying to use is



DlgIndex = GetDlgItem(DlgIndex, LST_CLIENTS);
// LST_CLIENTS is the list box im trying to clear

SendMessage(DlgIndex, LB_RESETCONTENT, 0, 0);



this did seem to work correct at first but i seem to have broken it and dont know how any idea.

Theone2k
December 15th, 2004, 07:30 AM
Ok sorted it now Code is



SendDlgItemMessage(hwnd, LST_CLIENTS, LB_RESETCONTENT, 0, 0);



For anyone that mite need it.