| |
|
|
 | 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 created logischerweise:

where desirable would, if it now one "xprofanes" Gegenmittel were. means in the principle something like [...] here. |
|
|
| |
|
|
|
 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. |
|
|
| |
|
|
|
 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 X3Intel 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. |
|
|
| |
|
|
|
 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. |
|
|
| |
|
|
|
 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...  |
|
|
| |
|
|
|
 | 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. |
|
|
| |
|
|
|
 Jörg Sellmeyer | the bliebe then nachzumessen... |
|
|
| |
|
|
|
 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 ▲ |
|
|
|