FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Rpreview MDI
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Rpreview MDI
Posted: Mon Aug 04, 2008 05:33 PM

To All

I have just upgraded to FWH 807 from fwh2.7 and one of the things I notice is that when I show a report to the screen with rpreview and it is being called from a MDI or child .. the MDI menu pops into view.. not the behavoir I was used to. I would just a soon not have the main MDI menu show thru the rpreview .. is there a new setting to NOT allow the MDI menu's to show from the previewer ??

Rick Lipkin
SC Dept of Health, USA

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Rpreview MDI
Posted: Mon Aug 04, 2008 06:27 PM

Rick,

In source\classes\rpreview.prg simply remove MDICHILD clause, and the preview will not appear as a MDICHILD window.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Rpreview MDI
Posted: Mon Aug 04, 2008 07:28 PM

Antonio

Wish there was a parameter you could pass from code that would disable the MDI clause ... I really prefer non mdi for the preview.

Or .. be able to blank out the MDI main window menu's ??

Rick

if ::oWndMain != nil .and. Upper( ::oWndMain:ClassName() ) == "TMDIFRAME"
DEFINE WINDOW ::oWnd ;
TITLE cTitle ;
COLOR CLR_BLACK,CLR_LIGHTGRAY ;
ICON oIcon ;
VSCROLL HSCROLL // MDICHILD
else
DEFINE WINDOW ::oWnd FROM 0, 0 TO 24, 80 ;
TITLE cTitle ;
COLOR CLR_BLACK,CLR_LIGHTGRAY ;
ICON oIcon ;
VSCROLL HSCROLL MENU ::BuildMenu()
endif

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Rpreview MDI
Posted: Tue Aug 05, 2008 04:30 AM

Rick,

I guess we need to decide a clause name to use to avoid the creation of a preview in a MDICHILD window. Other users have reported that they don't want the preview to become a MDICHILD window inside the main MDIFRAME.

So lets just decide what clause name to use :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Rpreview MDI
Posted: Tue Aug 05, 2008 10:27 AM

Antonio

I hope these words are not reserved .. but easily understandable would be
Modal and NonModal ??

Rick Lipkin

Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: Rpreview MDI
Posted: Sun Jan 11, 2009 10:46 AM

Hello Antonio,

I had a look into FWH200812 but I didn’t found a clause name to avoid the creation of a preview in a MDICHILD window.
Will this be available in 200901?
Thanks in advance
Otto

DEFINE FONT ::oFont NAME GetSysFont() SIZE 0, -12

if ::oWndMain != nil .and. Upper( ::oWndMain:ClassName() ) == "TMDIFRAME"
DEFINE WINDOW ::oWnd ;
TITLE cTitle ;
COLOR CLR_BLACK,CLR_LIGHTGRAY ;
ICON oIcon ;
VSCROLL HSCROLL MDICHILD
else
DEFINE WINDOW ::oWnd FROM 0, 0 TO 24, 80 ;
TITLE cTitle ;
COLOR CLR_BLACK,CLR_LIGHTGRAY ;
ICON oIcon ;
VSCROLL HSCROLL MENU ::BuildMenu()
endif

Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Rpreview MDI
Posted: Sun Jan 11, 2009 05:55 PM
Otto

The code is in rpreview.prg .. \source\classes .. here is the snipit :
//----------------------------------------------------------------------------//

METHOD BuildWindow() CLASS TPreview

   local oIcon, cTitle := "FiveWin Printing Preview", oCursor
   local hOldRes := GetResources(), oThis := Self
   
   DEFAULT ::oWndMain := WndMain()
   
   #ifdef __CLIPPER__
      ::cResFile := "Preview.dll"
   #else
      if ! IsWin64()
         ::cResFile := "Prev32.dll"
      else
         ::cResFile = "Prev64.dll"
      endif      
   #endif
   
   if SetResources( ::cResFile ) < 32
      MsgStop( ::cResFile + " not found, imposible to continue",;
               "FiveWin Printing Error" )
      return nil
   endif
   
   if ::oDevice != nil
      cTitle = ::oDevice:cDocument
   endif   

   if ::oWndMain != nil
      oIcon = ::oWndMain:oIcon
   else
      DEFINE ICON oIcon RESOURCE "Print"   
   endif

   DEFINE FONT ::oFont NAME GetSysFont() SIZE 0, -12

   if ::oWndMain != nil .and. Upper( ::oWndMain:ClassName() ) == "TMDIFRAME"
      DEFINE WINDOW ::oWnd ;
         TITLE cTitle ;
         COLOR CLR_BLACK,CLR_LIGHTGRAY      ;
         ICON  oIcon                        ;
         VSCROLL HSCROLL //   MDICHILD    <-- rem this out
   else      
      DEFINE WINDOW ::oWnd FROM 0, 0 TO 24, 80  ;
         TITLE cTitle ;
         COLOR CLR_BLACK,CLR_LIGHTGRAY      ;
         ICON  oIcon                        ;
         VSCROLL HSCROLL MENU ::BuildMenu()
   endif
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: Rpreview MDI
Posted: Sun Jan 11, 2009 06:25 PM

Thank you Rick.
I knew that. But I thought “Modal and NonModal” should become a feature of rPreview that you can instantiate rprieview with parameter “MODAL” or "NONMODAL”.
Regards,
Otto

Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Rpreview MDI
Posted: Sun Jan 11, 2009 07:23 PM

Otto

I agree .. there needs to be a parameter to pass to turn off the MDI clause.

Rick

Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: Rpreview MDI
Posted: Mon Jan 12, 2009 12:47 AM

there is an error search on forum an old my post I correct it !!!

Best Regards, Saludos



Falconi Silvio

Continue the discussion