I have attached a demo app. A lengthy post was lost by the server. :mad:
Edit:
I figured it out when I built a simple demo project. Problem arose because of trying to access a c-wrapper dll from the app class whereas the wrapper class had not been initialized there but rather in the main dialog class - so naturally it didn't work!!! Anyway, I've attached the demo for any who might be interested, but I regard the problem as resolved. Shows the value of building simple projects to isolate a problem. I failed to appreciate the order in which such a program initializes - I guess it's always App first, then MainFrame, then Doc and View (I think).
Thanks.
Edit:
I figured it out when I built a simple demo project. Problem arose because of trying to access a c-wrapper dll from the app class whereas the wrapper class had not been initialized there but rather in the main dialog class - so naturally it didn't work!!! Anyway, I've attached the demo for any who might be interested, but I regard the problem as resolved. Shows the value of building simple projects to isolate a problem. I failed to appreciate the order in which such a program initializes - I guess it's always App first, then MainFrame, then Doc and View (I think).
Thanks.