title: check radiobutton state winapi
body: <p>I use mingw32 compiler.
  I created two radioButton:</p>
  
  <pre><code>radio1 = CreateWindowExW(WS_EX_TRANSPARENT  , L"BUTTON", L"RadioButton1",
     WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON  ,
     0, 0, 0, 0,
     hwnd, (HMENU)ID_RADIOBTN1,
     GetModuleHandle(NULL), 0);
  SendMessage(radioBtnDaily, WM_SETFONT, (WPARAM) font, TRUE);
  
  radio2 = CreateWindowExW(WS_EX_TRANSPARENT  , L"BUTTON", L"RadioButton2",
     WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON  ,
     0, 0, 0, 0,
     hwnd, (HMENU)ID_RADIOBTN2,
     GetModuleHandle(NULL), 0);
  
  SendMessage(radio1, BM_SETCHECK , (WPARAM) font, TRUE);
  SendMessage(radio2,  WM_SETFONT, (WPARAM) font, TRUE);
  </code></pre>
  
  <p>And I handle the check state, something like this:</p>
  
  <pre><code>case WM_COMMAND:
      switch(LOWORD(wParam))
      {   
          case ID_RADIOBTN1:
          {
              MessageBoxW( NULL, "radio1 is checked", L"radio", MB_OK | MB_ICONERROR );
          }
          break;
  
          case ID_RADIOBTN2:
          {
          MessageBoxW( NULL, "radio2 is checked", L"radio", MB_OK | MB_ICONERROR );
          }
          break;
          ....
  </code></pre>
  
  <p>But this always run when I click the radiobutton so it not check the state.
  How to check the state without use the click event?</p>