Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 29485

The Win32 API is the core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems. This tag is for questions about developing native Windows applications using the Win32 API.

1 vote
Accepted

A small C WinAPI program moving the cursor in a circle

Integer math for an integer problem Consider a variation on Bresenham's circle algorithm for an integer only solution: faster and precise. Note: Graphics processors use integer math for drawing circle …
chux's user avatar
  • 33.7k
1 vote
Accepted

Send command and get response from Windows CMD prompt silently - follow-up

Handling embedded null bytes ReadFile(, lpBuffer,,,) may read null characters into lpBuffer. Should this occur, much of code's use of str...() would suffer. Code instead needs to keep track of data …
chux's user avatar
  • 33.7k
1 vote
Accepted

Win32/C: Notepad wrapper that automatically converts Unix line endings to Windows line endings

Architecture idea: Code reads the entire file into memory, coverts it and then conditionally writes it out. ReadFile(hFile, bIn, dwLow, &dwRead, NULL); leResult = ConvertLineEndings(bIn, dwLow, bOu …
chux's user avatar
  • 33.7k
2 votes

First C program: records keyboard/mouse and simulates the recording afterwards

Initial position add_cursor() only adds the cursor's position to the function's queue if there is a change. Depending on needs, I'd expect the initial mouse position to be added too and not assume i …
chux's user avatar
  • 33.7k
3 votes

Simple Win32 API Calculator in C

Bug sprintf(strValue, "%s %c", strValue, Value); is undefined behavior (UB) in C99 due to restrict does not allow s to overlap the ... arguments. int sprintf(char * restrict s, const char * restrict f …
chux's user avatar
  • 33.7k
2 votes

Sending and receiving files in C win32 using a socket

Various size_t As the size_t is not specified to be the same across Windows, nor the compile version of the sender and receiver code the same, nor is the size of file limited to SIZE_MAX, I would cons …
chux's user avatar
  • 33.7k