From: charfeddine_ahmed on
First of all, I express my best wishes to the success of the new VC
Feature Pack, which surely made happy evrybody who is still coding
unmanaged code, integrating C codes and yet needing a steadily
powerful MFC for his programs user interfaces.

My question is about Ribbon buttons : how to put a certain
CMFCRibbonButton in a pressed state ?
I have a chess program : and I need a button that does the flipping of
the chess board, if user pressed the button, I want to keep it
pressed, untill the user press it again.

I have examined the MSOffice2007 demo program, and I noted the print
layout button in the view tab : it is in a pressed state, but looking
at the code I didn't find anything that made it that way.

Any body can help me and I'll appreciate it.
From: rohitab on
On Feb 14, 1:18 pm, charfeddine_ahmed <ahmedcharfedd...(a)gmail.com>
wrote:
> My question is about Ribbon buttons : how to put  a certain
> CMFCRibbonButton  in a pressed state ?

Add a ON_UPDATE_COMMAND_UI handler for the button and in the handler
do a pCmdUI->SetCheck(TRUE);