title: Change the default window font in a Win32 Windows project
body: <p>I am creating a GUI application using C and Win32 api. I would like to know how we can change the default font of the Main window to thaoma. I am comming from .NET background. In .NET if we change the font of parent control then automatically the child controls inherits that font....
  Is there away similar to it or do we need to manually set the font of each control.....</p>
  
  <p>Consider the following code...</p>
  
  <pre><code>#include &lt;windows.h&gt;
  
  #define ID_EDIT 1
  #define ID_BUTTON 2
  
  LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
  {
  
    static HWND hwndEdit;
    static HWND hwndButton;
    static int len;
    static TCHAR text[30];
  
  
    switch(msg)
    {
      case WM_CREATE:
      hwndEdit = CreateWindow(TEXT("Edit"), NULL, WS_CHILD | WS_VISIBLE | WS_BORDER,
                  50, 50, 150, 20, hwnd, (HMENU) ID_EDIT,
                  NULL, NULL);
  
      hwndButton = CreateWindow(
          TEXT("button"), TEXT("Set Title"),       
          WS_VISIBLE | WS_CHILD,  
          50, 100, 80, 25,        
          hwnd, (HMENU) ID_BUTTON, NULL, NULL);      
  
      break;
  
  
      case WM_DESTROY:
          PostQuitMessage(0);
      break;
    }
    return DefWindowProc(hwnd, msg, wParam, lParam);
  }
  
  int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
              LPSTR lpCmdLine, int nCmdShow )
  {
    MSG  msg ;    
    WNDCLASS wc = {0};
    wc.lpszClassName = TEXT( "Edit Control" );
    wc.hInstance     = hInstance ;
    wc.hbrBackground = GetSysColorBrush(COLOR_3DFACE);
    wc.lpfnWndProc   = WndProc ;
    wc.hCursor       = LoadCursor(0,IDC_ARROW);
  
  
    RegisterClass(&amp;wc);
    CreateWindow( wc.lpszClassName, TEXT("Edit control"),
                  WS_OVERLAPPEDWINDOW | WS_VISIBLE,
                  220, 220, 280, 200, 0, 0, hInstance, 0);  
  
    while( GetMessage(&amp;msg, NULL, 0, 0)) {
      TranslateMessage(&amp;msg);
      DispatchMessage(&amp;msg);
    }
    return (int) msg.wParam;
  }
  </code></pre>
  
  <p>How can i change the font of button, textbox in the above program..</p>
  
  <p>Please help me here.......and let me know the general process followed while coding in win32 api....</p>
  
  <p>THanks in advance..</p>