Note that there are some explanatory texts on larger screens.

plurals
  1. POWinAPI Combo Box Issue - Skipped by case
    primarykey
    data
    text
    <p>Hi all I wonder if anyone could tell me what I am doing wrong I have made a dialog application and all its done apart from one problem which is my combo boxes I have added these to tab page and they are called by the handler below. My problem is where to add the combo box fields i.e</p> <pre><code> // Sets up the combo box menu HWND hwndComboTab = GetDlgItem(hwndDlg, IDC_COMBO1); ComboBox_AddString(hwndComboTab, "Option 1"); ComboBox_AddString(hwndComboTab, "Option 2"); ComboBox_AddString(hwndComboTab, "Option 3"); </code></pre> <p>I assumed it would be under WM_INITDIALOG but I always get a case skipped error. I assume it would need to be inside </p> <p>case 1: for example is this correct? and if so what varriables are posted to this section a bool?</p> <p>Also I tryed adding it before the switch statesments and it works but the options panel is replicaed many times giving me spammed options.</p> <pre><code>INT_PTR CALLBACK MyTabDialogOne(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam) { // Switches the message for tab 1 control switch (uMsg) { case WM_INITDIALOG: // Tryed here case error break; case WM_COMMAND: { switch (LOWORD(wParam)) // No point here as this is after a button is clicked { case IDC_GET_CODE: // Handles the GET Code button in tab // Displays the result to main window HWND hwndEdit2 = GetDlgItem(GetParent(GetParent(hwndDlg)), IDC_OUTPUT); SetWindowText(hwndEdit2,buffer); // Displays the result to bottom bar HWND hwndStatic1 = GetDlgItem(GetParent(GetParent(hwndDlg)), IDC_STATIC1); Static_SetText(hwndStatic1, "Completed"); //MessageBox(hwndDlg,TEXT("Selected"),TEXT("Button"),0); break; } break; } } return FALSE ; } </code></pre> <p>Thanks in advance</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload