Articles on C++ programming language.
The picture shows the screenshot of example.
When the user clicks the browse button, the example displays file selection dialog. From this dialog, user picks a file name. The example shows the file properties in the relevant user interface items as in the above screen.
The SDI sample, under the file menu, has two menu items called Hook CAPS Lock, Unhook CAPS Lock. When the user clicks the Hook Caps Lock menu item, the Keyboard hook is attached to the application and hooks the keyboard event. The UnHook CAPS Lock event removes installed hook from the application.
Our example SDI contains two menu items called First Dialog and Second Dialog under view menu. These menu items will bring up two dialogs with text boxes in it. When a hook is installed, you can type only the capital letters in the dialogs. After opting for the Un-Hook action, you will not have upper case constraint on the dialogs. Let us jump into the explanation-based walk-through.
In the previous MFC Article, we examined how the Mapping Modes works while performing the drawing operation. In this example, we will see how we set the custom mapping modes. Our goal is below:
1) Set mapping mode so that the horizontal logical unit is 1 Centimeter (cm). Simply, 1 Unit = 1 cm in X axis.
2) Also, 1 Unit = 1 cm in Y Axis.
3) Positive X is towards left.
4) Positive Y is going Upwards.
5) The Drawing origin should be in screen center.
We can achieve the above goal by using the Custom Mapping mode MM_ISOTROPIC.