DoModal returns -1 (IDCANCEL) - Programmer

This is a discussion on DoModal returns -1 (IDCANCEL) - Programmer ; Hello I have been facing some problems with my DoModal function. I created a class for a dialog resource that I created and created an object of that class in another implementation file. Although it recognizes everything and even goes ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: DoModal returns -1 (IDCANCEL)

  1. DoModal returns -1 (IDCANCEL)

    Hello

    I have been facing some problems with my DoModal function. I created a
    class for a dialog resource that I created and created an object of
    that class in another implementation file. Although it recognizes
    everything and even goes to that class when the constructor is called,
    the dialog box does not show up. Then I have a DoModal function and
    some kind of error handling if DoModal returns something other than
    IDOK. And this is exactly what is happening, it returns IDCANCEL and
    returns. And this happens both in run mode and debug mode. Does anyone
    know whats going on?


  2. Re: DoModal returns -1 (IDCANCEL)

    >I have been facing some problems with my DoModal function. I created a
    >class for a dialog resource that I created and created an object of
    >that class in another implementation file. Although it recognizes
    >everything and even goes to that class when the constructor is called,
    >the dialog box does not show up. Then I have a DoModal function and
    >some kind of error handling if DoModal returns something other than
    >IDOK. And this is exactly what is happening, it returns IDCANCEL and
    >returns. And this happens both in run mode and debug mode. Does anyone
    >know whats going on?


    What controls do you have on your dialog box?

    Try temporarily removing them and then see if your dialog appears.

    Dave

+ Reply to Thread