The MFC Rebar Example

MFC Rebar Control – Enable Floating Toolbar

Our example is a Single Document Interface (SDI) application, which shows six toolbar buttons in two ToolBars. These two ToolBars are hosted by the Rebar Control. Placing the ToolBar on the Rebar allows the user to move the toolbar over the Rebar Control using the Gripper. Using the grippers, we can also place a toolbar in separate rows. Let us start building this example.

Read More…
MFC Round Window Using CRgn

MFC CRgn Example – An Elliptical Dialog

CRgn is an MFC Class, which is useful to define regions. Using this one can define the outline of a telephone, DVD, Disc, etc. Once a region is ready, we can assign that to any MFC Window. This way one can display a telephone outline dial-in number pad as a window. In this example, we will create an elliptical MFC Login Dialog using CRgn and Region Path.

Read More…
Menu Item Resource IDS in Sequential Order

MFC Owner Drawn Menu Using WM_DRAWITEM, WM_MEASUREITEM

When an owner window of the menu item decides how the menu item should look, then the menu item is known as Owner Drawn Menu. The default windows provided menu has a standard look and feel. We cannot add Red and blue-colored boxes as a menu item through the resource editor. In this Example, we will see how can we display only color boxes as a menu item under the color menu. Here, we will learn the need for the WM_DRAWITEM and WM_MEASUREITEM windows messages.

Read More…