case WM_COMMAND: if ( HIWORD(wParam) == LBN_DBLCLK ) { nIdx = (int)ListBox_GetCaretIndex( (HWND)lParam ); ListBox_GetText( (HWND)lParam, nIdx, Buffer); SetWindowText( GetDlgItem( hDlg, IDC_EDIT ), Buffer ); }
if( LOWORD(wParam) == IDC_KENSU ) { nCount = (int)ListBox_GetCount( GetDlgItem( hDlg, IDC_LIST ) ); wsprintf( Buffer, "%d", nCount ); SetWindowText( GetDlgItem( hDlg, IDC_COUNT ), Buffer ); return TRUE; }
if( LOWORD(wParam) == IDC_TOP ) { nCount = (int)ListBox_GetTopIndex( GetDlgItem( hDlg, IDC_LIST ) ); wsprintf( Buffer, "%d", nCount ); SetWindowText( GetDlgItem( hDlg, IDC_COUNT ), Buffer ); return TRUE; }