Chapter 3: Windows Resources Visual C++ and MFC Fundamentals
Practical Learning: Creating an Accelerator Table
- On the main menu of Visual Studio, click Insert -> Resource... or Project -> Add
Resource... - In the Add Resource dialog box, double-click Accelerator
- In the Properties window, click the arrow of the ID combo box and select
ID_CATEGORY_PARENT - Click the Key box and type R
- Make sure the Ctrl check box is checked or that the Ctrl field is set to True. Also,
make sure the Type is set to VIRTKEY - In the same way, create an accelerator item for the Child menu:
- To use the accelerator, change the program as follows:
class CResFrame : public CFrameWnd
{
public:
HACCEL m_hAccel;
CResFrame()
{
m_hAccel = ::LoadAccelerators(AfxGetInstanceHandle(),
MAKEINTRESOURCE (IDR_ACCELTEST));
Create(NULL, "Resources Fundamentals",
WS_OVERLAPPEDWINDOW,
CRect(200, 120, 640, 400), NULL,
MAKEINTRESOURCE(IDR_TEST));
}
};
- Test the application and return to MSVC
3 .6 Version Information........................................................................................
3.6.1 Overview..................................................................................................
The version of a computer program allows to have some information about the product
such as it official name, a release number, the person or company that owns its copyright,
the year of the current release, etc.
3.6.2 The Version Information Editor...........................................................
To create the pieces of information that make up the version information, you can use the
Version Information Editor.