× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Mon, 30 Sep 2002, Buck Calabro wrote:

> >I have modules that use their own display files.
> >I've seen the weird border problem you mention
> >and have resolved it.
>
> Is this related to using RSTDSP(*YES)?  I don't make the system save/restore
> the display.  I re-write it myself when needed.

Hmm... I'm not sure anymore since I don't need to worry about it.  Here
are the relevant parts of my code (you didn't ask for it but others did.
I'll stick it out there and then it should answer your question).  Not all
the formatting stuck the way I wanted but it should be easily apparent
what is going on.  It is the write to the RMVWDW format that seems to fix
things.  This is a really simple example, but it works the same for more
advanced displays.  Note that the display file ERA_EXITDF is usropn.  It
gets opened on first use.  After that it stays open until the end of the
activation group (in this case I believe the service program ERA_EXIT is
run in AG *caller).  I didn't post every little bit of code so if
something doesn't make sense yell and I'll put in the missing pieces.

<begin QRPGLESRC/ERA_EXIT [simple module to prompt a user to save their
changes]>
     HNOMAIN
     FERA_EXITDFCF   E             WORKSTN USROPN
     D*
     D*  ERA API functions
     D*
     D*
     D/COPY ERA_H
     D/COPY ERA_EXIT_H
     D*
     D*
     D*  exitwarn
     D*    Displays a window warning the user they are about to exit
     D*    without saving changes
     D*
     Pexitwarn         B                   EXPORT
     Dexitwarn         PI             1S 0
     D screensize                     3S 0 VALUE
     C*
     C                   movel     '*'           ERPGMQ
     C*
     C                   open      ERA_EXITDF
     C*
     C     screensize    ifeq      132
     C                   seton                                        10
     C*
     C                   else
     C                   setoff                                       10
     C                   endif
     C*
     C                   move      'Y'           DFSAVE
     C*
     C     1             doweq     1
     C                   write     ERA_MSGWNH
     C                   exfmt     EXITWIN
     C                   setoff                                       90
     C*
     C     *inkl         ifeq      *on
     C                   write     RMVWDW
     C                   close     ERA_EXITDF
     C                   return    CANCEL
     C                   endif
     C*
     C                   leave
     C                   enddo
     C*
     C     DFSAVE        ifeq      'Y'
     C                   write     RMVWDW
     C                   close     ERA_EXITDF
     C                   return    SUCCESS
     C*
     C                   else
     C                   write     RMVWDW
     C                   close     ERA_EXITDF
     C                   return    FAIL
     C                   endif
     C*
     Pexitwarn         E
<end QRPGLESRC/ERA_EXIT>

<begin QRPGLESRC/ERA_EXIT_H>
     D*
     D*  ERA API definitions
     D*
     D*
     D*
     D*  exitwarn
     D*    Displays a window warning the user they are about to exit
without sav
ing changes
     D*
     Dexitwarn         PR             1S 0
     D screensize                     3S 0 VALUE
<end QRPGLESRC/ERA_EXIT_H>

<begin  QRPGLESRC/ERA_H>
     D*
     D*  ERA API definitions
     D*
     D*
     D*
     D** Truth (logic) values
     D*
     DTRUE             C                   CONST(1)
     DFALSE            C                   CONST(0)
     D*
     D*
     D*
     D** Define return codes
     D*
     DSUCCESS          C                   CONST(0)
     DFAIL             C                   CONST(1)
     DEXIT             C                   CONST(2)
     DCANCEL           C                   CONST(3)
<end QRPGLESRC/ERA_H>

<begin QDDSSRC/ERA_EXITDF>
     A*%%TS  SD  20010228  135431  JAMES       REL-V3R7M0  5716-PW1
     A*%%EC
     A                                      DSPSIZ(24 80 *DS3
-
     A                                             27 132 *DS4)
     A                                      PRINT
     A          R EXITWIN
     A*%%TS  SD  20010228  135431  JAMES       REL-V3R7M0  5716-PW1
     A                                      CF12
     A  10                                  DSPMOD(*DS4)
     A  90                                  OVERLAY
     A  *DS3                                WINDOW(ERA_MSGWNH)
     A  *DS4                                WINDOW(ERA_MSGWNH)
     A                                      WDWBORDER((*COLOR BLU)
(*DSPATR RI)-
     A                                       (*CHAR '        '))
     A                                      USRRSTDSP
     A                                  6 16'F12=Cancel'
     A                                      COLOR(BLU)
     A                                  1 11' Exit Without Saving '
     A                                      DSPATR(RI)
     A                                      DSPATR(HI)
     A                                  4 13'Save changes?'
     A                                      DSPATR(HI)
     A            DFSAVE         1A  B  4 27DSPATR(PC)
     A  90                                  DSPATR(RI)
     A  90                                  COLOR(RED)
     A                                  4 29'Y=Yes, N=No'
     A                                      COLOR(BLU)
     A                                  3  3'You are about to exit without
savi-
     A                                      ng'
     A                                      DSPATR(HI)
     A                                  4  3'changes.'
     A                                      DSPATR(HI)
     A          R ERA_MSGWND                SFL
     A*%%TS  SD  20000717  123325  JAMES       REL-V3R7M0  5716-PW1
     A                                      SFLMSGRCD(7)
     A            MSGID                     SFLMSGKEY
     A            ERPGMQ                    SFLPGMQ(10)
     A          R ERA_MSGWNH                SFLCTL(ERA_MSGWND)
     A*%%TS  SD  20000717  123325  JAMES       REL-V3R7M0  5716-PW1
     A  10                                  DSPMOD(*DS4)
     A  *DS3                                WINDOW(7 18 7 40 *NOMSGLIN)
     A  *DS4                                WINDOW(7 42 7 40 *NOMSGLIN)
     A                                      WDWBORDER((*COLOR BLU)
(*DSPATR RI)-
     A                                       (*CHAR '        '))
     A                                      SFLDSP
     A                                      SFLDSPCTL
     A                                      SFLINZ
     A                                      SFLSIZ(0001)
     A                                      SFLPAG(0001)
     A            ERPGMQ                    SFLPGMQ(10)
     A          R DUMMY
     A*%%TS  SD  20000316  154100  JAMES       REL-V3R7M0  5716-PW1
     A                                      ASSUME
     A                                  1  9' '
     A          R RMVWDW
     A*%%TS  SD  20000316  154100  JAMES       REL-V3R7M0  5716-PW1
     A                                      FRCDTA
     A                                      CLRL(*NO)
     A                                      OVERLAY
<end QDDSSRC/ERA_EXITDF>

James Rich



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.