|
-
November 5th, 2010, 08:16 AM
#1
[RESOLVED] Dialog Performance Issue
Hi,
I have a CBN_SELCHANGE capturing some Combo Box selections. Once the combo box has an int to send to a EDITTEXT control, the application becomes very sluggish and after capturing a couple of ints, the controls do not respond. It is likely I am doing something wrong, but I do not know what that is. Any help is appreciated.
Code:
case CBN_SELCHANGE:
{
HWND hComboStr = GetDlgItem(hwndDlg, IDD_STR_COMBO);
int indexs = SendMessage(hComboStr , CB_GETCURSEL, (WPARAM)0, 0L);
if(indexs == 0) return TRUE;
else if(indexs == 1){
int choi = GetDlgItemInt(hwndDlg, IDC_STR, NULL, FALSE);
SetDlgItemInt(hwndDlg, IDB_STR, choi, FALSE);
return TRUE;
}
else if(indexs == 2){
int choi = GetDlgItemInt(hwndDlg, IDC_STR_, NULL, FALSE);
SetDlgItemInt(hwndDlg, IDB_STR, choi, FALSE);
return TRUE;
}
else if(indexs == 3){
int choi = GetDlgItemInt(hwndDlg, IDC_STR__, NULL, FALSE);
SetDlgItemInt(hwndDlg, IDB_STR, choi, FALSE);
return TRUE;
}
HWND hComboDex = GetDlgItem(hwndDlg, IDD_DEX_COMBO);
int indexd = SendMessage(hComboDex , CB_GETCURSEL, (WPARAM)0, 0L);
if(indexd == 0) return TRUE;
else if(indexd == 1){
int choi = GetDlgItemInt(hwndDlg, IDC_DEX, NULL, FALSE);
SetDlgItemInt(hwndDlg, IDB_DEX, choi, FALSE);
return TRUE;
}
else if(indexd == 2){
int choi = GetDlgItemInt(hwndDlg, IDC_DEX_, NULL, FALSE);
SetDlgItemInt(hwndDlg, IDB_DEX, choi, FALSE);
return TRUE;
}
else if(indexd == 3){
int choi = GetDlgItemInt(hwndDlg, IDC_DEX__, NULL, FALSE);
SetDlgItemInt(hwndDlg, IDB_DEX, choi, FALSE);
return TRUE;
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|