This is an old problem that I've never figured out - wondered if someone here might happen to know the answer off of the top of your head...
In some parts of our software (MFC/Win32/MBCS) my code will only receive
TTN_NEEDTEXTW
In other parts of our software, I'll receive the MBCS correct message
TTN_NEEDTEXTA
It makes no sense to me.
I understand that our software can be compiled Unicode or not (we are set to use Multibyte character set). And I have the vague recollection that each window can be constructed Unicode or not, though this is a vague memory, nothing concrete.
Does anyone know why we'd be getting the wide version message some places in our code, despite being compiled as multibyte?
NOTES:
- We're definitely not sending this message - presumably the ToolTip control is.
- We're definitely only receiving the (W) message in some places, and definitely only receiving the (A) message in others.
- I'm certain that all compilation modules use MBCS, not Unicode, and that the build targets all specify MBCS not Unicode.
- This seems to happen only for CMainFrame hosted windows and controls. i.e. Windows outside of the main frame can use narrow versions (say in a dialog box).