FormatMessage returns a char* containing nulls between each character…why?
When translating error messages I get back a pointer to a string (pMsgBuf) that looks like this
How to prevent a popup menu from activating the application?
The popup menu is created in the dialog’s WM_INITDIALOG
message with this code:
Which message is sent when the resource dialog is fully shown?
Which message (if any) is sent when the dialog is fully shown / drawn / the last child control was created/displayed on a resource dialog? Both the dialog and the child controls are created from a resource inside WinMain().
Which message to handle when Dialog is fully shown?
How to know when the dialog is fully shown / drawn / the last child control was created/displayed on a resource dialog? Both the dialog and the child controls are created from a resource inside WinMain().
Dialog shown message
How to know when the dialog is fully shown / drawn / the last child control was created/displayed on a resource dialog? Both the dialog and the child controls are created from a resource inside WinMain().
How to use debug registers in C++
I wrote the following code in order to set a hardware breakpoint using Dr0 debug register on a function:
How to implement CheatEngine’s pointer offset in C#
I’m stuck at the pointer offset part. I can get the address offset from “PlantsVsZombies.exe”+002A7758, but when I add 0x68 to this address, I get an incorrect address.
offset=104, which is the decimal value of 0x68.
QueryDosDeviceW always returns 0 when it called in thread
QueryDosDeviceW
returns 0 when called from a source other than the main thread. Why?
I used Visual Studio 2022 (v143) platform.
Below is the test code and output.
Why does ShellExecuteA sometimes not complete an action?
I’m using RAD Studio C++ Builder.
I am not yet using their clang compiler (long story), so my code cannot use C++17 functions.
(Since this is a standard VCL application, I believe CoInitialize is run automatically)
Why are there code blocks and possibly unneeded breaks in case labels?
Is there a need for code blocks followed by a break
statement often present in legacy and winapi code, especially when handling the WM_COMMAND message? I have been seeing a lot of the following code in winapi samples: