Announcement

Collapse
No announcement yet.

GPF Error

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

  • Lance Edmonds
    replied
    I agree about the "suicide" issue, but...
    I learned that DIALOG END hDlg from the current Dialog is also to be avoided, for the same reason.
    Sorry Joe, but this statement is not very accurate... I use this technique all the time.

    In general terms, windows ignores some (API) functions if used during processing of certain messages... for example, DIALOG END should not be performed during processing %WM_INITDIALOG.


    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Joe Speroni
    started a topic GPF Error

    GPF Error

    Ive been chasing a GPF error for over a week. Finally with
    Lance's help I was able to isloate the problem in my code. Lest
    others travel this path, I document the problem here. I'd also
    suggest the PB DLL manual consider a warning to help future
    users.

    Basically the sin to be avoided is

    CONTROLS SHALL NOT COMMIT SUICIDE

    or,

    Thou shall not CONTROL KILL yourself from
    within a CallBack function.

    My code had the equivalent of:

    CASE %WM_COMMAND
    SELECT CASE LOWRD(CBWPARAM)
    CASE 111
    KILL hDlg,111

    The code never failed, if only a mouse clicks were used.
    Activation via ALT+Letter caused intermittent GPF's, depending
    of the size and timing of execution of apparently unrelated code.

    I learned that DIALOG END hDlg from the current Dialog is also
    to be avoided, for the same reason.
Working...
X