Handling Fatal Errors in WM_CREATE
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Handling Fatal Errors in WM_CREATE

  1. #1
    Join Date
    Apr 2011
    Posts
    14

    Handling Fatal Errors in WM_CREATE

    Hi guys,

    I'm doing something like this:

    WM_CREATE:
    if(!initialize()){
    // fatal error
    // MessageBox(...);
    // here I should terminate the program
    }

    What's the best way to handle something like that ?

    Thanks.

  2. #2
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,471

    Re: Handling Fatal Errors in WM_CREATE

    According to MSDN in this case your procedure has to return -1 to destroy the window and case the CreateWindowEx or CreateWindow function returns a NULL handle.
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center