title: GUI in C language
body: <p>I am building a gui of multiple programs,  i want to combine them in one window by which the user could intially select which program to run. the window of the chosen program only appears. my question:  when i select one program the functions under this program don't work i.e: </p>
  
  <p>switch(msg)<br>
      {
          case WM_CLOSE:
              DestroyWindow(hwnd);<br>
              break;
          case WM_DESTROY:
              PostQuitMessage(0);<br>
              break;</p>
  
  <pre><code>    case WM_CREATE:
          Main_createButton(hwnd);
  
      break;
  
  
      //____________________________________________________________________
  
      case WM_COMMAND:
  
          switch (LOWORD(wparam))
          {
  
              case Main_ID_RB_a:
  
  
                  Q1_createButton(hwnd);
                  Q1_picture(hwnd);
                  Q1_Rad_But(hwnd);
                  Q1_D_Price (hwnd);
                  Q1_Comb_Box (hwnd);
                  Q1_money_shwbox (hwnd);
  
  
                 switch (Q1_Rad_But(hwnd))
          {
              case Q1_ID_BUTTON_FIRST:
                  Q1_pressButton(hwnd);
              break;
  
              case Q1_ID_RB_a:
  
                  SetDlgItemText(hwnd,Q1_ID_EDIT_TEXT1,"Apple Doughnut");
                  SetDlgItemText(hwnd,Q1_ID_EDIT_TEXT2,"5.30");
              break;
              case Q1_ID_RB_b:
                  SetDlgItemText(hwnd,Q1_ID_EDIT_TEXT1,"Cheese Doughnut");
                  SetDlgItemText(hwnd,Q1_ID_EDIT_TEXT2,"5.20");
              break;
              case Q1_ID_RB_c:
                  SetDlgItemText(hwnd,Q1_ID_EDIT_TEXT1,"Chocolate Doughnut");
                  SetDlgItemText(hwnd,Q1_ID_EDIT_TEXT2,"4.30");
              break;
              case Q1_ID_RB_d:
                  SetDlgItemText(hwnd,Q1_ID_EDIT_TEXT1,"Cruller Doughnut");
                  SetDlgItemText(hwnd,Q1_ID_EDIT_TEXT2,"4.50");
              break;
              case Q1_ID_RB_e:
                  SetDlgItemText(hwnd,Q1_ID_EDIT_TEXT1,"Glaze Doughnut");
                  SetDlgItemText(hwnd,Q1_ID_EDIT_TEXT2,"4.50");
              break;
              case Q1_ID_RB_f:
                  SetDlgItemText(hwnd,Q1_ID_EDIT_TEXT1,"Jelly Doughnut");
                  SetDlgItemText(hwnd,Q1_ID_EDIT_TEXT2,"4");
              break;
              case Q1_ID_RB_g:
                  SetDlgItemText(hwnd,Q1_ID_EDIT_TEXT1,"Muffin Doughnut");
                  SetDlgItemText(hwnd,Q1_ID_EDIT_TEXT2,"5");
              break;
              case Q1_ID_RB_h:
                  SetDlgItemText(hwnd,Q1_ID_EDIT_TEXT1,"Pumpkin Doughnut");
                  SetDlgItemText(hwnd,Q1_ID_EDIT_TEXT2,"3.30");
              break;
              case Q1_ID_RB_i:
                  SetDlgItemText(hwnd,Q1_ID_EDIT_TEXT1,"Strawberry Doughnut");
                  SetDlgItemText(hwnd,Q1_ID_EDIT_TEXT2,"4.70");
              break;
              case Q1_ID_RB_j:
                  SetDlgItemText(hwnd,Q1_ID_EDIT_TEXT1,"Sugar Doughnut");
                  SetDlgItemText(hwnd,Q1_ID_EDIT_TEXT2,"3");
              break;
  
  
  
                  //destroy Q2
                  DestroyWindow(Q2S11);  DestroyWindow(Q2S12) ;DestroyWindow(Q2S13) ;DestroyWindow(Q2S14) ;DestroyWindow(Q2S15) ;
                  DestroyWindow(Q2S16);  DestroyWindow(Q2S17);  DestroyWindow(Q2S18);  DestroyWindow(Q2S19);  DestroyWindow( Q2S110);
                  DestroyWindow(Q2S111);  DestroyWindow(Q2S112);  DestroyWindow(Q2S113);  DestroyWindow(Q2S114);  DestroyWindow(Q2S115);
                  DestroyWindow(Q2S116);  DestroyWindow(Q2S117);  DestroyWindow(Q2S118);  DestroyWindow(Q2S119);  DestroyWindow(Q2S120);
                  DestroyWindow(Q2S121);  DestroyWindow(Q2S122);  DestroyWindow(Q2S123);  DestroyWindow(Q2S124);  DestroyWindow(Q2S125);
  
                  DestroyWindow(Q2E11) ;DestroyWindow(Q2E12) ;DestroyWindow(Q2E13) ;DestroyWindow(Q2E14);DestroyWindow( Q2E15);
                  DestroyWindow(Q2E16);  DestroyWindow(Q2E17);  DestroyWindow(Q2E18);  DestroyWindow(Q2E19); DestroyWindow(Q2E110);
                  DestroyWindow(Q2E111);  DestroyWindow(Q2E112);
  
                  DestroyWindow(Q2B1a);DestroyWindow(Q2B1b);DestroyWindow(Q2B1c);DestroyWindow(Q2B1d);DestroyWindow(Q2B1e);
                  DestroyWindow(Q2B1f);DestroyWindow(Q2B1g);DestroyWindow(Q2B1h);DestroyWindow(Q2B1i);DestroyWindow(Q2B1j);
                  DestroyWindow(Q2B1sel);
  
                  DestroyWindow(Q2_staticText);DestroyWindow(Q2_staticText1);DestroyWindow(Q2_staticText2);DestroyWindow(Q2_staticText3);
                  DestroyWindow(Q2_staticText4);DestroyWindow(Q2_staticText5);DestroyWindow(Q2_staticText6);DestroyWindow(Q2_staticText7);
                  DestroyWindow(Q2_staticText8);DestroyWindow(Q2_staticText9);
  
                  DestroyWindow(Q2_hBitmap);DestroyWindow(Q2_hBitmap1);DestroyWindow(Q2_hBitmap2);DestroyWindow(Q2_hBitmap3);
                  DestroyWindow(Q2_hBitmap4);DestroyWindow(Q2_hBitmap5);DestroyWindow(Q2_hBitmap6);DestroyWindow(Q2_hBitmap7);
                  DestroyWindow(Q2_hBitmap8);DestroyWindow(Q2_hBitmap9);
  
                  DestroyWindow(Q2hComboBox);
  
                  DestroyWindow(Q2B11);
                  }
  
  
              break;
  </code></pre>
  
  <p>when  select one item  and the the program doesn't copy the name and value to edit text 1 and edit text two as shown 
  <a href="https://i.stack.imgur.com/SD4Sk.png" rel="nofollow noreferrer">enter image description here</a>[enter image description here][2]</p>