On my program, I want it so that when the user clicks something in the listbox, the program will switch to another radiobutton. Here's the code i used, but for some reason, it does not work.
Code:
case WM_COMMAND:
if ((HWND)lParam == GetDlgItem(hwnd,ID_LIST_CHAN) ){
switch(HIWORD(wParam)) {
case EN_CHANGE:
cha_len=SendMessage(GetDlgItem(hwnd,ID_LIST_CHAN),LB_GETCOUNT,0,0);
if(win_clicked==1)
{
if(all_channels==1){
//for(i=0;i<cha_len;i++)
//{
//SelectChange=SendMessage(GetDlgItem(hwnd,ID_LIST_CHAN),LB_GETSEL,i,0);
//if(SelectChange<=0)
//{
SendDlgItemMessage(hwnd, ID_ALL_CHAN, BM_SETCHECK, 0, 0);
SendDlgItemMessage(hwnd, ID_ALLMATCH_CHAN, BM_SETCHECK, 0, 0);
SendDlgItemMessage(hwnd, ID_CHAN, BM_SETCHECK, 1, 0);
EnableWindow(GetDlgItem(hwnd,ID_CHAN_COMBO),FALSE);
all_channels=0;
match_channels=0;
//}
//}
}