Click here to Skip to main content
15,909,953 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCombo Box Questions. Pin
Suresh H9-Jan-07 20:48
Suresh H9-Jan-07 20:48 
AnswerRe: Combo Box Questions. Pin
Hamid_RT9-Jan-07 20:50
Hamid_RT9-Jan-07 20:50 
GeneralRe: Combo Box Questions. Pin
Suresh H9-Jan-07 21:19
Suresh H9-Jan-07 21:19 
GeneralRe: Combo Box Questions. Pin
Hamid_RT9-Jan-07 21:21
Hamid_RT9-Jan-07 21:21 
GeneralRe: Combo Box Questions. Pin
Suresh H9-Jan-07 21:29
Suresh H9-Jan-07 21:29 
GeneralRe: Combo Box Questions. Pin
Hamid_RT9-Jan-07 21:38
Hamid_RT9-Jan-07 21:38 
GeneralRe: Combo Box Questions. Pin
Suresh H9-Jan-07 21:52
Suresh H9-Jan-07 21:52 
AnswerRe: Combo Box Questions. Pin
prasad_som9-Jan-07 21:30
prasad_som9-Jan-07 21:30 
Suresh H wrote:
And in the code I have used below code to set the default Combo box value to 0.

case WM_INITDIALOG:
{
HWND hwndCombo = GetDlgItem(hwnd, IDC_COMBO);
SendMessage(hwndCombo,CB_SETITEMDATA,0,0);
}
break;


You are using wrong message for setting value.CB_SETITEMDATA is used to set item data for particular index.

I'm not clear about your wording, I'm assuming that you want first value to be selected and default selection.
You do this by using,

HWND hwndCombo = GetDlgItem(hwnd, IDC_COMBO);
SendMessage(hwndCombo,CB_CB_SETCURSEL,0,0);






GeneralRe: Combo Box Questions. Pin
Suresh H9-Jan-07 21:41
Suresh H9-Jan-07 21:41 
AnswerRe: Combo Box Questions. Pin
Michael Dunn9-Jan-07 21:53
sitebuilderMichael Dunn9-Jan-07 21:53 
GeneralRe: Combo Box Questions. Pin
Suresh H9-Jan-07 21:55
Suresh H9-Jan-07 21:55 
QuestionSending File Through UDP Pin
Girish6019-Jan-07 20:34
Girish6019-Jan-07 20:34 
QuestionRe: Sending File Through UDP Pin
Roger Stoltz9-Jan-07 21:25
Roger Stoltz9-Jan-07 21:25 
AnswerRe: Sending File Through UDP Pin
Michael Dunn9-Jan-07 21:55
sitebuilderMichael Dunn9-Jan-07 21:55 
GeneralRe: Sending File Through UDP Pin
neilsolent10-Jan-07 2:55
neilsolent10-Jan-07 2:55 
GeneralRe: Sending File Through UDP Pin
Girish60114-Jan-07 23:59
Girish60114-Jan-07 23:59 
AnswerRe: Sending File Through UDP Pin
Luke Lovegrove10-Jan-07 14:50
Luke Lovegrove10-Jan-07 14:50 
QuestionHow to make a winodow always remaining on top Pin
reza matinnejad9-Jan-07 20:18
reza matinnejad9-Jan-07 20:18 
AnswerRe: How to make a winodow always remaining on top Pin
Hamid_RT9-Jan-07 20:23
Hamid_RT9-Jan-07 20:23 
AnswerRe: How to make a winodow always remaining on top Pin
prasad_som9-Jan-07 20:28
prasad_som9-Jan-07 20:28 
QuestionAlign dynamic memory to 32-bit boundary Pin
uusheikh9-Jan-07 20:16
uusheikh9-Jan-07 20:16 
AnswerRe: Align dynamic memory to 32-bit boundary Pin
Cristian Amarie9-Jan-07 21:06
Cristian Amarie9-Jan-07 21:06 
GeneralRe: Align dynamic memory to 32-bit boundary Pin
uusheikh9-Jan-07 21:24
uusheikh9-Jan-07 21:24 
GeneralRe: Align dynamic memory to 32-bit boundary Pin
Jonathan [Darka]9-Jan-07 21:25
professionalJonathan [Darka]9-Jan-07 21:25 
GeneralRe: Align dynamic memory to 32-bit boundary Pin
Cristian Amarie9-Jan-07 22:12
Cristian Amarie9-Jan-07 22:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.