다음을 통해 공유


CUserToolsManager::CreateNewTool

Creates a new user tool.

CUserTool* CreateNewTool();

Return Value

A pointer to the newly created user tool, or NULL if the number of user tools has exceeded the maximum. The returned type is the same as the type that is passed to CWinAppEx::EnableUserTools as the pToolRTC parameter.

Remarks

This method finds the first available menu command ID in the range that is supplied in the call to CWinAppEx::EnableUserTools and assigns the user tool this ID.

The method fails if the number of tools has reached the maximum. This occurs when all command IDs within the range are assigned to user tools. You can retrieve the maximum number of tools by calling CUserToolsManager::GetMaxTools. You can get access to the tools list by calling the CUserToolsManager::GetUserTools method.

Requirements

Header: afxusertoolsmanager.h

See Also

Reference

CUserToolsManager Class

Hierarchy Chart