Rpreview MDI

Rpreview MDI

Postby Rick Lipkin » Mon Aug 04, 2008 5: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
User avatar
Rick Lipkin
 
Posts: 2618
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Postby Antonio Linares » Mon Aug 04, 2008 6: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Rick Lipkin » Mon Aug 04, 2008 7: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
User avatar
Rick Lipkin
 
Posts: 2618
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Postby Antonio Linares » Tue Aug 05, 2008 4: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Rick Lipkin » 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
User avatar
Rick Lipkin
 
Posts: 2618
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Rpreview MDI

Postby Otto » 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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

Re: Rpreview MDI

Postby Rick Lipkin » Sun Jan 11, 2009 5:55 pm

Otto

The code is in rpreview.prg .. \source\classes .. here is the snipit :
Code: Select all  Expand view
//----------------------------------------------------------------------------//

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
User avatar
Rick Lipkin
 
Posts: 2618
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Rpreview MDI

Postby Otto » Sun Jan 11, 2009 6: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

Re: Rpreview MDI

Postby Rick Lipkin » Sun Jan 11, 2009 7:23 pm

Otto

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

Rick
User avatar
Rick Lipkin
 
Posts: 2618
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Rpreview MDI

Postby Silvio » 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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 117 guests