| |
|
|
 | Concepto: Gibt uno en Ventana en el Parametern para el Größe, una negativen Valor a, entonces son el inneren Ausmasse gemeint.
SetWindowPos ebenfalls con diesem "Feature" ausstatten wäre imho auch sinnvoll.
Das Ejemplo hier verdeutlicht el problema: KompilierenMarcaSeparación producido logischerweise:

Wobei wünschenswert wäre, si nun una "xprofanes" Gegenmittel gäbe. Also en el Principio algo como [...] hier. |
|
|
| |
|
|
|
 Jörg Sellmeyer | Keine Idea, por qué que aquí en hecho es. Yo finde el Concepto super. Tal vez no con negativen Pagar, pero con un zusätzlichen Parámetro. Oder Meinetwegen auch con Conjunto("Client",1). danach voluntad entonces todos Ventana, así producido, dass el Größenangabe como Clientgröße gewertet se. |
|
|
| |
|
|
|
 RGH | ... y ya hay Ideen para una mögliches XProfan X5! ;)
Como debería Yo veces schauen, si el Wondows-API así algo hergibt.
(Aber sólo mache Yo veces el USB-Sticks para el Abonnenten fertig y wende mich entonces veces otra vez el FreeProfan-Versionen a ...)
Saludo 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 | 31.05.2018 ▲ |
|
|
|
|
 Jörg Sellmeyer | Mit AdjustWindowRect erreicht uno como ya Einiges. Leider se el Menü a Clientarea gerechnet y yo such grad, wo uno el Menühöhe auslesen kann. |
|
|
| |
|
|
|
 Jörg Sellmeyer | So puede ser schonmal el Standardsachen erschlagen:
$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 Crear.XWindow
'Parámetros Handle hParent, String sClass, sText ,Int iLeft, iTop, iWidth, iHeight,fMenu
traceoff
If %pcount = 4
Parámetros Handle hParent, String sText ,Int iWidth, iHeight
Declarar Int iLeft, iTop
Var Int fCenter = 1
Más
Parámetros Handle hParent, String sClass, sText ,Int iLeft, iTop, iWidth, iHeight
EndIf
Declarar 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 = Not((%windowstyle & %10000))
~AdjustWindowRect(WindowSize,~WS_CAPTION | ~WS_THICKFRAME,fMenu)
'fMenu son a, si una fenstermenü disponible es
If SizeOf(fCenter) > 0
Ventana (.Right& - .Left&),(.Bottom& - .Top&)
Más
Ventana .Left&,.Top& - (.Right& - .Left&),(.Bottom& - .Top&)
EndIf
SetText %hwnd,sText
Volver %hwnd
ElseIf Upper$(sClass) = "DIÁLOGO"
~AdjustWindowRect(WindowSize,~WS_CAPTION | ~WS_DLGFRAME,fMenu)
Volver Crear("Dialog",hParent,sText,.Left&,.Top&,(.Right& - .Left&),(.Bottom& - .Top&))
ElseIf Upper$(sClass) = "WINDOW"
~AdjustWindowRect(WindowSize,~WS_CAPTION | ~WS_THICKFRAME,fMenu)
Volver Crear("Window",hParent,sText,.Left&,.Top&,(.Right& - .Left&),(.Bottom& - .Top&))
ElseIf Upper$(sClass) = "CHILDWINDOW"
~AdjustWindowRect(WindowSize,~WS_CAPTION | ~WS_THICKFRAME,fMenu)
Volver Crear("ChildWindow",hParent,sText,.Left&,.Top&,(.Right& - .Left&),(.Bottom& - .Top&))
EndIf
EndWith
ENDPROC
If &GetTickCount Mod 2
Ventana de Estilo %11111
Var Handle hwnd = Crear("XWindow",0,"","Hauptfenster",100,100,800,600)
Más
Ventana de Estilo %11111
Var Handle hwnd = Crear("XWindow",0,"Hauptfenster zentriert",800,600)
EndIf
Imprimir bin$(%windowstyle & ~WS_CAPTION)
Var Handle hDlg1 = Crear("XWindow",%hwnd,"Dialog","Dialog",%winleft + 250,%wintop + 150,400,300)
Var Handle hDlg2 = Crear("XWindow",%hwnd,"Window","Fenster",%winleft + 350,%wintop + 300,330,240)
Var Handle hDlg3 = Crear("XWindow",%hwnd,"ChildWindow","ChildWindow",50,350,300,200)
Imprimir "Hauptfenster:",%winleft,%wintop,Width(hwnd),Height(hwnd)
Imprimir "Dialog",Width(hDlg1),Height(hDlg1)
Imprimir "Window",Width(hDlg2),Height(hDlg2)
Imprimir "ChildWindow",Width(hDlg3),Height(hDlg3)
Mientras que 1
WaitInput
Wend
Mühsamer Será mejor que te va, el ganzen möglichen Stilarten a berücksichtigen. |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 31.05.2018 ▲ |
|
|
|
|
 | Würde uno simplemente el inneren Maße de los Äußeren abziehen, entonces debería uno el ganzen Stile oder Randdicken no mehr auswerten como el Differenzen el Notwendige ya hergeben. |
|
|
| |
|
|
|
 Jörg Sellmeyer | Sí - aber antes Erstellung la ventana, son el inneren Maße sí todavía no bekannt. Und el voluntad entonces eben por AdjustWindowRect mittels el Stile gesetzt. Se puede natürlich bastante brachial sólo el jeweilige Ventana redactar y luego con SetWindowPos korrigieren. Aber schön es anders...  |
|
|
| |
|
|
|
 | Schon klar,
lo restos el Abwägung si "schneller" y "einfacher", una Control sólo unsichtbar a erzeugen y luego a el richtige Punto a bringen en lugar de viele Werte (möglicherweise de el Registry) a ermitteln en el Unwissen si en allen OS el así auch gleichermaßen ausreichend es.
Meiner Vermutung después de es una simples Ventana- y Clientrect simplemente "effizienter" y una doch bastante analoge Messung. |
|
|
| |
|
|
|
 Jörg Sellmeyer | Das bliebe entonces nachzumessen... |
|
|
| |
|
|
|
 Jörg Sellmeyer | Ach sí: en el Auslesen el Menühöhe kommst du no herum, como el Menü sí a Client-Area zählt. |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 07.06.2018 ▲ |
|
|
|