Page 1 of 1

Subclassing

Posted: 20 Nov 2009, 08:30
by TickTick
What happens if I don't subclass for WM_NOTIFYFORMAT?
I don't see any changes...

From MSDN http://msdn.microsoft.com/en-us/library ... 85%29.aspx:
All common controls will send WM_NOTIFYFORMAT messages. However, the standard Windows controls (edit controls, combo boxes, list boxes, buttons, scroll bars, and static controls) do not.

Thank you.

Re: Subclassing

Posted: 20 Nov 2009, 11:35
by TiKu
In general (not specific to ButtonControls), any features that are based on notification messages, won't support Unicode if you don't do the WM_NOTIFYFORMAT stuff. An example is the ItemGetDisplayInfo event of e. g. ExplorerListView.

The MSDN statement is probably wrong. With comctl32.dll 6.0, the standard Windows controls like Edit, Button, Combo Box... have become part of comctl32.dll (before they were implemented in user32.dll) and now are common controls. New features that are added to these controls, are implemented in common controls style, e. g. WM_NOTIFY is preferred over WM_COMMAND and therefore WM_NOTIFYFORMAT becomes important.
On the other hand, Microsoft usually supports Unicode only nowadays. This means that new messages that would have been implemented in an ANSI and a Unicode version back in the Win2k/Win9x days, now have a Unicode version only. So it might be possible that the button controls send only Unicode notifications anyway and therefore don't need the WM_NOTIFYFORMAT stuff. I'll check that.