Click here to Skip to main content
16,006,065 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Execute a *.exe inside my application Pin
illidan9920-Oct-04 1:26
illidan9920-Oct-04 1:26 
GeneralComboboxes in WINAPI Pin
Ibana19-Oct-04 5:59
Ibana19-Oct-04 5:59 
GeneralRe: Comboboxes in WINAPI Pin
Tom Wright19-Oct-04 6:13
Tom Wright19-Oct-04 6:13 
GeneralRe: Comboboxes in WINAPI Pin
Ibana20-Oct-04 3:43
Ibana20-Oct-04 3:43 
GeneralRe: Comboboxes in WINAPI Pin
Tom Wright20-Oct-04 4:31
Tom Wright20-Oct-04 4:31 
GeneralRe: Comboboxes in WINAPI Pin
Ibana20-Oct-04 5:33
Ibana20-Oct-04 5:33 
GeneralRe: Comboboxes in WINAPI Pin
normanS20-Oct-04 4:17
normanS20-Oct-04 4:17 
GeneralRe: Comboboxes in WINAPI Pin
Ibana20-Oct-04 6:07
Ibana20-Oct-04 6:07 
thanks for your replay Norman,

it helped me very much but it only replys if iComboBoxSelection is =0....
Is there something wrong with my inserttion where I use CB_INSERTSTRING followed by indexing ... or do I use the COMMAND: case wrong?

/Peter



LRESULT CALLBACK ToolboxProc(HWND hWndDlg, UINT Msg, WPARAM wParam, LPARAM lParam)
{

LRESULT iComboBoxSelection;

switch(Msg)
{
case WM_INITDIALOG:
/*Add all the options to the combo box*/
char Buffer[64];
strcpy(Buffer,"Von Mises Z1");
SendDlgItemMessage(hWndDlg,IDC_COMBO1,CB_INSERTSTRING,0,(LPARAM)Buffer);
strcpy(Buffer,"Von Mises Z2");
SendDlgItemMessage(hWndDlg,IDC_COMBO1,CB_INSERTSTRING,1,(LPARAM)Buffer);
strcpy(Buffer,"Principal Major Z1");
SendDlgItemMessage(hWndDlg,IDC_COMBO1,CB_INSERTSTRING,2,(LPARAM)Buffer);
strcpy(Buffer,"Principal Major Z2");
SendDlgItemMessage(hWndDlg,IDC_COMBO1,CB_INSERTSTRING,3,(LPARAM)Buffer);
strcpy(Buffer,"Principal Minor Z1");
SendDlgItemMessage(hWndDlg,IDC_COMBO1,CB_INSERTSTRING,4,(LPARAM)Buffer);
strcpy(Buffer,"Principal Minor Z2");
//GetCurSel();
//iComboBoxSelection=SendDlgItemMessage(hWndDlg,IDC_COMBO1,CB_SETCURSEL, 0, 0);
// SendDlgItemMessage(hWndDlg,IDC_COMBO1,ON_CBN_SELENDOK ,0,(LPARAM)Buffer);

//SendDlgItemMessage(hWndDlg,IDC_COMBO1,CB_GETCURSEL, 0, 0);
break;



case WM_COMMAND:

switch(LOWORD(wParam))
{
case IDC_COMBO1:
{
if (HIWORD(wParam) == CBN_CLOSEUP)
{
iComboBoxSelection = SendMessage(hWndDlg,
CB_GETCURSEL, 0, 0);

if (iComboBoxSelection == 2)
{
MessageBox(hWnd, "iComboBoxSelection == 2", "Error",
MB_OK | MB_ICONINFORMATION);

}
if (iComboBoxSelection == 1)MessageBox(hWnd, "iComboBoxSelection == 1", "Error",
MB_OK | MB_ICONINFORMATION);

if (iComboBoxSelection == 0)MessageBox(hWnd, "iComboBoxSelection == 0", "Error",
MB_OK | MB_ICONINFORMATION);

}

break;



}

}
break;




}

return FALSE;
}

GeneralRe: Comboboxes in WINAPI Pin
Ibana20-Oct-04 6:31
Ibana20-Oct-04 6:31 
QuestionWhat data access is better and easier Pin
Tom Wright19-Oct-04 5:46
Tom Wright19-Oct-04 5:46 
AnswerRe: What data access is better and easier Pin
Nemanja Trifunovic19-Oct-04 6:46
Nemanja Trifunovic19-Oct-04 6:46 
AnswerRe: What data access is better and easier Pin
David Crow19-Oct-04 8:34
David Crow19-Oct-04 8:34 
GeneralRe: What data access is better and easier Pin
Tom Wright19-Oct-04 8:47
Tom Wright19-Oct-04 8:47 
Generalstarting mode Pin
Jenie_net19-Oct-04 5:28
Jenie_net19-Oct-04 5:28 
GeneralRe: starting mode Pin
David Crow19-Oct-04 8:11
David Crow19-Oct-04 8:11 
GeneralRe: starting mode Pin
Jenie_net19-Oct-04 11:31
Jenie_net19-Oct-04 11:31 
GeneralRe: starting mode Pin
David Crow20-Oct-04 3:06
David Crow20-Oct-04 3:06 
GeneralWireless signal strength and C++ Pin
zoid ! 19-Oct-04 5:26
zoid ! 19-Oct-04 5:26 
GeneralRe: Wireless signal strength and C++ Pin
psn19-Oct-04 7:13
psn19-Oct-04 7:13 
GeneralRe: Wireless signal strength and C++ Pin
zoid ! 19-Oct-04 8:20
zoid ! 19-Oct-04 8:20 
GeneralRe: Wireless signal strength and C++ Pin
crazy1dude19-Oct-04 9:18
crazy1dude19-Oct-04 9:18 
Generaltutorials Pin
tmoss19-Oct-04 5:10
tmoss19-Oct-04 5:10 
GeneralRe: tutorials Pin
David Crow19-Oct-04 8:10
David Crow19-Oct-04 8:10 
GeneralMemory leak.. Pin
RobJones19-Oct-04 4:13
RobJones19-Oct-04 4:13 
GeneralRe: Memory leak.. Pin
Bob Stanneveld19-Oct-04 9:18
Bob Stanneveld19-Oct-04 9:18 

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.