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