Differently behaved features

Table 14. Differently behaved features

Object

Suggestion

MDI frames

WorkSpaceX

Need modification. Refer to the detailed information below.

Location: Of_setposition () function of pfc_w_statusbar in pfcwnsrv.pbl

Line Number: 72

Suggested Modifications:

Step 1: Add the rect structure variable to the pfcwnsrv.pbl with the following format.

global type rect from structure

long left

long top

long right

long bottom

end type

Step 2: Declare a local external function in the pfc_w_statusbar.

Function long GetWindowRect (long hwnd , ref rect lpRect) Library "user32"

Step 3: Rewrite the scripts in the Current PFC into the following:

long ll_bottompos, ll_rtn, ll_TopPos, ll_LeftPos
rect lr_WinRect
ll_rtn = getwindowrect (handle (iw_parentwindow), lr_WinRect)
ll_LeftPos = PixelsToUnits (lr_WinRect.Left, XPixelsToUnits!)
ll_TopPos = PixelsToUnits (lr_WinRect.Top, YPixelsToUnits!)
ll_bottompos = PixelsToUnits (lr_WinRect.bottom, YPixelsToUnits!)
If AppeonGetClientType( ) = 'PB' then
 // The Y Position of the Status Bar is the Bottom of 
 // the Frame Window minus the MicroHelpHeight minus 
 // the MicroHelpBorderHeight.
 ll_microhelp_ypos = & 
 (iw_parentwindow.y + iw_parentwindow.height + li_ypos_extra) - & 
 (iw_parentwindow.mdi_1.microhelpheight + ii_borderheight)
 
 // The desired X Position of the Status Bar is the 
 // Frame Right End minus the StatusBar window.  Also
 // subtract the extra spacing on win95.
 ll_desiredstatubar_xpos = & 
 iw_parentwindow.x + iw_parentwindow.workspacewidth() + 
 & ii_borderwidth - (ii_winmaxwidth + 12 + li_xpos_extra)
 
 // The Frame X Position.
 ll_frame_xpos = iw_parentwindow.x  + (2*ii_borderwidth) + 16
 if ll_desiredstatubar_xpos < ll_frame_xpos then
 // Status Bar would extend to the left of the frame.
  this.move(ll_frame_xpos , ll_microhelp_ypos)
  // Make the StatuBar the width of the frame.
  this.width = workspacewidth(iw_parentwindow) - (20 + li_xpos_extra)
 else 
  // Normal as large as defined Status Bar window.
  this.move(ll_desiredstatubar_xpos , ll_microhelp_ypos)
  this.width = ii_winmaxwidth
 end if
 else
 // The Y Position of the Status Bar is the Bottom of 
 // the Frame Window minus the MicroHelpHeight minus 
 // the MicroHelpBorderHeight.
 ll_microhelp_ypos = & 
 (ll_TopPos + iw_parentwindow.height + li_ypos_extra) - 
 & (iw_parentwindow.mdi_1.microhelpheight + ii_borderheight)
 // The desired X Position of the Status Bar is the 
 // Frame Right End minus the StatusBar window.  
 // Also subtract the extra spacing on win95.
 ll_desiredstatubar_xpos = & 
 ll_LeftPos + iw_parentwindow.workspacewidth() + & 
 ii_borderwidth - (ii_winmaxwidth + 12 + li_xpos_extra)
 ll_frame_xpos = ll_LeftPos  + (2*ii_borderwidth) + 16
 if ll_desiredstatubar_xpos < ll_frame_xpos then 
  // Status Bar would extend to the left of the frame.
  this.move(ll_frame_xpos , ll_bottompos - 70)
  // Make the StatuBar the width of the frame.
  this.width = iw_parentwindow.workspacewidth() - (20 + li_xpos_extra)
 else 
  // Normal as large as defined Status Bar window.
  this.move(ll_desiredstatubar_xpos , ll_bottompos - 70)
  this.width = ii_winmaxwidth
 end if
end if

WorkSpaceY

MDI frames

Resize Service

Need modification. Refer to the detailed information below.

Step 1: Change the wintype property for the w_examplemain object from MDI to main.

Step 2: Modify the pfc_open event in the n_exampleappmanager of the appexmfe.pbl as shown below:

Current scripts in PFC:

Open ( w_examplemain)
Appeon compliant scripts in PFC
Open ( w_frame)
opensheet(w_examplemain, w_frame, 0, layered!)

Step 3: Copy the following scripts from the pfc_preopen event for the w_examplemain object in the appexmfe.pbl to the pfc_preopen event for the w_frame object in the exmmain.pbl and then comment out the following scripts in this event.

// Set the frame window with the application manager.
gnv_app.of_SetFrame(w_examplemain)
gnv_app.of_SetMicrohelp(true)
// Enable the Status Bar Services
of_SetStatusBar(true)
if IsValid(inv_statusbar) then
 inv_statusbar.of_SetBorderType(0)
 inv_statusbar.of_SetGapWidth(40)
 inv_statusbar.of_Register ('debugsrv', 'bitmap', 'dbsvc.gif', 80)
 inv_statusbar.of_Register ('sqlspysrv', 'bitmap', 'sssvcoff.gif', 80)
 inv_statusbar.of_Register ('debuglogwin', 'bitmap', 'dlgwnoff.gif', 80)
 inv_statusbar.of_Register ('sqlspywin', 'bitmap', 'sswinoff.gif', 80)
 if gnv_app.ienv_object.Win16 then
  inv_statusbar.of_SetGDI(true)
  inv_statusbar.of_SetUser(true)
  end if
 inv_statusbar.of_SetTimer(true)
end if

Any

ClassName

Need modification. Refer to the detailed information below.

DETAILED INFORMATION

Location: Of_updatespending(powerobject) function of pfc_n_cst_luw in pfcapsrv.pbl

Appeon Unsupported Code: If ClassName(la_rc) = 'integer' or ClassName(la_rc)='long' Then

Line Number: 133

Change the code to:

if AppeonGetClientType( ) = 'PB' then
 If ClassName(la_rc) = 'integer' or ClassName(la_rc) = 'long' Then
 // Functionality was found.
 If la_rc < 0 Then Return -1
  If la_rc >= 1 Then
  lb_updatespending = True
  If TypeOf (lpo_tocheck) = DataWindow! Then
  la_rc = lpo_tocheck.Function Dynamic of_IsRoot()
  If ClassName(la_rc) = 'boolean' Then
   lb_updatespending = la_rc
  Else
  Return -1
  End If
  End If
 End If
  lb_performedtest = True
   End If
  else
  If ClassName(la_rc) = 'integer' or ClassName(la_rc) = 'long' or ClassName(la_rc) = 'number' Then
  If la_rc < 0 Then Return -1
     If la_rc >= 1 Then
       lb_updatespending = True
   If TypeOf (lpo_tocheck) = DataWindow! Then
   la_rc = lpo_tocheck.Dynamic of_IsRoot()
    If ClassName(la_rc) = 'boolean' then
     lb_updatespending = la_rc
    else
    Return -1
    End if
   End If
  End If
  lb_performedtest = True
 End If
end if