Click here to Skip to main content
15,905,875 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: WM_CAPTURECHANGED, lParam=0 Pin
darkbyte1-Sep-04 13:17
darkbyte1-Sep-04 13:17 
GeneralRe: WM_CAPTURECHANGED, lParam=0 Pin
Anonymous1-Sep-04 17:17
Anonymous1-Sep-04 17:17 
GeneralRe: WM_CAPTURECHANGED, lParam=0 Pin
Ryan Binns1-Sep-04 18:29
Ryan Binns1-Sep-04 18:29 
GeneralRe: WM_CAPTURECHANGED, lParam=0 Pin
cowwoc20021-Sep-04 18:50
cowwoc20021-Sep-04 18:50 
GeneralRe: WM_CAPTURECHANGED, lParam=0 Pin
Ryan Binns1-Sep-04 21:32
Ryan Binns1-Sep-04 21:32 
GeneralSubtitles ... Pin
Andre Massada1-Sep-04 10:44
Andre Massada1-Sep-04 10:44 
GeneralAdd event to Controlbar button Pin
TNguyen1-Sep-04 8:35
TNguyen1-Sep-04 8:35 
GeneralRe: Add event to Controlbar button Pin
Cliff Hatch20-Jan-05 8:54
Cliff Hatch20-Jan-05 8:54 
TNguyen

I was browsing the board to see if anyone had found a solution to this problem, and came across your post. I imagine you have found a way round this by now, but I thought I would reply anyway:

I can't believe that the designers meant to make the task of connecting an event handler to a button more difficult than it used to be. I assume it was an unintended side effect of trying to produce the unified .NET programming interface (which regretably seems to have involved discarding MFC's ClassWizard) - but what continues to puzzle me is that this has not been subject to a patch or improvement in later releases.

I don't have an anwer, but I do have a workaround. Build a MENU item first, attach the handlers you want to it, then build a toolbar button with the same ID (and it will share the same event handlers).

If you right click on menu items and select the "add event handler" option, the Event Handler Wizard appears and gives you the option to create or edit handlers for COMMAND and UPDATE_COMMAND_UI messages.

The rule seems to be, right click on the thing you want to create a handler for and the Event Handler Wizard will provide pretty much the same functionality as MFC's ClassWizard - except that it doesn't work for toolbar buttons because right clicking doesn't give you the option - seems nuts to me!

Please let me know if you have found a better way in the meantime.

Best Regards

Cliff

GeneralWindow Service Parameters from INI file Pin
aman20061-Sep-04 8:08
aman20061-Sep-04 8:08 
GeneralRe: Window Service Parameters from INI file Pin
David Crow1-Sep-04 8:31
David Crow1-Sep-04 8:31 
GeneralRe: Window Service Parameters from INI file Pin
aman20061-Sep-04 8:44
aman20061-Sep-04 8:44 
GeneralRe: Window Service Parameters from INI file Pin
David Crow1-Sep-04 8:50
David Crow1-Sep-04 8:50 
GeneralRe: Window Service Parameters from INI file Pin
aman20061-Sep-04 8:58
aman20061-Sep-04 8:58 
GeneralRe: Window Service Parameters from INI file Pin
David Crow1-Sep-04 9:05
David Crow1-Sep-04 9:05 
GeneralRe: Window Service Parameters from INI file Pin
aman20061-Sep-04 11:08
aman20061-Sep-04 11:08 
GeneralAnimateWindow - can't compile Pin
BlackDice1-Sep-04 7:29
BlackDice1-Sep-04 7:29 
GeneralRe: AnimateWindow - can't compile Pin
David Crow1-Sep-04 7:40
David Crow1-Sep-04 7:40 
GeneralRe: AnimateWindow - can't compile Pin
BlackDice1-Sep-04 8:00
BlackDice1-Sep-04 8:00 
General<b>RESOLVED</b> Pin
BlackDice1-Sep-04 8:30
BlackDice1-Sep-04 8:30 
GeneralRe: <b>RESOLVED</b> Pin
David Crow1-Sep-04 8:32
David Crow1-Sep-04 8:32 
GeneralMe either Pin
BlackDice1-Sep-04 8:36
BlackDice1-Sep-04 8:36 
GeneralRe: Me either Pin
David Crow1-Sep-04 8:43
David Crow1-Sep-04 8:43 
GeneralRe: Me either Pin
BlackDice1-Sep-04 10:32
BlackDice1-Sep-04 10:32 
GeneralRe: AnimateWindow - can't compile Pin
Michael Dunn1-Sep-04 18:04
sitebuilderMichael Dunn1-Sep-04 18:04 
GeneralRe: AnimateWindow - can't compile Pin
BlackDice2-Sep-04 2:48
BlackDice2-Sep-04 2:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.