Category

Win32 API

9 posts

Visual C++ Win32 API

Command Line Arguments Processing in Win32 Application

It’s common for Windows executable to get and process the additional parameters from the command line. This way you can pass any custom actions when launching an application i.e. open a particular file, print a file, control the application visibility state, etc. If you are working on C/C++ console application, then you can easily get…

Continue reading Command Line Arguments Processing in Win32 Application
1 comment Win32 API Windows

Forcing just one instance of an Application to execute at a time

When developing a desktop application, it’s often required that only one instance of application should be executable at a time. This is usually implemented in different ways depending on Language/Tools you are using to build the application. Some common techniques used are either using the Mutex or getting a list of active processes and making…

Continue reading Forcing just one instance of an Application to execute at a time
1 comment Win32 API Windows

Restore Notification Area Icon after Explorer Crash

If you are writing any application which adds an icon to the Taskbar notification area, it’s recommend to handle the “WM_TASKBARCREATED” the message sent by explorer. This message is sent by explorer when it’s creating the taskbar. As after crash explorer doesn’t remember the original notification icons, you should handle this message and then re-register…

Continue reading Restore Notification Area Icon after Explorer Crash
Win32 API Windows

IsWindowVisible API Catch

In one of my utilities, I was using the IsWindowVisible  function to get the current window state. Though it seems to be working at start, I found that it randomly fails and when debugging the issue, the IsWindowVisible was not returning the correct state i.e. a non-zero value even if the window was not visible. This…

Continue reading IsWindowVisible API Catch

Embedding DLL and binary files in the Win32 Executable

Embedding DLL and binary files in the Executable applications Though for most of the cases, it’s recommended keep the resources and other libraries separate from the main executable. This makes the main application executable size small, and thus that application will take less memory on load and will load/unload the external resources as required. Yet…

Continue reading Embedding DLL and binary files in the Win32 Executable