Sending message to CPropertySheet crashes app in Release 
Author Message
 Sending message to CPropertySheet crashes app in Release

I have a simple Windows app written using VC++ 6.0. The
app contains a CPropertySheet in wizard mode. If any of
its CPropertyPage members sends a user defined message
using either a SendMessage or a PostMessage to the parent,
the message is handled properly by the CPropertySheet
class, but crashes the app after exiting the message
handler. This happens only when built in Release mode.

e.g.
GetParent()->SendMessage(WM_MYMSG);

Any suggestions? Thanks.

Tam



Sat, 09 Oct 2004 02:49:41 GMT  
 Sending message to CPropertySheet crashes app in Release
    This could be because of your message handler not defined properly. Your
OnMyMsg(..) handler should be defined as taking a WPARAM and LPARAM .
Something like..

    CYourClass::OnMyMsg( WPARAM wParam, LPARAM lParam )
    {

    }

    HTH.

--
Cheers
Check Abdoul
----------------


Quote:
> I have a simple Windows app written using VC++ 6.0. The
> app contains a CPropertySheet in wizard mode. If any of
> its CPropertyPage members sends a user defined message
> using either a SendMessage or a PostMessage to the parent,
> the message is handled properly by the CPropertySheet
> class, but crashes the app after exiting the message
> handler. This happens only when built in Release mode.

> e.g.
> GetParent()->SendMessage(WM_MYMSG);

> Any suggestions? Thanks.

> Tam



Sat, 09 Oct 2004 02:59:49 GMT  
 Sending message to CPropertySheet crashes app in Release
That's exactly it. Thanks!

Quote:
>-----Original Message-----
>    This could be because of your message handler not

defined properly. Your
Quote:
>OnMyMsg(..) handler should be defined as taking a WPARAM
and LPARAM .
>Something like..

>    CYourClass::OnMyMsg( WPARAM wParam, LPARAM lParam )
>    {

>    }

>    HTH.

>--
>Cheers
>Check Abdoul
>----------------



>> I have a simple Windows app written using VC++ 6.0. The
>> app contains a CPropertySheet in wizard mode. If any of
>> its CPropertyPage members sends a user defined message
>> using either a SendMessage or a PostMessage to the
parent,
>> the message is handled properly by the CPropertySheet
>> class, but crashes the app after exiting the message
>> handler. This happens only when built in Release mode.

>> e.g.
>> GetParent()->SendMessage(WM_MYMSG);

>> Any suggestions? Thanks.

>> Tam

>.



Sat, 09 Oct 2004 04:39:20 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. App crashes on MFC messages in Release build

2. app receiving message from another app crashes

3. Sending a message from VB-app to VC-app

4. CAnimateCtrl crashes when it sends WM_COMMAND messages

5. Stumped by Framework message-processing crash in Release mode

6. Release Configuration crashes APP

7. App crashes in release but not debug

8. App Crashes in RELEASE but works fine in DEBUG

9. Executing message handler function crashes app. Please Help

10. sending messages between apps

11. Break not seen when another app sends message

12. Sending a message from one app to another on NT

 

 
Powered by phpBB® Forum Software