title: create window in tab c++
body: <p>I create tab with createwindow. I have 2 tab item and I want to create some static window in 2 tab item. I have use createwindow with parent is the handle to tab. But the child window is present in both tab1 and tab2. I want 2 tab item have a different content. So How can I do that.</p>
  
  <p>Is there another way to create a Static control belong to the specific tab1 or tab 2 ...
  Not hwnd of tab from create window. I don't know how to do that so this is my solution</p>
  
  <p>I use win api</p>
  
  <p>Thanks</p>
  
  <p>Here some of my code</p>
  
  <pre><code>TabCtrl_InsertItem(hwndTab,0,&amp;tcitem);
  TabCtrl_InsertItem(hwndTab,1,&amp;tcitem);    
  hwndTab_1_1_1 = CreateWindow(L"BUTTON",L"sample",WS_CHILD|WS_VISIBLE,0,29,100,50,hwndTab,(HMENU)4,hInstance,NULL);
          hwndTab_1_2_1 = CreateWindow(L"BUTTON",L"sample2",WS_CHILD|BS_AUTOCHECKBOX,20,80,100,50,hwndTab,(HMENU)4,hInstance,NULL);
  </code></pre>
  
  <p>and I'm using this:</p>
  
  <pre><code>case WM_NOTIFY:
      if (((LPNMHDR)lParam)-&gt;code == TCN_SELCHANGE) {
          switch(TabCtrl_GetCurSel(hwndTab)) {
              case 0:
                  ShowWindow(hwndTab_1_1_1,SW_SHOW);
  
                  ShowWindow(hwndTab_1_2_1,SW_HIDE);
                  break;
  
              case 1: //
                  ShowWindow(hwndTab_1_1_1,SW_HIDE);
  
                  ShowWindow(hwndTab_1_2_1,SW_SHOW);
                  break;
              default: return DefWindowProc(hwnd, Message, wParam, lParam);
         }
  
     }
     else {
         return DefWindowProc(hwnd, Message, wParam, lParam);
     }
     break;
  </code></pre>
  
  <p>I need the code to the same thing with these code. I don't want to use to much show and hide too many time if we have many child window.</p>