I am trying to alternate an SDI application which is used to operate a spectral camera as part of my diploma thesis. Since it's not my code entirely I tried to simulate a bit of the functionality I want add in a simpler example. So I created an MFC SDI application using Creation Wizard of Visual Studio 2005 (it's a bit old I know but what can you do...). The code I added implements a new class derived from CDialog which creates an invisible message-only, and posts/sends two user-defined messages. These two messages are supposed to be handled by an object of my class CInvisibleWnd. Everything seems to work fine (no errors and no warnings during building) and all my objects are successfully created but the code inside the event handlers is not reached! Do you have any suggestions?
The CDialogMsg object is created by C"MyProjectName"Doc object...
I could not incorporate message-only CWnd to C"MyProjectName"Doc due to multiple inheritance which is, as I found out, very difficult to implement. The best source I found for message-only CWnd in MFC is here: How to make a Message Only Window
Thank you very much!
Ody -- Always look on the bright side of life --
Each one can do pretty much the same thing. In your posted code, you're using the MFC version, but since you're calling the method internal to CDialogMsg, you're posting the message to that specific CDialogMsg object (you have him sending that message to himself), not to any CInvisibleWnd object.
How can you specify to send it elsewhere?
//Use the target pointer to use the MFC SendMessage()
//Or you can use the WinAPI and specify the handle to your target
SendMessage( pWnd->GetSafeHwnd(), ...);
On a related note, you probably shouldn't name your messages with the "WM_" preffix, as that's there to indicate its an internal windows framework message.
i have a project depend on converting mathematical C formula to mathematical formula used in calcualtors
pow(x , 2 ) .....>x^2
the same as roots and all expreesions
which topics i must search ? must i search for tex and latex and MathML ?
thnx in advance