방법: 리본 컨트롤 및 이벤트 처리기 추가
Ribbon controls are elements, such as buttons and combo boxes, that you add to panels. Panels are areas of the ribbon bar that display a group of related controls.
In this topic, you will open the Ribbon Designer, add a button, and then link an event that displays "Hello World".
To open the Ribbon Designer
In Visual Studio, on the View menu, click Resource View.
In Resource View, double-click the ribbon resource to display it on the design surface.
To add a Button and an Event Handler
From the Toolbar, click Button and drag it on to a panel in the design surface.
Right-click the button, and click Add Event Handler.
In the Event Handler Wizard, confirm the default settings and click Add and Edit. 자세한 내용은 이벤트 처리기 마법사을 참조하십시오.
In the code editor, add the following code into the handler function:
MessageBox((LPCTSTR)L"Hello World");