Article View: borland.public.vdbase.forms
Article #42Re: Displaying _app.framewin in an application
From: Romain Strieff [TeamB]
Date: Thu, 11 Mar 1999 00:00
Date: Thu, 11 Mar 1999 00:00
118 lines
3769 bytes
3769 bytes
In article <36e70a79.2185270@forums.borland.com>, Ken Mayer [TeamB]
politely paraphrased ...
>
> >tutorial, it has almost everything. (only a missing toolbar on
> >_app.framewin, missing EDIT menu and the Windows one misses the
> >cascade... stuff <hint> <BG>)
>
> I couldn't find the Windows cascade and such ... wanna tell me how to
> do that?
----
Here's an example from Jim Sare, all in 1 file and run.
If Type("GetParent") # "FP"
extern CHANDLE GetParent(CHANDLE) User32
EndIf
If Type("SendMessage") # "FP"
extern CLONG SendMessage(CHANDLE, CINT, CWORD, CLONG) User32 from
"SendMessageA"
EndIf
#define MDITILE_HORIZONTAL 1
#define MDITILE_VERTICAL 0
#define WM_MDIICONARRANGE HToI("0228")
#define WM_MDICASCADE HToI("0227")
#define WM_MDITILE HToI("0226")
#define WM_MDINEXT HToI("0224")
set proc to program(1) addi
f=new form()
f.open()
NEW MDITMPMENU(f,"Root")
f=new form()
f.left=10
f.open()
NEW MDITMPMENU(f,"Root")
shell(false)
return
** END HEADER -- do not delete *
* Erstellt am 26/02/99
*
Parameter FormObj
NEW MDITMPMENU(FormObj,"Root")
CLASS MDITMPMENU(FormObj,Name) OF MENUBAR(FormObj,Name)
DEFINE MENU FILE OF THIS;
PROPERTY;
Text "&File"
DEFINE MENU EXIT OF THIS.FILE ;
PROPERTY;
Text "E&xit",;
OnClick {; FORM.Close()}
DEFINE MENU WINDOW OF THIS;
PROPERTY;
Text "&Window"
DEFINE MENU NEXT OF THIS.WINDOW;
PROPERTY;
Text "&Next",;
OnClick ;
{; SendMessage(GetParent(FORM.hWND), HToI("0224"), 0, 0)}
DEFINE MENU CASCADE OF THIS.WINDOW;
PROPERTY;
Text "&Cascade",;
OnClick;
{; SendMessage(GetParent(FORM.hWND), HToI("0227"), 0, 0)}
DEFINE MENU TILE_HORIZONTALLY OF THIS.WINDOW;
PROPERTY;
Text "&Tile Horizontally",;
OnClick;
{; SendMessage(GetParent(FORM.hWND), HToI("0226"), 1, 0)}
DEFINE MENU TILE_VERTICALLY OF THIS.WINDOW;
PROPERTY;
Text "Tile &Vertically",;
OnClick ;
{; SendMessage(GetParent(FORM.hWND), HToI("0226"), 0, 0)}
DEFINE MENU ARRANGE_ICONS OF THIS.WINDOW;
PROPERTY;
Text "&Arrange Icons",;
OnClick;
{; SendMessage(GetParent(FORM.hWND), HToI("0228"), 0, 0)}
DEFINE MENU HELP OF THIS;
PROPERTY;
Text "Help"
this.windowMenu = this.window
ENDCLASS
> I left out the EDIT menu intentionally, as there are EDIT buttons on
> the button bar that is placed on the forms.
>
> And I left out toolbars because the thing is complex enough that I
> didn't want to get into toolbars and toolbuttons ...
>
> So there!
---
Same way IMO, the buttons on the toolbar use much less resources since
they are there only _once_ even if 50 forms are open.
--
Romain Strieff [TeamB]
Please read this newsgroup guide below before
posting on the private Inprise newsgroups.
http://www.inprise.com/newsgroups/guide.html
--
Technical Details
Message-ID:
<MPG.115163f795ba5af798a040@forums.inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36E1913D.4E0AD99F@skynet.be> <MPG.114e02c1f72de764989fee@forums.inprise.com> <36E58103.D5FAE3C6@skynet.be> <MPG.11505dbcfae0d1d598a025@forums.inprise.com> <36e70a79.2185270@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 15bdfb,3d17d451bc2c03d0 X-Google-Attributes: gid15bdfb,public From: teamb@opto-pps.com (Romain Strieff [TeamB]) Subject: Re: Displaying _app.framewin in an application Date: 1999/03/11 Message-ID: <MPG.115163f795ba5af798a040@forums.inprise.com> X-Deja-AN: 453666709 References: <36E1913D.4E0AD99F@skynet.be> <MPG.114e02c1f72de764989fee@forums.inprise.com> <36E58103.D5FAE3C6@skynet.be> <MPG.11505dbcfae0d1d598a025@forums.inprise.com> <36e70a79.2185270@forums.borland.com> Organization: TeamB Newsgroups: borland.public.vdbase.forms