English
Opportunities and suggestions

idea: negatives Größenangabe for Window and CreateWindow/Dlg

 
idea: gives one with Window with whom Parameters for Size, a negativen worth on, then are The internal Ausmasse meant.

SetWindowPos ditto of these "Feature" furnish would imho too meaningfully.

the example here verdeutlicht the trouble:
CompileMarkSeparation
window 100,100 - 100,100
rectangle 0,0 - 99,99
waitInput
end<
pre>

created logischerweise:



where desirable would, if it now one "xprofanes" Gegenmittel were. means in the principle something like  
[...]  here.

5 kB
Hochgeladen:12/04/08
Downloadcounter191
Download
 
12/04/08  
 




Jörg
Sellmeyer
in a, Why that here on Done standing. I find The idea super. Perhaps not negativen numbers, separate with a additional Parameter. or for may part too with Set("Client",1). thereafter then any Window, so created, that The Größenangabe as Clientgröße gewertet becomes.
 
XProfan X3
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
05/30/18  
 




RGH
... and already there ideas for a mögliches XProfan X5! ;)

there should I time look, whether The Wondows-API such a thing hergibt.

(but first make I times the USB-Sticks for subscribers ready and contact me then time again whom FreeProfan-versions To ...)

Greeting
Roland
 
XProfan X3
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
05/31/18  
 




Jörg
Sellmeyer
with AdjustWindowRect access one there already some. unfortunately becomes the Menu to Clientarea calculated what about me such strain, where one The Menühöhe read can.
 
XProfan X3
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
05/31/18  
 




Jörg
Sellmeyer
so can Schonmal The Standardsachen slay:
 $H windows.ph
 $H structs.ph
'RECT = Left&,Top&,Right&,Bottom&;
'  WS_BORDER = $800000;
'  WS_DLGFRAME = $400000;
'  WS_VSCROLL = $200000;
'  WS_HSCROLL = $100000;
'  WS_SYSMENU = $80000;
'  WS_THICKFRAME = $40000;
'  WS_DLGFRAME = $400000;
'  WS_EX_CLIENTEDGE = $200;
'  WS_EX_STATICEDGE = $20000;
Struct AdjustWindowRect = ~Rect

SubProc Create.XWindow

    'Parameters lever hParent, String sClass, sText ,Int iLeft, iTop, iWidth, iHeight,fMenu
    traceoff

    If %pcount = 4

        Parameters lever hParent, String sText ,Int iWidth, iHeight
        Declare Int iLeft, iTop
        Var Int fCenter = 1

    Else

        Parameters lever hParent, String sClass, sText ,Int iLeft, iTop, iWidth, iHeight

    EndIf

    Declare Mem WindowSize,Int fMenu
    Dim WindowSize,AdjustWindowRect

    With WindowSize

        .Left& = iLeft
        .Top& = iTop
        .Right& = iWidth + iLeft
        .Bottom& = iHeight + iTop

    EndWith

    With WindowSize

        If hParent = 0

            fMenu = hardship((%windowstyle & %10000))
            ~AdjustWindowRect(WindowSize,~WS_CAPTION | ~WS_THICKFRAME,fMenu)
            'fMenu gives on, whether a fenstermenü present is

            If SizeOf(fCenter) > 0

                Window (.Right& - .Left&),(.Bottom& - .Top&)

            Else

                Window .Left&,.Top& - (.Right& - .Left&),(.Bottom& - .Top&)

            EndIf

            SetText %hwnd,sText
            Return %hwnd

        ElseIf Upper $(sClass) = "DIALOG"

            ~AdjustWindowRect(WindowSize,~WS_CAPTION | ~WS_DLGFRAME,fMenu)
            Return Create("Dialog",hParent,sText,.Left&,.Top&,(.Right& - .Left&),(.Bottom& - .Top&))

        ElseIf Upper $(sClass) = "WINDOW"

            ~AdjustWindowRect(WindowSize,~WS_CAPTION | ~WS_THICKFRAME,fMenu)
            Return Create("Window",hParent,sText,.Left&,.Top&,(.Right& - .Left&),(.Bottom& - .Top&))

        ElseIf Upper $(sClass) = "CHILDWINDOW"

            ~AdjustWindowRect(WindowSize,~WS_CAPTION | ~WS_THICKFRAME,fMenu)
            Return Create("ChildWindow",hParent,sText,.Left&,.Top&,(.Right& - .Left&),(.Bottom& - .Top&))

        EndIf

    EndWith

ENDPROC

If &GetTickCount Mod 2

    Window Style %11111
    Var lever hwnd = Create("XWindow",0,"","Hauptfenster",100,100,800,600)

Else

    Window Style %11111
    Var lever hwnd = Create("XWindow",0,"Hauptfenster zentriert",800,600)

EndIf

Print be$(%windowstyle & ~WS_CAPTION)
Var lever hDlg1 = Create("XWindow",%hwnd,"Dialog","Dialog",%winleft + 250,%wintop + 150,400,300)
Var lever hDlg2 = Create("XWindow",%hwnd,"Window","Fenster",%winleft + 350,%wintop + 300,330,240)
Var lever hDlg3 = Create("XWindow",%hwnd,"ChildWindow","ChildWindow",50,350,300,200)
Print "Hauptfenster:",%winleft,%wintop,Width(hwnd),Height(hwnd)
Print "Dialog",Width(hDlg1),Height(hDlg1)
Print "Window",Width(hDlg2),Height(hDlg2)
Print "ChildWindow",Width(hDlg3),Height(hDlg3)

While 1

    WaitInput

Wend


Mühsamer Better get going, The whole possible Stilarten To respect.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
05/31/18  
 



would be one simply The internal Maße from the Äußeren take away, then should one The whole Stile or Randdicken not any more evaluate since the differences the Notwendige already give.
 
05/31/18  
 




Jörg
Sellmeyer
Yes - but to the Creation the Fensters, are The internal Maße Yes not yet famous. and the then even through AdjustWindowRect through the Stile staid.
one can naturally integrally brachial first the jeweilige Window create and then with SetWindowPos correct. but beautiful is differently...
 
XProfan X3
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
05/31/18  
 



already clear,

it remaining The Abwägung whether "schneller" and "einfacher", one Control first invisible To produce and then on The right place To bring instead of many values (möglicherweise from the Registry) To detect in the Unwissen whether on all OS the so too likewise enough is.

of my supposition to is a simples Window- and Clientrect simply "effizienter" and a still right Analog Messung.
 
05/31/18  
 




Jörg
Sellmeyer
the bliebe then nachzumessen...
 
XProfan X3
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
05/31/18  
 




Jörg
Sellmeyer
alas Yes: around the Reading the Menühöhe come You not around, there the Menu Yes to Client-Area counts.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
06/07/18  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

6.203 Views

Untitledvor 0 min.
Stringray01/05/22
Rolf Koch01/15/20
Thomas Zielinski09/06/19
Pedro Miguel05/17/19
More...

Themeninformationen

this Topic has 3 subscriber:

Jörg Sellmeyer (6x)
iF (3x)
RGH (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie