├── App.ico ├── .gitignore ├── Globals.h ├── AboutDlg.h ├── MainWnd.h ├── Resource.h ├── AboutDlg.c ├── License.txt ├── WinMain.c ├── MainWnd.c ├── Resource.rc ├── Readme.md └── W32sApp.mak /App.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TransmissionZero/Win32s-Example-Application/HEAD/App.ico -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore compiler output 2 | /WinDebug 3 | /WinRel 4 | 5 | # Ignore Visual C++ files 6 | *.aps 7 | *.vcp 8 | -------------------------------------------------------------------------------- /Globals.h: -------------------------------------------------------------------------------- 1 | #ifndef GLOBALS_H 2 | #define GLOBALS_H 3 | 4 | #include 5 | 6 | /* Global instance handle */ 7 | extern HINSTANCE g_hInstance; 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /AboutDlg.h: -------------------------------------------------------------------------------- 1 | #ifndef ABOUTDIALOG_H 2 | #define ABOUTDIALOG_H 3 | 4 | #include 5 | 6 | /* Dialog procedure for our "about" dialog */ 7 | BOOL CALLBACK AboutDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 8 | 9 | /* Show our "about" dialog */ 10 | void ShowAboutDialog(HWND owner); 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /MainWnd.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | 6 | /* Window procedure for our main window */ 7 | LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); 8 | 9 | /* Register a class for our main window */ 10 | BOOL RegisterMainWindowClass(void); 11 | 12 | /* Create an instance of our main window */ 13 | HWND CreateMainWindow(void); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Resource.rc 4 | // 5 | #define IDI_APPICON 101 6 | #define IDR_MAINMENU 102 7 | #define IDR_ACCELERATOR 103 8 | #define IDD_ABOUTDIALOG 104 9 | #define ID_FILE_EXIT 40001 10 | #define ID_HELP_ABOUT 40002 11 | 12 | // Next default values for new objects 13 | // 14 | #ifdef APSTUDIO_INVOKED 15 | #ifndef APSTUDIO_READONLY_SYMBOLS 16 | #define _APS_NO_MFC 1 17 | #define _APS_NEXT_RESOURCE_VALUE 105 18 | #define _APS_NEXT_COMMAND_VALUE 40003 19 | #define _APS_NEXT_CONTROL_VALUE 1000 20 | #define _APS_NEXT_SYMED_VALUE 101 21 | #endif 22 | #endif 23 | -------------------------------------------------------------------------------- /AboutDlg.c: -------------------------------------------------------------------------------- 1 | #include "AboutDlg.h" 2 | #include "Globals.h" 3 | #include "Resource.h" 4 | 5 | /* Dialog procedure for our "about" dialog */ 6 | BOOL CALLBACK AboutDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) 7 | { 8 | switch (uMsg) 9 | { 10 | case WM_COMMAND: 11 | { 12 | WORD id = LOWORD(wParam); 13 | 14 | switch (id) 15 | { 16 | case IDOK: 17 | case IDCANCEL: 18 | { 19 | EndDialog(hwndDlg, id); 20 | return TRUE; 21 | } 22 | } 23 | break; 24 | } 25 | 26 | case WM_INITDIALOG: 27 | { 28 | return TRUE; 29 | } 30 | } 31 | 32 | return FALSE; 33 | } 34 | 35 | /* Show our "about" dialog */ 36 | void ShowAboutDialog(HWND owner) 37 | { 38 | DialogBox(g_hInstance, MAKEINTRESOURCE(IDD_ABOUTDIALOG), owner, &AboutDialogProc); 39 | } 40 | -------------------------------------------------------------------------------- /License.txt: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to -------------------------------------------------------------------------------- /WinMain.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "Globals.h" 3 | #include "MainWnd.h" 4 | #include "Resource.h" 5 | 6 | /* Global instance handle */ 7 | HINSTANCE g_hInstance = NULL; 8 | 9 | /* Our application entry point */ 10 | int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) 11 | { 12 | HWND hWnd; 13 | HACCEL hAccelerators; 14 | MSG msg; 15 | 16 | /* Assign global HINSTANCE */ 17 | g_hInstance = hInstance; 18 | 19 | /* Register our main window class, or error */ 20 | if (!RegisterMainWindowClass()) 21 | { 22 | MessageBox(NULL, TEXT("Error registering main window class."), TEXT("Error"), MB_ICONHAND | MB_OK); 23 | return 0; 24 | } 25 | 26 | /* Create our main window, or error */ 27 | if (!(hWnd = CreateMainWindow())) 28 | { 29 | MessageBox(NULL, TEXT("Error creating main window."), TEXT("Error"), MB_ICONHAND | MB_OK); 30 | return 0; 31 | } 32 | 33 | /* Load accelerators */ 34 | hAccelerators = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDR_ACCELERATOR)); 35 | 36 | /* Show main window and force a paint */ 37 | ShowWindow(hWnd, nCmdShow); 38 | UpdateWindow(hWnd); 39 | 40 | /* Main message loop */ 41 | while (GetMessage(&msg, NULL, 0, 0) > 0) 42 | { 43 | if (!TranslateAccelerator(hWnd, hAccelerators, &msg)) 44 | { 45 | TranslateMessage(&msg); 46 | DispatchMessage(&msg); 47 | } 48 | } 49 | 50 | return (int)msg.wParam; 51 | } 52 | -------------------------------------------------------------------------------- /MainWnd.c: -------------------------------------------------------------------------------- 1 | #include "AboutDlg.h" 2 | #include "Globals.h" 3 | #include "MainWnd.h" 4 | #include "Resource.h" 5 | 6 | /* Main window class and title */ 7 | static LPCTSTR MainWndClass = TEXT("Win32s Example Application"); 8 | 9 | /* Window procedure for our main window */ 10 | LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) 11 | { 12 | switch (msg) 13 | { 14 | case WM_COMMAND: 15 | { 16 | WORD id = LOWORD(wParam); 17 | 18 | switch (id) 19 | { 20 | case ID_HELP_ABOUT: 21 | { 22 | ShowAboutDialog(hWnd); 23 | return 0; 24 | } 25 | 26 | case ID_FILE_EXIT: 27 | { 28 | DestroyWindow(hWnd); 29 | return 0; 30 | } 31 | } 32 | break; 33 | } 34 | 35 | case WM_GETMINMAXINFO: 36 | { 37 | /* Prevent our window from being sized too small */ 38 | MINMAXINFO *minMax = (MINMAXINFO*)lParam; 39 | minMax->ptMinTrackSize.x = 220; 40 | minMax->ptMinTrackSize.y = 110; 41 | 42 | return 0; 43 | } 44 | 45 | /* Item from system menu has been invoked */ 46 | case WM_SYSCOMMAND: 47 | { 48 | WORD id = LOWORD(wParam); 49 | 50 | switch (id) 51 | { 52 | /* Show "about" dialog on about system menu item */ 53 | case ID_HELP_ABOUT: 54 | { 55 | ShowAboutDialog(hWnd); 56 | return 0; 57 | } 58 | } 59 | break; 60 | } 61 | 62 | case WM_DESTROY: 63 | { 64 | PostQuitMessage(0); 65 | return 0; 66 | } 67 | } 68 | 69 | return DefWindowProc(hWnd, msg, wParam, lParam); 70 | } 71 | 72 | /* Register a class for our main window */ 73 | BOOL RegisterMainWindowClass() 74 | { 75 | WNDCLASS wc; 76 | 77 | /* Class for our main window */ 78 | wc.style = 0; 79 | wc.lpfnWndProc = &MainWndProc; 80 | wc.cbClsExtra = 0; 81 | wc.cbWndExtra = 0; 82 | wc.hInstance = g_hInstance; 83 | wc.hIcon = LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_APPICON)); 84 | wc.hCursor = LoadCursor(NULL, IDC_ARROW); 85 | wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); 86 | wc.lpszMenuName = MAKEINTRESOURCE(IDR_MAINMENU); 87 | wc.lpszClassName = MainWndClass; 88 | 89 | return (RegisterClass(&wc)) ? TRUE : FALSE; 90 | } 91 | 92 | /* Create an instance of our main window */ 93 | HWND CreateMainWindow() 94 | { 95 | /* Create instance of main window */ 96 | HWND hWnd = CreateWindowEx(0, MainWndClass, MainWndClass, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 320, 200, 97 | NULL, NULL, g_hInstance, NULL); 98 | 99 | if (hWnd) 100 | { 101 | /* Add "about" to the system menu */ 102 | HMENU hSysMenu = GetSystemMenu(hWnd, FALSE); 103 | InsertMenu(hSysMenu, 5, MF_BYPOSITION | MF_SEPARATOR, 0, NULL); 104 | InsertMenu(hSysMenu, 6, MF_BYPOSITION, ID_HELP_ABOUT, TEXT("About")); 105 | } 106 | 107 | return hWnd; 108 | } 109 | -------------------------------------------------------------------------------- /Resource.rc: -------------------------------------------------------------------------------- 1 | //Microsoft Visual C++ generated resource script. 2 | // 3 | #include "Resource.h" 4 | 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | ///////////////////////////////////////////////////////////////////////////// 7 | // 8 | // Generated from the TEXTINCLUDE 2 resource. 9 | // 10 | #include "afxres.h" 11 | 12 | ///////////////////////////////////////////////////////////////////////////// 13 | #undef APSTUDIO_READONLY_SYMBOLS 14 | 15 | 16 | #ifdef APSTUDIO_INVOKED 17 | ///////////////////////////////////////////////////////////////////////////// 18 | // 19 | // TEXTINCLUDE 20 | // 21 | 22 | 1 TEXTINCLUDE DISCARDABLE 23 | BEGIN 24 | "Resource.h\0" 25 | END 26 | 27 | 2 TEXTINCLUDE DISCARDABLE 28 | BEGIN 29 | "#include ""afxres.h""\r\n" 30 | "\0" 31 | END 32 | 33 | 3 TEXTINCLUDE DISCARDABLE 34 | BEGIN 35 | "\r\n" 36 | "\0" 37 | END 38 | 39 | ///////////////////////////////////////////////////////////////////////////// 40 | #endif // APSTUDIO_INVOKED 41 | 42 | 43 | ///////////////////////////////////////////////////////////////////////////// 44 | // 45 | // Icon 46 | // 47 | 48 | IDI_APPICON ICON DISCARDABLE "App.ico" 49 | 50 | ///////////////////////////////////////////////////////////////////////////// 51 | // 52 | // Menu 53 | // 54 | 55 | IDR_MAINMENU MENU DISCARDABLE 56 | BEGIN 57 | POPUP "&File" 58 | BEGIN 59 | MENUITEM "E&xit", ID_FILE_EXIT 60 | END 61 | POPUP "&Help" 62 | BEGIN 63 | MENUITEM "&About", ID_HELP_ABOUT 64 | END 65 | END 66 | 67 | 68 | ///////////////////////////////////////////////////////////////////////////// 69 | // 70 | // Version 71 | // 72 | 73 | VS_VERSION_INFO VERSIONINFO 74 | FILEVERSION 1,0,0,0 75 | PRODUCTVERSION 1,0,0,0 76 | FILEFLAGSMASK 0x3fL 77 | #ifdef _DEBUG 78 | FILEFLAGS 0x1L 79 | #else 80 | FILEFLAGS 0x0L 81 | #endif 82 | FILEOS 0x40004L 83 | FILETYPE 0x1L 84 | FILESUBTYPE 0x0L 85 | BEGIN 86 | BLOCK "StringFileInfo" 87 | BEGIN 88 | BLOCK "080904b0" 89 | BEGIN 90 | VALUE "CompanyName", "Transmission Zero\0" 91 | VALUE "FileDescription", "Win32s Example Application\0" 92 | VALUE "FileVersion", "1.0.0.0\0" 93 | VALUE "InternalName", "Win32sApp\0" 94 | VALUE "LegalCopyright", "\2512017 Transmission Zero\0" 95 | VALUE "OriginalFilename", "Win32sApp.exe\0" 96 | VALUE "ProductName", " Win32s Example Application\0" 97 | VALUE "ProductVersion", "1.0.0.0\0" 98 | END 99 | END 100 | BLOCK "VarFileInfo" 101 | BEGIN 102 | VALUE "Translation", 0x809, 1200 103 | END 104 | END 105 | 106 | 107 | 108 | ///////////////////////////////////////////////////////////////////////////// 109 | // 110 | // Dialog 111 | // 112 | 113 | IDD_ABOUTDIALOG DIALOG DISCARDABLE 0, 0, 147, 67 114 | STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU 115 | CAPTION "About" 116 | FONT 8, "MS Sans Serif" 117 | BEGIN 118 | ICON IDI_APPICON,IDC_STATIC,7,7,18,20 119 | LTEXT "Win32s Example Application",IDC_STATIC,34,7,93,8 120 | LTEXT "\2512017 Transmission Zero",IDC_STATIC,34,17,86,8 121 | DEFPUSHBUTTON "OK",IDOK,90,46,50,14,WS_GROUP 122 | END 123 | 124 | 125 | ///////////////////////////////////////////////////////////////////////////// 126 | // 127 | // Accelerator 128 | // 129 | 130 | IDR_ACCELERATOR ACCELERATORS DISCARDABLE 131 | BEGIN 132 | "A", ID_HELP_ABOUT, VIRTKEY, ALT, NOINVERT 133 | END 134 | 135 | 136 | #ifndef APSTUDIO_INVOKED 137 | ///////////////////////////////////////////////////////////////////////////// 138 | // 139 | // Generated from the TEXTINCLUDE 3 resource. 140 | // 141 | 142 | 143 | ///////////////////////////////////////////////////////////////////////////// 144 | #endif // not APSTUDIO_INVOKED 145 | 146 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | # Win32s Example Application 2 | 3 | ## Table of Contents 4 | 5 | - [Introduction](#introduction) 6 | - [Building the Application](#building-the-application) 7 | - [Visual C++ and Win32s Compatibility](#visual-c-crts-and-win32s-compatibility) 8 | - [Display Quirks with Visual C++ 2.x](#display-quirks-with-visual-c-2x) 9 | - [Terms of Use](#terms-of-use) 10 | - [Problems?](#problems) 11 | - [Changelog](#changelog) 12 | 13 | ## Introduction 14 | 15 | This application is an example Windows GUI application, written to demonstrate how to target 16 | [Win32s](https://en.wikipedia.org/wiki/Win32s). It is based on the 17 | [MSVC Win32 Application](https://github.com/TransmissionZero/MSVC-Win32-Application), but is stripped down to ensure it 18 | only uses Win32 API which are present in Win32s and Windows NT 3.1. The provided project file is for Visual C++ 2.x. You 19 | can [downloaded Visual C++ 2.0](https://my.visualstudio.com/Downloads?pid=141) if you have a Visual Studio Subscription. 20 | 21 | If you are not trying to produce a Win32s application, you are advised to use the 22 | [MSVC Win32 Application](https://github.com/TransmissionZero/MSVC-Win32-Application) instead. That makes use of more 23 | modern Windows features such a visual styles and Unicode, and can be compiled as a 64 bit application without source 24 | code modifications. 25 | 26 | ## Building The Application 27 | 28 | To build the application using the IDE, open the Makefile in Visual C++ 2.x, choose the debug or release build from the 29 | drop-down menu, and use the "build" button. 30 | 31 | To build the application from the command prompt, ensure the Visual C++ "bin" directory is added to the %PATH% 32 | environment variable, "include" directory is added to the %INCLUDE% environment variable, and "lib" directory is added 33 | to the %LIB% environment variable. Once the environment is configured, type one of the following (as appropriate for a 34 | debug or release build): 35 | 36 | ``` 37 | nmake /f W32sApp.mak "CFG=Win32 Debug" 38 | nmake /f W32sApp.mak "CFG=Win32 Release" 39 | ``` 40 | 41 | Building from the command line works with many other versions of Visual C++ / Visual Studio too, but you may get 42 | warnings about unknown or deprecated command line options, and you won't get a Win32s compatible executable unless you 43 | use a version of Visual C++ which supports Win32s. 44 | 45 | It should also be possible to build the application using any C or C++ compiler which supports targeting Win32s. You 46 | will of course need to set the projects up for yourself if you do that. Open Watcom does claim to support Win32s, but I 47 | haven't had any success in getting it to produce an application which works with Win32s. 48 | 49 | ## Visual C++, CRTs, and Win32s Compatibility 50 | 51 | The only versions of Visual C++ to officially support Win32s are versions 1.0 (32 bit) to 4.1. Versions 4.2 onwards do 52 | not support Win32s. Additionally, there are a number of different CRT DLLs, and you need to be careful to link against 53 | and distribute the correct DLLs with your application: 54 | 55 | - MSVCRT10.DLL: This is the Visual C++ 1.0 (32 bit) CRT DLL. It does not support Win32s. 56 | - MSVCRT20.DLL: This is the Visual C++ 2.x CRT DLL. There are separate Win32s and Windows NT / 9x versions. The Win32s 57 | version does not work on NT / 9x, and the NT / 9x version does not work on Win32s, so you need to be careful to deploy 58 | the correct version! 59 | - MSVCRT40.DLL: This is the Visual C++ 4.0 and 4.1 CRT DLL (but not Visual C++ 4.2!). As with MSVCRT20.DLL, you must be 60 | careful as there are separate Win32s and NT / 9x versions. 61 | - CRTDLL.DLL: This is not a redistributable DLL, but is present in Win32s and all x86 and x64 versions of Windows. 62 | Applications can link against it by using the "CRTDLL.LIB" import library which can be found in the Windows NT 3.x 63 | SDK. 64 | 65 | Therefore it is recommended you use the Windows NT 3.x SDK if you have it as it will save you a lot of deployment 66 | trouble. If you are using Visual C++ (32 bit), then this SDK is your only option for producing Win32s applications. 67 | Unfortunately, Windows NT 3.x SDKs are not available through Visual Studio subscriptions. 68 | 69 | Although Visual C++ 4.2 and 5.0 don't officially support Win32s, you can still produce Win32s executables if you link 70 | against `crtdll.lib` using the Windows NT 3.x SDK. In the case of Visual C++ 5.0, it is necessary to add the `/FIXED:NO` 71 | linker option, as this version of the linker doesn't generate relocations by default. Visual C++ 6.0 onwards can't 72 | produce Win32s compatible applications without a lot of fiddling with linker options, and that results in very large 73 | executables due to disabling numerous linker optimisations. Trying to build a Win32s executable with Visual C++ 6.0 or 74 | later probably isn't worth the effort. 75 | 76 | ## Display Quirks with Visual C++ 2.x 77 | 78 | An interesting point is that Visual C++ 2.x produces executables which target a minimum Windows version of 3.10 79 | (specified in the executable's PE header), whereas Visual C++ 4.x targets a minimum version of 4.00 (i.e. Windows NT 4 80 | and Windows 95). This is mostly of little significance, but Windows 3.x applications look slightly different from 81 | Windows 4.x applications in Windows NT 3.5x and later. The dialogs are larger, have a white background, and have bold 82 | text. Windows looks at the executable's PE header and applies the "DS_3DLOOK" style to dialogs automatically if the 83 | susbsystem version is 4.00 or later, regardless of whether the dialog template specifies this style. You can see this 84 | for yourself by running `editbin /SUBSYSTEM:WINDOWS,3.10` or `editbin /SUBSYSTEM:WINDOWS,4.00` on a copy of the 85 | executable and comparing how the dialogs look. 86 | 87 | ## Terms of Use 88 | 89 | Refer to "License.txt" for terms of use. 90 | 91 | ## Problems? 92 | 93 | If you have any problems or questions, please ensure you have read this readme file. If you are still having trouble, 94 | you can [get in contact](http://www.transmissionzero.co.uk/contact/). 95 | 96 | ## Changelog 97 | 98 | 1. 2017-05-28: Version 1.0 99 | - Initial release. 100 | 101 | Transmission Zero 102 | 2017-05-28 103 | -------------------------------------------------------------------------------- /W32sApp.mak: -------------------------------------------------------------------------------- 1 | # Microsoft Visual C++ Generated NMAKE File, Format Version 2.00 2 | # ** DO NOT EDIT ** 3 | 4 | # TARGTYPE "Win32 (x86) Application" 0x0101 5 | 6 | !IF "$(CFG)" == "" 7 | CFG=Win32 Debug 8 | !MESSAGE No configuration specified. Defaulting to Win32 Debug. 9 | !ENDIF 10 | 11 | !IF "$(CFG)" != "Win32 Release" && "$(CFG)" != "Win32 Debug" 12 | !MESSAGE Invalid configuration "$(CFG)" specified. 13 | !MESSAGE You can specify a configuration when running NMAKE on this makefile 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "W32sApp.mak" CFG="Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "Win32 Release" (based on "Win32 (x86) Application") 21 | !MESSAGE "Win32 Debug" (based on "Win32 (x86) Application") 22 | !MESSAGE 23 | !ERROR An invalid configuration is specified. 24 | !ENDIF 25 | 26 | ################################################################################ 27 | # Begin Project 28 | # PROP Target_Last_Scanned "Win32 Debug" 29 | MTL=MkTypLib.exe 30 | CPP=cl.exe 31 | RSC=rc.exe 32 | 33 | !IF "$(CFG)" == "Win32 Release" 34 | 35 | # PROP BASE Use_MFC 0 36 | # PROP BASE Use_Debug_Libraries 0 37 | # PROP BASE Output_Dir "WinRel" 38 | # PROP BASE Intermediate_Dir "WinRel" 39 | # PROP Use_MFC 0 40 | # PROP Use_Debug_Libraries 0 41 | # PROP Output_Dir "WinRel" 42 | # PROP Intermediate_Dir "WinRel" 43 | OUTDIR=.\WinRel 44 | INTDIR=.\WinRel 45 | 46 | ALL : $(OUTDIR)/W32sApp.exe $(OUTDIR)/W32sApp.bsc 47 | 48 | $(OUTDIR) : 49 | if not exist $(OUTDIR)/nul mkdir $(OUTDIR) 50 | 51 | # ADD BASE MTL /nologo /D "NDEBUG" /win32 52 | # ADD MTL /nologo /D "NDEBUG" /win32 53 | MTL_PROJ=/nologo /D "NDEBUG" /win32 54 | # ADD BASE CPP /nologo /W3 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR /c 55 | # ADD CPP /nologo /MD /W3 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR /c 56 | CPP_PROJ=/nologo /MD /W3 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\ 57 | /FR$(INTDIR)/ /Fp$(OUTDIR)/"W32sApp.pch" /Fo$(INTDIR)/ /c 58 | CPP_OBJS=.\WinRel/ 59 | # ADD BASE RSC /l 0x809 /d "NDEBUG" 60 | # ADD RSC /l 0x809 /d "NDEBUG" 61 | RSC_PROJ=/l 0x809 /fo$(INTDIR)/"Resource.res" /d "NDEBUG" 62 | BSC32=bscmake.exe 63 | # ADD BASE BSC32 /nologo 64 | # ADD BSC32 /nologo 65 | BSC32_FLAGS=/nologo /o$(OUTDIR)/"W32sApp.bsc" 66 | BSC32_SBRS= \ 67 | $(INTDIR)/WinMain.sbr \ 68 | $(INTDIR)/AboutDlg.sbr \ 69 | $(INTDIR)/MainWnd.sbr 70 | 71 | $(OUTDIR)/W32sApp.bsc : $(OUTDIR) $(BSC32_SBRS) 72 | $(BSC32) @<< 73 | $(BSC32_FLAGS) $(BSC32_SBRS) 74 | << 75 | 76 | LINK32=link.exe 77 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /NOLOGO /SUBSYSTEM:windows /MACHINE:I386 78 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /NOLOGO /SUBSYSTEM:windows /MACHINE:I386 79 | # SUBTRACT LINK32 /NODEFAULTLIB 80 | LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ 81 | advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ 82 | odbccp32.lib /NOLOGO /SUBSYSTEM:windows /INCREMENTAL:no\ 83 | /PDB:$(OUTDIR)/"W32sApp.pdb" /MACHINE:I386 /OUT:$(OUTDIR)/"W32sApp.exe" 84 | DEF_FILE= 85 | LINK32_OBJS= \ 86 | $(INTDIR)/WinMain.obj \ 87 | $(INTDIR)/Resource.res \ 88 | $(INTDIR)/AboutDlg.obj \ 89 | $(INTDIR)/MainWnd.obj 90 | 91 | $(OUTDIR)/W32sApp.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS) 92 | $(LINK32) @<< 93 | $(LINK32_FLAGS) $(LINK32_OBJS) 94 | << 95 | 96 | !ELSEIF "$(CFG)" == "Win32 Debug" 97 | 98 | # PROP BASE Use_MFC 0 99 | # PROP BASE Use_Debug_Libraries 1 100 | # PROP BASE Output_Dir "WinDebug" 101 | # PROP BASE Intermediate_Dir "WinDebug" 102 | # PROP Use_MFC 0 103 | # PROP Use_Debug_Libraries 1 104 | # PROP Output_Dir "WinDebug" 105 | # PROP Intermediate_Dir "WinDebug" 106 | OUTDIR=.\WinDebug 107 | INTDIR=.\WinDebug 108 | 109 | ALL : $(OUTDIR)/W32sApp.exe $(OUTDIR)/W32sApp.bsc 110 | 111 | $(OUTDIR) : 112 | if not exist $(OUTDIR)/nul mkdir $(OUTDIR) 113 | 114 | # ADD BASE MTL /nologo /D "_DEBUG" /win32 115 | # ADD MTL /nologo /D "_DEBUG" /win32 116 | MTL_PROJ=/nologo /D "_DEBUG" /win32 117 | # ADD BASE CPP /nologo /W3 /GX /Zi /YX /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /c 118 | # ADD CPP /nologo /MD /W3 /GX /Zi /YX /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /c 119 | CPP_PROJ=/nologo /MD /W3 /GX /Zi /YX /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS"\ 120 | /FR$(INTDIR)/ /Fp$(OUTDIR)/"W32sApp.pch" /Fo$(INTDIR)/\ 121 | /Fd$(OUTDIR)/"W32sApp.pdb" /c 122 | CPP_OBJS=.\WinDebug/ 123 | # ADD BASE RSC /l 0x809 /d "_DEBUG" 124 | # ADD RSC /l 0x809 /d "_DEBUG" 125 | RSC_PROJ=/l 0x809 /fo$(INTDIR)/"Resource.res" /d "_DEBUG" 126 | BSC32=bscmake.exe 127 | # ADD BASE BSC32 /nologo 128 | # ADD BSC32 /nologo 129 | BSC32_FLAGS=/nologo /o$(OUTDIR)/"W32sApp.bsc" 130 | BSC32_SBRS= \ 131 | $(INTDIR)/WinMain.sbr \ 132 | $(INTDIR)/AboutDlg.sbr \ 133 | $(INTDIR)/MainWnd.sbr 134 | 135 | $(OUTDIR)/W32sApp.bsc : $(OUTDIR) $(BSC32_SBRS) 136 | $(BSC32) @<< 137 | $(BSC32_FLAGS) $(BSC32_SBRS) 138 | << 139 | 140 | LINK32=link.exe 141 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /NOLOGO /SUBSYSTEM:windows /DEBUG /MACHINE:I386 142 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /NOLOGO /SUBSYSTEM:windows /DEBUG /MACHINE:I386 143 | # SUBTRACT LINK32 /NODEFAULTLIB 144 | LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ 145 | advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ 146 | odbccp32.lib /NOLOGO /SUBSYSTEM:windows /INCREMENTAL:yes\ 147 | /PDB:$(OUTDIR)/"W32sApp.pdb" /DEBUG /MACHINE:I386 /OUT:$(OUTDIR)/"W32sApp.exe" 148 | DEF_FILE= 149 | LINK32_OBJS= \ 150 | $(INTDIR)/WinMain.obj \ 151 | $(INTDIR)/Resource.res \ 152 | $(INTDIR)/AboutDlg.obj \ 153 | $(INTDIR)/MainWnd.obj 154 | 155 | $(OUTDIR)/W32sApp.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS) 156 | $(LINK32) @<< 157 | $(LINK32_FLAGS) $(LINK32_OBJS) 158 | << 159 | 160 | !ENDIF 161 | 162 | .c{$(CPP_OBJS)}.obj: 163 | $(CPP) $(CPP_PROJ) $< 164 | 165 | .cpp{$(CPP_OBJS)}.obj: 166 | $(CPP) $(CPP_PROJ) $< 167 | 168 | .cxx{$(CPP_OBJS)}.obj: 169 | $(CPP) $(CPP_PROJ) $< 170 | 171 | ################################################################################ 172 | # Begin Group "Source Files" 173 | 174 | ################################################################################ 175 | # Begin Source File 176 | 177 | SOURCE=.\WinMain.c 178 | DEP_WINMA=\ 179 | .\Globals.h\ 180 | .\MainWnd.h 181 | 182 | $(INTDIR)/WinMain.obj : $(SOURCE) $(DEP_WINMA) $(INTDIR) 183 | 184 | # End Source File 185 | ################################################################################ 186 | # Begin Source File 187 | 188 | SOURCE=.\Resource.rc 189 | DEP_RESOU=\ 190 | .\App.ico 191 | 192 | $(INTDIR)/Resource.res : $(SOURCE) $(DEP_RESOU) $(INTDIR) 193 | $(RSC) $(RSC_PROJ) $(SOURCE) 194 | 195 | # End Source File 196 | ################################################################################ 197 | # Begin Source File 198 | 199 | SOURCE=.\AboutDlg.c 200 | DEP_ABOUT=\ 201 | .\AboutDlg.h\ 202 | .\Globals.h 203 | 204 | $(INTDIR)/AboutDlg.obj : $(SOURCE) $(DEP_ABOUT) $(INTDIR) 205 | 206 | # End Source File 207 | ################################################################################ 208 | # Begin Source File 209 | 210 | SOURCE=.\MainWnd.c 211 | DEP_MAINW=\ 212 | .\AboutDlg.h\ 213 | .\Globals.h\ 214 | .\MainWnd.h 215 | 216 | $(INTDIR)/MainWnd.obj : $(SOURCE) $(DEP_MAINW) $(INTDIR) 217 | 218 | # End Source File 219 | # End Group 220 | # End Project 221 | ################################################################################ 222 | --------------------------------------------------------------------------------