Dialogbars event mapping
-
I've developed a single document application and I use Dialog bars. I've derived a class from CDialogBar in order to map OnCtlColor and I use that class as base class. Then I've derived a class (from my base class)for any dialog bar and I use its instances in CMainFrame instead of default CDialogBar instance created by Visual Studio. I've written a specific class for any dialog bar in order to manage its events in that class instead of in CMainFrame class. (Otherwise, having many dialog bars CMainframe class becomes a very big and complex class). My problem is the following: Visual Studio allows me to create methods for any event of my dialog bar in the specific class but at runtime that methods are never called. It seems that there is no real association between UI controls and methods written in my class (and added with class wizard). All works if I copy that methods and the related MESSAGE_MAP code in CMainframe class. Why my classes doesn't catch dialog bars event while CMainframe do it ?? Thanks a lot.
-
I've developed a single document application and I use Dialog bars. I've derived a class from CDialogBar in order to map OnCtlColor and I use that class as base class. Then I've derived a class (from my base class)for any dialog bar and I use its instances in CMainFrame instead of default CDialogBar instance created by Visual Studio. I've written a specific class for any dialog bar in order to manage its events in that class instead of in CMainFrame class. (Otherwise, having many dialog bars CMainframe class becomes a very big and complex class). My problem is the following: Visual Studio allows me to create methods for any event of my dialog bar in the specific class but at runtime that methods are never called. It seems that there is no real association between UI controls and methods written in my class (and added with class wizard). All works if I copy that methods and the related MESSAGE_MAP code in CMainframe class. Why my classes doesn't catch dialog bars event while CMainframe do it ?? Thanks a lot.
Visual Studio 7.0 I presume? It's full of such bugs and once in a while I think of rolling back to my favorite 6.0. :((