We know that keyboard and mouse are basic hardware interface supported by almost all the Computer Operating System. When the user hits the keyboard key, the device driver for the keyboard deals with it by making use of the interrupts. In this example we will learn how to handle Keyboard Messages using MFC SDI Application. First, We will provide a handler function for the Keyboard. Then, inside the handler, we will check for Shift Key State and Toggle Key State.
The System Menu appears when you click the top left corner of the window. In this short article, we will add our own command to the System Menu of the dialog box. Then we will also handle click event of it. You can do the same for SDI and MDI Applications.
Microsoft Visual Studio provides various debugging windows to make the developer’s life easy when they analyzing the code for fixing logical bugs or crashes. In this example, we will use the sample application to learn various debugging windows autos, locals, call-stack, output and immediate.
In this Example, we will look at wiping out the minimize and resize button from the MFC Single Document Interface (SDI) Application using PreCreateWindow Override and CREATESTRUCT. Of course, we can do that with the MFC Wizard itself. However, that option is restricted to design time. Moreover, knowing how to carry out this in run-time is useful as the Application can behave based on the INI file or configuration file settings.
Software application user interacts with the windows applications through the main external devices like Keyboard and Mouse. In MFC, hardware events from these devices are seen as ‘Windows Messages’. An MFC application programs responding to these windows messages are called ‘Message Handling’. In this example, we will create an MFC SDI Application and then Handle Left and Right mouse click events. This will make you understand how windows messages are handled in the MFC Applications.
Debugging is the process of finding the logical errors in the program by checking the source code during the execution. The execution of a program pauses when the break-point is hit. Here, I will walk you through the debugging using the sample EXE found with this article. We will start breaking the execution with Breakpoints, then we will see step-in and step-out options. Finally, we see how to add a conditional breakpoints.
A C-Sharp Developer must know various project properties and how it impacts the projects. In this example, we create some sample projects and examine various c-sharp project properties. This is useful for all c-sharp developers.
‘Dotnet Remoting’ is a client and server based distributed object technology. In this article, we will make two applications. One is a Remote Server, and another one is a Client. First, we will complete the Server application and then carry out with the client. Here, we create Single Call remote. You will learn more about it in this article.
The C# StreamReader and StreamWriter classes are useful to Read or write a text file. This example makes you understand these two classes along with the need to learn about OpenFileDialog and FolderBrowserDialog components.
In this article we will explore the PictureBox Control and ProgressBar Control with an example walk through. PictureBox control is mainly used for an image. Using this control, one can show standard images files in a C# windows form. The image type can be BMP, JPG, JIF, PNG, etc. A ProgressBar control shows the progress of long-running process.