Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.8 KiB

  1. // sol.cpp : Defines the entry point for the application.
  2. //
  3. #include "stdafx.h"
  4. #include "resource.h"
  5. #include "CApplicationWindow.h"
  6. #include "CFileWindow.h"
  7. #define MAX_LOADSTRING 100
  8. // Global Variables:
  9. HINSTANCE g_hInstance; // current instance
  10. DWORD g_nComponentFilters = 0;
  11. LPTSTR g_pszFilters = NULL;
  12. BOOL *g_pfSelectedComponent = NULL;
  13. BOOL g_fNetworkName = FALSE;
  14. BOOL g_fGenericService = FALSE;
  15. BOOL g_fPhysicalDisk = FALSE;
  16. BOOL g_fIPAddress = FALSE;
  17. BOOL g_fGenericApplication = FALSE;
  18. BOOL g_fFileShare = FALSE;
  19. BOOL g_fResourceNoise = FALSE;
  20. BOOL g_fShowServerNames = FALSE;
  21. HFONT g_hFont = NULL;
  22. HWND g_hwndFind = NULL;
  23. int APIENTRY
  24. WinMain(
  25. HINSTANCE hInstance,
  26. HINSTANCE hPrevInstance,
  27. LPSTR lpCmdLine,
  28. int nCmdShow)
  29. {
  30. // TODO: Place code here.
  31. MSG msg;
  32. HACCEL hAccelTable;
  33. CApplicationWindow *pApp;
  34. LOGFONT logFont;
  35. // Initialize global strings
  36. g_hInstance = hInstance; // Store instance handle in our global variable
  37. // Just the font
  38. ZeroMemory( &logFont, sizeof(logFont) );
  39. logFont.lfHeight = 10;
  40. logFont.lfWeight = FW_NORMAL;
  41. logFont.lfCharSet = DEFAULT_CHARSET;
  42. logFont.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
  43. strcpy( logFont.lfFaceName, TEXT("Courier") );
  44. g_hFont = CreateFontIndirect( &logFont );
  45. if ( g_hFont == NULL )
  46. return GetLastError( );
  47. pApp = new CApplicationWindow( );
  48. if ( !pApp ) return -1;
  49. hAccelTable = LoadAccelerators( hInstance, (LPCTSTR)IDC_SOL );
  50. // Main message loop:
  51. while ( GetMessage( &msg, NULL, 0, 0 ) )
  52. {
  53. if ( !IsDialogMessage( g_hwndFind, &msg ) )
  54. {
  55. TranslateMessage( &msg );
  56. DispatchMessage( &msg );
  57. }
  58. }
  59. DeleteObject( g_hFont );
  60. return (int)msg.wParam;
  61. }