Create controls in a dll ?
-
I have a application with a view that has a tabctrl. The tabpages of this tabctrl are CDialog derived objects. There a several dll's that draw controls on these tabpages (I didn't think this up, my predecessor did :|). Anyhow, the problem is that some of the controls do not receive their messages. E.g. button controls do not receive BN_CLICKED, the same account for spinctrl's. But I can edit the fields of a editctrl. Also when I create an ownerdraw button the WM_DRAWITEM message can not be received. When I create a similar control in the application itself then this control does receive it's messages. My predecessor create a 'sollution' by overriding the OnCommand of the TabCtrl. This does solve the BN_CLICKED problem but still I do not receive the ownerdraw messages. Anyone got a clue about how to solve this?
-
I have a application with a view that has a tabctrl. The tabpages of this tabctrl are CDialog derived objects. There a several dll's that draw controls on these tabpages (I didn't think this up, my predecessor did :|). Anyhow, the problem is that some of the controls do not receive their messages. E.g. button controls do not receive BN_CLICKED, the same account for spinctrl's. But I can edit the fields of a editctrl. Also when I create an ownerdraw button the WM_DRAWITEM message can not be received. When I create a similar control in the application itself then this control does receive it's messages. My predecessor create a 'sollution' by overriding the OnCommand of the TabCtrl. This does solve the BN_CLICKED problem but still I do not receive the ownerdraw messages. Anyone got a clue about how to solve this?
-
There's a OnDrawItem command. Maybe if you override that one you will receive ownerdraw messages. I never use MFC though so I'm not sure about this ;)
That does not work if the control does not receive it's messages.