Re: Frames in Window
	
	
	
	
-------Phoenix-Boundary-07081998-
Hola, CK's Yahoo Mail escribi=F3 el 10/01/2001 11:35:21 a.m.:
>Anybody know how to implement frames in a window=3F See Outlook Express for
>example implementation.
Hi,
I'm not sure if this is what you are asking for (since I don't use outlook)
but I think it would be useful to somebody. It's a two pane or two frames
window with a splitter and it  resizes with the window. I have an improved
version (some minor changes, minimum limits ) if this is what you need I'll
post it.
---------------8<----------------
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D--
-- Skeleton for a window with frames (Explorer style)
-- EuDesigner v 1.0 Alpha was used for initial definitions
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D--
without warning               -- Uncomment after testing!
include win32Lib.ew           -- David Cuny's Win32 Euphoria wrapper
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D--
--                            object declarations
--
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D--
-- newForm
global constant newForm=3D
  create(Window, "New Form", 0, 73, 82, 556, 437,  0)
  setWindowBackColor(newForm, 12632256)
  setIcon(newForm, IDI_APPLICATION)
-- Control in the Left frame
-- newFormMleText2
global constant newFormMleText2=3D
  create(MleText, "newFormMleText2", newForm, 7, 24, 240, 366,  0)
-- Control in the Right frame
-- newFormMleText3
global constant newFormMleText3=3D
  create(MleText, "newFormMleText3", newForm, 259, 24, 240, 366,  0)
global sequence DragLine
global integer DragState
DragState =3D 1 --Normal no dragging
integer OldX, Xmid, Xmax, Ymin,  Ymax
constant Xmin =3D 0
Xmid =3D 254
constant DivPointer =3D createMousePointer( 8, 8, {
          "       ...       ",
          "       .x.       ",
          "       .x.       ",
          "       .x.       ",
          "    .  .x.  .    ",
          "   ..  .x.  ..   ",
          "  .x....x....x.  ",
          " .xxxxx.x.xxxxx. ",
          ".xxxxxx.x.xxxxxx.",
          " .xxxxx.x.xxxxx. ",
          "  .x....x....x.  ",
          "   ..  .x.  ..   ",
          "    .  .x.  .    ",
          "       .x.       ",
          "       .x.       ",
          "       .x.       ",
          "       ...       "} )
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D--
global procedure onResize_newForm( integer style, integer cx, integer cy )
  sequence size
  -- get the size of client area of window
  size =3D getClientRect( newForm )
  Ymin =3D size[2]        -- New y, depends on toolbar visible etc
  Xmax =3D size[3] - Xmin -- New max X after resize of window
  Ymax =3D size[4] - Ymin -- New max y
  -- Adjust size of Mle controls
  moveWindow( newFormMleText2, Xmin, Ymin, Xmid , Ymax , True )
  moveWindow( newFormMleText3, Xmid + 2, Ymin, Xmax - Xmid - 2, Ymax , True
)
  -- Div bar, espace to drag
  DragLine =3D {Xmid - 1, Ymin, Xmid + 4, Ymax}
end procedure
onResize[newForm] =3D routine_id("onResize_newForm")
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D--
global procedure onMouse_newForm( integer event, integer x, integer y,
integer shift )
  if event =3D MouseMove then
    if x > DragLine[1] and x< DragLine[3] and y > DragLine[2] and y<
DragLine[4] then
        if DragState =3D 1 then
          captureMouse( newForm )
          setMousePointer( newForm, DivPointer )
          DragState =3D 2 -- Over hot area
        end if
    else
        if DragState =3D 2 then
          setMousePointer( newForm, NULL )
          releaseMouse()
          DragState =3D 1
        elsif DragState =3D 3 then -- moving on dragging
          drawLine( newForm, OldX, DragLine[2], OldX, DragLine[4] )
          OldX=3D x
          drawLine( newForm, OldX, DragLine[2], OldX, DragLine[4] )
        end if
    end if
  elsif event =3D LeftDown then -- User pressed left mouse button to drag
bar
    if DragState =3D 2 then
      DragState =3D 3 -- On drag
      setPenColor( newForm, White )
      setPenWidth( newForm, 4 )
      setPenROP2( newForm, R2_NOT )
      OldX=3D DragLine[1] + 2
      drawLine( newForm, OldX, DragLine[2], OldX, DragLine[4] )
    end if
  elsif event =3D LeftUp then -- User release mouse button
    if DragState =3D 3 then
      setMousePointer( newForm, NULL )
      releaseMouse()
      DragState =3D 1
      drawLine( newForm, OldX, DragLine[2], OldX, DragLine[4] )
      if x > Xmin and x < Xmax then -- verify a valid horizontal resize
        Xmid =3D x -- New position for div bar
        moveWindow( newFormMleText2, Xmin, Ymin, Xmid , Ymax , True )
        moveWindow( newFormMleText3, Xmid + 2, Ymin, Xmax - Xmid - 2, Ymax
, True )
        DragLine =3D {Xmid - 1, Ymin, Xmid + 4, Ymax} --new hot div area
      end if
    end if
  end if
end procedure
onMouse[newForm] =3D routine_id("onMouse_newForm")
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D--
-- Program entrypoint
WinMain(newForm, Normal)
-----------------8<---------------
Fabio
-------------------------------------
Fabio Ramirez R.
Administrador de Redes - CSI
-------------------------------------
-------Phoenix-Boundary-07081998---
	
	
		| 
									Not Categorized, Please Help
						 |  |