Handle for a non-mfc application
Posted on 1997-05-09
Simple - I have a non-mfc windows (95/NT) application that is portable and cannot contain windows-specific code (has 3rd-party GUI/system libs). However in a library I have built I have windows stuff - such as TAPI function calls - and I need to get the application handle. I want to use AfxGetApp, AfxGetInstanceHandle, etc. Everything links OK, but the Afx... functions cause an ASSERT. Do I need to manually initialise some Afx thingy inside my lib?
Alternatively, there's probably a better way to get the apps handle ?
(Forgive me, I've been using mfc too long and my brain has gone mushy.)
Thanx in advance