[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-43506-en":3,"doc-seo-43506-105":30,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":21,"is_downloadable":21,"audit_status":21,"page_count":22,"language":23,"language_code":24,"site_id":25,"html_lang":24,"table_of_contents":26,"faqs":27,"seo_title":13,"seo_description":14,"update_tm":28,"read_time":29},43506,13056703020460,"Valentina","https://ap-avatar.wpscdn.com/avatar/be000253dac470eee5d?_k=1778207105932848923",6,"Technology","Win32 API","Win32 API overview describing Microsoft Windows API components and how they provide access to Windows functionality for C/C++ applications. Covers core parts such as WinBase (kernel), WinUser (GUI), WinGDI (graphics), and common controls, plus how API versions depend on operating system requirements. Explains application entry points for console versus GUI programs, outlines basic setup for a Windows GUI project in Visual Studio, and introduces key concepts used throughout Win32 development.","Win32 API  \n\\#winapi  \nTable of Contents  \nAbout 1  \nChapter 1: Getting started with Win32 API2  \nRemarks2  \nVersions2  \nExamples2  \nHello World2  \nChapter 2: Ansi-and Wide-character functions5  \nExamples5  \nIntroduction5  \nChapter 3: Dealing with windows7  \nExamples7  \nCreating a window7  \nWhat is a handle? 10  \nConstants 10  \nWindows Types 10  \nChapter 4: Error reporting and handling 12  \nRemarks 12  \nExamples 12  \nIntroduction 12  \nError reported by return value only 12  \nError reported with additional information on failure 12  \nNotes on calling GetLastError() in other programming languages 13  \n.net languages (C\\#, VB, etc.) 13  \nGo 13  \nError reported with additional information on failure and success 14  \nError reported as HRESULT value 14  \nConverting an error code into a message string 15  \nChapter 5: File Management 17  \nExamples 17  \nCreate a file and write to it 17  \nAPI Reference: 17  \nChapter 6: Process and Thread Management 18  \nExamples 18  \nCreate a process and check its exit code 18  \nCreate a new thread 18  \nChapter 7: Utilizing MSDN Documentation20  \nIntroduction20  \nRemarks20  \nExamples20  \nTypes of Documentation Available20  \nFinding Documentation for a Feature20  \nUsing Function Documentation21  \nOverview21  \nSyntax21  \nParameters21  \nReturn Value21  \nRemarks21  \nExamples21  \nRequirements21  \nChapter 8: Window messages23  \nSyntax23  \nExamples23  \nWM_CREATE23  \nWM_DESTROY23  \nWM_CLOSE24  \nWM_SIZE24  \nWM_COMMAND25  \nChapter 9: Windows Services27  \nExamples27  \nCheck if a service is installed27  \nAPI Reference:28  \nChapter 10: Windows Subclassing29  \nIntroduction29  \nSyntax29  \nParameters29  \nRemarks29  \nExamples30  \nSubclassing windows button control within C++ class30  \nHandling common controls notification messages within C++ class31  \nCredits33  \nAbout  \nYou can share this PDF with anyone you feel could benefit from it, downloaded the latest version from: win32-api  \nIt is an unofficial and free Win32 API ebook created for educational purposes. All the content is extracted from Stack Overflow Documentation, which is written by many hardworking individuals at Stack Overflow. It is neither affiliated with Stack Overflow nor official Win32 API.  \nThe content is released under Creative Commons BY-SA, and the list of contributors to each chapter are provided in the credits section at the end of this book. Images may be copyright of their respective owners unless otherwise specified. All trademarks and registered trademarks are the property of their respective company owners.  \nUse the content presented in this book at your own risk; it is not guaranteed to be correct nor accurate, please send your feedback and corrections to [info@zzzprojects.com](info@zzzprojects.com)  \nChapter 1: Getting started with Win32 API  \nRemarks  \nWinAPI (also known as Win32; officially called the Microsoft Windows API) is an application programming interface written in C by Microsoft to allow access to Windows features. The main components of the WinAPI are:  \n• WinBase: The kernel functions, CreateFile, CreateProcess, etc  \n• WinUser: The GUI functions, CreateWindow, RegisterClass, etc  \n• WinGDI: The graphics functions, Ellipse, SelectObject, etc  \n• Common controls: Standard controls, list views, sliders, etc  \nSee Also:  \n• Windows API index on MSDN.  \nVersions  \nVersions of the API are tied to the operating system version. MSDN documentation specifies the minimum supported operating system for each function in the API.  \nExamples  \nHello World  \nMicrosoft Windows applications are usually written as either a console application or a windowed application (there are other types such as services and plug-ins) . The difference for the programmer is the difference in the interface for the main entry point for the application source provided by the programmer.  \nWhen a C or C++ application starts, the executable entry point used by the executable loader is the Runtime that is provided by the compiler. The executable loader reads in ","cbCais01ViBRoY2i","https://ap.wps.com/l/cbCais01ViBRoY2i","pdf",1009300,3,1,37,"English","en",105,"# About\n# Chapter 1: Getting started with Win32 API\n## Remarks\n## Versions\n## Examples\n# Chapter 2: Ansi-and Wide-character functions\n## Examples\n# Chapter 3: Dealing with windows\n## Creating a window\n## What is a handle?\n## Constants and Windows Types\n# Chapter 4: Error reporting and handling\n## Error reported by return value only\n## GetLastError and language notes\n## HRESULT and message conversion\n# Chapter 5: File Management\n## Create a file and write to it\n# Chapter 6: Process and Thread Management\n## Create a process and check its exit code\n## Create a new thread\n# Chapter 7: Utilizing MSDN Documentation\n## Types of documentation and function docs\n# Chapter 8: Window messages\n## WM_CREATE, WM_DESTROY, WM_CLOSE, WM_SIZE, WM_COMMAND\n# Chapter 9: Windows Services\n## Check if a service is installed\n# Chapter 10: Windows Subclassing\n## Syntax, parameters, and examples","[{\"question\":\"What is the Win32 API and what are its main components?\",\"answer\":\"WinAPI (Win32) is an API for accessing Windows features. Its main components include WinBase (kernel functions), WinUser (GUI functions), WinGDI (graphics functions), and common controls like standard controls, list views, and sliders.\"},{\"question\":\"How do console and GUI Windows applications differ for the programmer?\",\"answer\":\"The difference lies in the interface for the application’s main entry point. Console apps typically use int main or a Windows-specific int_tmain for wide characters, while GUI apps use a Windows-specific entry point such as WinMain that sets up a GUI environment.\"},{\"question\":\"Why does Win32 API version support vary across Windows versions?\",\"answer\":\"API versions are tied to operating system versions. MSDN documentation specifies the minimum supported operating system for each function, so function availability depends on the target Windows version.\"}]",1783381904,93,{"code":4,"msg":31,"data":32},"ok",{"site_id":25,"language":24,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":28},"win32-api","",{"@graph":36,"@context":85},[37,53,68],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,50],{"item":41,"name":42,"@type":43,"position":21},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/document/","Document",2,{"item":49,"name":12,"@type":43,"position":20},"https://docshare.wps.com/document/technology/",{"item":51,"name":13,"@type":43,"position":52},"https://docshare.wps.com/document/win32-api/43506/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":24,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":41,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-12","2026-07-06",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"What is the Win32 API and what are its main components?","Question",{"text":75,"@type":76},"WinAPI (Win32) is an API for accessing Windows features. Its main components include WinBase (kernel functions), WinUser (GUI functions), WinGDI (graphics functions), and common controls like standard controls, list views, and sliders.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"How do console and GUI Windows applications differ for the programmer?",{"text":80,"@type":76},"The difference lies in the interface for the application’s main entry point. Console apps typically use int main or a Windows-specific int_tmain for wide characters, while GUI apps use a Windows-specific entry point such as WinMain that sets up a GUI environment.",{"name":82,"@type":73,"acceptedAnswer":83},"Why does Win32 API version support vary across Windows versions?",{"text":84,"@type":76},"API versions are tied to operating system versions. MSDN documentation specifies the minimum supported operating system for each function, so function availability depends on the target Windows version.","https://schema.org",{"og:url":51,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":51},"index,follow",{"doc_id":7,"site_id":25},{"code":4,"msg":5,"data":92},[93,97,101,105,110,113,118,123,128,131,135],{"id":21,"doc_module":4,"doc_module_name":46,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":46,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":46,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":111,"slug":112},50,"technology",{"id":114,"doc_module":4,"doc_module_name":46,"category_name":115,"show_sort_weight":116,"slug":117},7,"Healthcare",40,"healthcare",{"id":119,"doc_module":4,"doc_module_name":46,"category_name":120,"show_sort_weight":121,"slug":122},8,"Research & Report",30,"research-report",{"id":124,"doc_module":4,"doc_module_name":46,"category_name":125,"show_sort_weight":126,"slug":127},9,"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":46,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":132,"doc_module":4,"doc_module_name":46,"category_name":133,"show_sort_weight":132,"slug":134},10,"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":46,"category_name":137,"show_sort_weight":106,"slug":138},19,"General","general"]