Board index » cppbuilder » SendMessage() in OnActivate raises the exception...
Vladimir Stefanovic
![]() CBuilder Developer |
SendMessage() in OnActivate raises the exception...2004-02-03 11:06:34 PM cppbuilder63 Hi, I wanted to make my own 'Tip of the day' info dialog as an independed module. That means - it has to be included (#include), created (new), called (Tip->ShowTip()) and destroyed (delete) when not needed anymore. That's all Ok. As usually that dialog has 'Show tips on startup' check box. I wanted to inform the main form that something has changed (checked/unchecked) via SendMessage() mechanism and so to pass the responsibility of saving configuration changes to WndProc and main form. Function 'ShowTip()' should be executed after main form creation. I think I have no alternative than to put it in FormActivate(). The problem is (I think) that WndProc is not ready to receive anything while not left FormActivate function - so raises some exception. If I try to call 'ShowTip()' from somewhere else (suppose from some menu button) everything is Ok. What is the problem and what should I do? Vladimir. |