Click here to Skip to main content
15,895,557 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: "Is a service program running ?" How to find ? Pin
Hamid_RT16-Jan-07 20:07
Hamid_RT16-Jan-07 20:07 
GeneralRe: "Is a service program running ?" How to find ? Pin
dpsingh_117-Jan-07 20:03
dpsingh_117-Jan-07 20:03 
GeneralRe: "Is a service program running ?" How to find ? Pin
Hamid_RT18-Jan-07 0:57
Hamid_RT18-Jan-07 0:57 
AnswerRe: Is a service program running ? How to find ? Pin
David Crow17-Jan-07 4:09
David Crow17-Jan-07 4:09 
QuestionProblem with string table Pin
dungpapai16-Jan-07 19:40
dungpapai16-Jan-07 19:40 
AnswerRe: Problem with string table Pin
Rajesh R Subramanian16-Jan-07 19:52
professionalRajesh R Subramanian16-Jan-07 19:52 
AnswerRe: Problem with string table Pin
Hamid_RT16-Jan-07 19:54
Hamid_RT16-Jan-07 19:54 
QuestionGetting the Combo Box selected item using Win32 API. Pin
Suresh H16-Jan-07 19:36
Suresh H16-Jan-07 19:36 
Hello All,

I am adding values 0,1,2 to a combo box in Initdialog

switch(Message)<br />
{<br />
case WM_INITDIALOG:<br />
{<br />
HWND hwndCombo = GetDlgItem(hwnd, IDC_CB);<br />
SendMessage(hwndCombo , CB_ADDSTRING,0, (LPARAM) "0");<br />
SendMessage(hwndCombo , CB_ADDSTRING,0, (LPARAM) "1");<br />
SendMessage(hwndCombo , CB_ADDSTRING,0, (LPARAM) "2");<br />
}




in other function I want to use the value of the combo box, (user selected item) for that I am using below code

int F;<br />
HWND HCBF = GetDlgItem(hwnd, IDC_CB);<br />
SendMessage(HCBF , CB_GETITEMDATA,(WPARAM)F, 0);



This code has no error but I am getting some junk value and i am not geting the values 0,1,2
Can u please tell me what is the error in the above code ???


Thanking you,

Suresh HC.
AnswerRe: Getting the Combo Box selected item using Win32 API. Pin
prasad_som16-Jan-07 19:42
prasad_som16-Jan-07 19:42 
GeneralRe: Getting the Combo Box selected item using Win32 API. Pin
Suresh H16-Jan-07 19:49
Suresh H16-Jan-07 19:49 
GeneralRe: Getting the Combo Box selected item using Win32 API. Pin
Hamid_RT16-Jan-07 19:51
Hamid_RT16-Jan-07 19:51 
GeneralRe: Getting the Combo Box selected item using Win32 API. Pin
prasad_som16-Jan-07 19:58
prasad_som16-Jan-07 19:58 
GeneralRe: Getting the Combo Box selected item using Win32 API. Pin
Hamid_RT16-Jan-07 20:08
Hamid_RT16-Jan-07 20:08 
QuestionRe: Getting the Combo Box selected item using Win32 API. Pin
prasad_som16-Jan-07 20:10
prasad_som16-Jan-07 20:10 
AnswerRe: Getting the Combo Box selected item using Win32 API. Pin
Hamid_RT16-Jan-07 20:16
Hamid_RT16-Jan-07 20:16 
GeneralRe: Getting the Combo Box selected item using Win32 API. Pin
Suresh H16-Jan-07 20:20
Suresh H16-Jan-07 20:20 
GeneralRe: Getting the Combo Box selected item using Win32 API. Pin
Hamid_RT16-Jan-07 20:32
Hamid_RT16-Jan-07 20:32 
GeneralRe: Getting the Combo Box selected item using Win32 API. Pin
prasad_som16-Jan-07 20:21
prasad_som16-Jan-07 20:21 
GeneralRe: Getting the Combo Box selected item using Win32 API. Pin
Hamid_RT16-Jan-07 20:30
Hamid_RT16-Jan-07 20:30 
QuestionRe: Getting the Combo Box selected item using Win32 API. Pin
prasad_som16-Jan-07 20:35
prasad_som16-Jan-07 20:35 
AnswerRe: Getting the Combo Box selected item using Win32 API. Pin
Hamid_RT16-Jan-07 20:42
Hamid_RT16-Jan-07 20:42 
QuestionRe: Getting the Combo Box selected item using Win32 API. Pin
prasad_som16-Jan-07 20:44
prasad_som16-Jan-07 20:44 
GeneralRe: Getting the Combo Box selected item using Win32 API. Pin
Suresh H16-Jan-07 20:14
Suresh H16-Jan-07 20:14 
AnswerRe: Getting the Combo Box selected item using Win32 API. Pin
prasad_som16-Jan-07 20:23
prasad_som16-Jan-07 20:23 
GeneralRe: Getting the Combo Box selected item using Win32 API. Pin
Suresh H16-Jan-07 20:30
Suresh H16-Jan-07 20:30 

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.