Code Monkey home page Code Monkey logo

win32windowtemplatec's Introduction

Win32 Window Template C (x64, C17)

  • created with Visual Studio 2022 Community
  • configured for x64
  • Unicode (default) and ASCII compatible (e.g. using WNDCLASSEX macro instead of WNDCLASSEXA or WNDCLASSEXW directly)
  • with basic error logging (GetLastError and OutputDebugString)
  • DPI awareness: None

Using this template you will get the following window on Windows 10 (without the gradient background color surrounding the window).

preview hello world window

Info

If this Visual Studio Solution is copied as a starting point for a new project some files should be changed:

  • Win32WindowTemplateC.sln
  • Win32WindowTemplateC.vcxproj

The file Win32WindowTemplateC.sln defines a Guid (Wikipedia link) for the project which is 5041EAA9-76E3-40F5-968F-77DDE7A7116F. You should consider replacing all occurrences of the Guid 5041EAA9-76E3-40F5-968F-77DDE7A7116F with a fresh Guid.

Show Project Guid locations on GitHub Search

If the name of the solution and the project should be changed from Win32WindowTemplate to NewSolutionAndProjectName the following files and folder need to be changed:

File content changes:

  • Win32WindowTemplateC.sln
  • Win32WindowTemplateC/Win32WindowTemplateC.vcxproj

Show Win32WindowTemplateC file content occurrences on GitHub Search

File or folder renames:

  • Win32WindowTemplateC.sln
  • Win32WindowTemplateC (the project folder)
  • Win32WindowTemplateC/Win32WindowTemplateC.vcxproj
  • Win32WindowTemplateC/Win32WindowTemplateC.vcxproj.filters

Alternatively you can just create a new Visual Studio Solution and Project and copy the files main.c and error.c in your new project. If you do this do not forget to set the version of the C compiler (e.g. C17) in your Project Properties -> Configuration Properties -> General -> C Language Standard and also set Project Properties -> Configuration Properties -> Linker -> System -> SubSystem to Windows (/SUBSYSTEM:WINDOWS).

Create a fresh Guid on Windows

  • Visual Studio 2022 (Community) is installed
  • type x64 Native Tools Command Prompt for VS 2022 in the windows start menu search
  • open x64 Native Tools Command Prompt for VS 2022
  • type cd Common7\Tools and hit enter
  • type guidgen.exe and hit enter
  • the guidgen program opens a new window with the title Create GUID
  • select Guid Format 6. <Guid("xxxxxxx-xxxx ... xxxx")>
  • click on the button New GUID
  • click on the button Copy
  • you now have a fresh Guid in the clipboard
  • paste it in for example notepad
  • notepad should show something like this <Guid("8B5CB3D0-6CF4-4CF6-98D8-2BB8EE6AB4ED")>
  • copy the Guid between the "" -> 8B5CB3D0-6CF4-4CF6-98D8-2BB8EE6AB4ED
  • (optional) now you can replace all occurrences of 5041EAA9-76E3-40F5-968F-77DDE7A7116F with your-fresh-guid as described in Info

win32windowtemplatec's People

Contributors

adotspooner avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.