For Native Ribbon. I added global HWND hWnd; // In RibbonApp.cpp
MessageBox(hWnd, L"Clicked on My Button!", L"My Button Execute", MB_OK | MB_APPLMODAL);
(i.e. hWnd instead of NULL and see the | MB_APPLMODAL so you HAVE to click the messagebox.
And in Ribbon.cpp
extern HWND hWnd;
So that clicking Ribbon button twice (or more) does NOT give EXCEPTION when *exiting* sample.
Hope that helps anyone doing the Ribbon. (i.e. clicking more than once to get the MessageBox.