Announcement

Collapse
No announcement yet.

Any ideas what causes this?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Any ideas what causes this?

    Any ideas what would cause this behavior on start up? The dialog never shows and the program exits without doing anything. The dialog was created in PBForms 1.51 and the app compiles without errors in PBWin 8.04. It's suppose to be a top level app.

    The dialog is MODAL, called with %HWND_DESKTOP. The behavior is the same whether I use PBMAIN or WINMAIN. It is also the same whether the dialog is MODAL or MODELESS with a message pump.


    This is the TRACE file.

    Code:
    Trace Begins...
     SHOWCODWINDOW(1)
      SHOWCODWINDOWPROC()
      SHOWCODWINDOWPROC Exit
      SHOWCODWINDOWPROC()
      SHOWCODWINDOWPROC Exit
     SHOWCODWINDOW Exit
    WINMAIN Exit
    This is the PROFILE file (minus the CONTROL info -- all zeros).

    Code:
    SHOWCODWINDOW,                                      1,                1250
    SHOWCODWINDOWPROC,                                  2,                 484
    ...
    ...
    ...
    WINMAIN,                                            1,                   0
    Thanks in advance.
    Stan
    Last edited by StanHelton; 15 Jan 2008, 11:52 AM.
    Do not go quiet into that good night,
    ... Rage, rage against the dark.

  • #2
    That's an error 1: Programmer Error.

    Show code containing error. It could be the DIALOG NEW or DIALOG SHOW statement, but more likely it's the WM_INITDIALOG code.

    You only need post enough to make a compilable example demonstrating the problem.


    MCM
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      Yeah, I figured it was something I did wrong. I'll put together an example and post the code.
      Do not go quiet into that good night,
      ... Rage, rage against the dark.

      Comment


      • #4
        Stan,

        My guess is that, as it gets into the callback, there is something wrong in the Wm_INITDIALOG message handler. Try commenting it out then see if it does anything different.

        Or single-step with the debugger.

        Or post the code!

        Comment


        • #5
          This is what I found...

          Thank you for your suggestions on where to look for the error. It wasn't in any of the places mentioned, but MCM and Chris both suggested I post the problem code. While trimming the app down to a postable example I noticed some odd behavior in 2 of the controls.

          Long story short; I found 2 problems.
          1) %IDC_btnPrintLable in 2 places when it should have been %IDC_PrintLabel
          2) a read only textbox called %IDC_txtControlNo
          apparently this is a conflict with a reserved word in the SDK

          I didn't find the conflict, but the problem went away when I removed this control from the form.


          Thank you both. This discussion led directly to solving the problem.

          Stan
          Do not go quiet into that good night,
          ... Rage, rage against the dark.

          Comment


          • #6
            Originally posted by StanHelton View Post
            While trimming the app down to a postable example
            Stan, that discipline alone is worth the cost of the compiler!

            Comment

            Working...
            X