Home | History | Annotate | Download | only in rc-build
      1 // Copyright (c) 2012 Google Inc. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #define WIN32_LEAN_AND_MEAN
      6 #include <windows.h>
      7 #include <tchar.h>
      8 
      9 #include "resource.h"
     10 
     11 #define MAX_LOADSTRING 100
     12 
     13 TCHAR szTitle[MAX_LOADSTRING];
     14 TCHAR szWindowClass[MAX_LOADSTRING];
     15 
     16 int APIENTRY _tWinMain(
     17     HINSTANCE hInstance,
     18     HINSTANCE hPrevInstance,
     19     LPTSTR    lpCmdLine,
     20     int       nCmdShow) {
     21   // Make sure we can load some resources.
     22   int count = 0;
     23   LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
     24   if (szTitle[0] != 0) ++count;
     25   LoadString(hInstance, IDC_HELLO, szWindowClass, MAX_LOADSTRING);
     26   if (szWindowClass[0] != 0) ++count;
     27   if (LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SMALL)) != NULL) ++count;
     28   if (LoadIcon(hInstance, MAKEINTRESOURCE(IDI_HELLO)) != NULL) ++count;
     29   return count;
     30 }
     31