| |
| |
|
| - page 1 - |
|
 Julian Schmidt | Salut, je serait volontiers aus optischen Trouvé un la fenêtre erstellen cela weiterhin skalierbar ist, allerdings keinen Dicken cadre besitzt. Ist so quelque chose possible?
LG
Julian57 |
|
| |
| |
| |
|
 |
« cette Beitrag wurde comme Solution gekennzeichnet. » |
|
| - page 2 - |
|
 Andreas Miethe
 | iF (21.09.11)
tu as oui déjà une fetten Block: cas (%mouseXheight(%hWnd)-10) : hwnd.scaleByMouse()
iF (21.09.11)
là peux Du doch qui hWnd.scaleByMouse-Proc comme paramètre transfert quelle coin/ bord gemeint était afin de Ersparen cela Du cela dans qui Proc seulement wieder ermitteln musst.
cela allez mir irgendwie vers den Strich 
cela wird normalement sur qui Message WM_NCHITTEST geregelt.
ici la fois un kleines Beispiel pour une skalier / verschiebbaren Button. Sollte sich wohl pour un la fenêtre anpassen laisser.
$H Windows.ph
$H Messages.ph
$H Structs.ph
STRUCT TRect = ~Rect
STRUCT TPoint = ~Point
Proc HitTest
Paramètres hCtl&,lParam&
Déclarer Point#
Déclarer Rect#
Faible Point#,TPoint
Faible Rect#,TRect
Point#.x& = LoWord(lParam&)
Point#.y& = HiWord(lParam&)
~ScreenToClient(hCtl&,Point#)
~GetWindowRect(hCtl&,Rect#)
~MapWindowPoints(~GetDesktopWindow(),%Hwnd,Rect#,2)
Si (Point#.y& < 4) AND (Point#.x& < 4)
Dispose Point#,Rect#
Retour ~HTTOPLEFT
ElseIf (Point#.y& < 4) AND (Point#.x& >= (Rect#.right& - Rect#.left&-4))
Dispose Point#,Rect#
Retour ~HTTOPRIGHT
ElseIf (Point#.y& >= (Rect#.bottom& - Rect#.top&-4)) AND (Point#.x& >= (Rect#.right& - Rect#.left&-4))
Dispose Point#,Rect#
Retour ~HTBOTTOMRIGHT
ElseIf (Point#.x& < 4) AND (Point#.y& >= (Rect#.bottom& - Rect#.top& - 4))
Dispose Point#,Rect#
Retour ~HTBOTTOMLEFT
ElseIf Point#.y& < 4
Dispose Point#,Rect#
Retour ~HTTOP
ElseIf Point#.x& < 4
Dispose Point#,Rect#
Retour ~HTLEFT
ElseIf Point#.x& >= (Rect#.right& - Rect#.left& - 4)
Dispose Point#,Rect#
Retour ~HTRIGHT
ElseIf Point#.y& >= (Rect#.bottom& - Rect#.top& - 4)
Dispose Point#,Rect#
Retour ~HTBOTTOM
D'autre
Dispose Point#,Rect#
Retour ~HTCAPTION
EndIf
ENDPROC
SubClassProc
Si SubClassMessage(&sWnd,~WM_NCHITTEST)
Set("WinProc", 0)
Retour HitTest(&swnd,&slParam)
Endif
ENDPROC
cls
Var Ende& = 0
Var Button& = Créer("Button",%hwnd,"OK",10,10,120,30)
SubClass Button&,1
whilenot ende&
waitinput
endwhile
|
|
| |
| Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...]  | 21.09.2011 ▲ |
|
| |
 |
|
|
| |
| |
| - page 2 - |
|
 | | je ne sais pas si es sinnvoller ist z.B. chez chacun Mausbewegung statt seulement einmalig pour Klick trop vérifier dans welchen Bereich geklickt wurde. oO |
|
| |
| |
| |
|
|
 Andreas Miethe
 | bof, zumindest wird chez Mausbewegung juste qui richtige Cursor angezeigt et pas seulement pour ''KLICK''  |
|
| |
| Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...]  | 21.09.2011 ▲ |
|
| |
|
|
 | Hm, wirds doch beim 1. Beispiel en supplément aussi:
'URL: https://XProfan.com/intl/de/forum/skalierbares-la fenêtre-erstellen-sans-dicken-cadre/
/*
{$ Cleq}
{$compiler c:\XProfan11\}
{$runtime c:\XProfan11\}
*/
style de fenêtre 1 | 2 | 8 | 16 | 512
window 640,480
messages de l'utilisateur 16,513,20//wm_close,wm_lButtonDown,wm_eraseBkGnd
subClass %hWnd,1
tandis que 1
waitInput
sélectionner %uMessage
caseof 16 : pause
caseof 513
cas (%mouseX>width(%hWnd)-10) and (%mouseY>height(%hWnd)-10) : hWnd.scaleByMouse()
EndSelect
Wend
end
subClassProc
cas subClassMessage(%hWnd, 512):useCursor (%mouseX>width(%hWnd)-10) and (%mouseY>height(%hWnd)-10)*7//wm_mouseMove
endProc
proc hWnd.scaleByMouse
declare m#
dim m#,8
external("user32","GetCursorPos",m#)
var omx%=long(m#,0)
var omy%=long(m#,4)
var wi&=%winRight-%winLeft
var he&=%winBottom-%winTop
tandis que isKey(1)
waitInput 10
external("user32","GetCursorPos",m#)
setWindowPos %hWnd=%winLeft,%winTop - wi&-omx%+long(m#,0),he&-omy%+long(m#,4)
Wend
dispose m#
endProc
-
ist arrêt wm_mouseMove statt wm_ncHitTest.
Nachtrag: Ah, maintenant vois Je l' Unterschied et Vorteil!  |
|
| |
| |
| |
|
|
 Julian Schmidt | qui Voir le texte source avec wm_ncHitTest funktioniert wirklich super! merci Andreas 
$H Windows.ph
$H Messages.ph
$H Structs.ph
STRUCT TRect = ~Rect
STRUCT TPoint = ~Point
Proc HitTest
Paramètres hCtl&,lParam&
Déclarer Point#
Déclarer Rect#
Faible Point#,TPoint
Faible Rect#,TRect
Point#.x& = LoWord(lParam&)
Point#.y& = HiWord(lParam&)
~ScreenToClient(hCtl&,Point#)
~GetWindowRect(hCtl&,Rect#)
~MapWindowPoints(~GetDesktopWindow(),%Hwnd,Rect#,2)
Si (Point#.y& < 4) AND (Point#.x& < 4)
Dispose Point#,Rect#
Retour ~HTTOPLEFT
ElseIf (Point#.y& < 4) AND (Point#.x& >= (Rect#.right& - Rect#.left&-4))
Dispose Point#,Rect#
Retour ~HTTOPRIGHT
ElseIf (Point#.y& >= (Rect#.bottom& - Rect#.top&-4)) AND (Point#.x& >= (Rect#.right& - Rect#.left&-4))
Dispose Point#,Rect#
Retour ~HTBOTTOMRIGHT
ElseIf (Point#.x& < 4) AND (Point#.y& >= (Rect#.bottom& - Rect#.top& - 4))
Dispose Point#,Rect#
Retour ~HTBOTTOMLEFT
ElseIf Point#.y& < 4
Dispose Point#,Rect#
Retour ~HTTOP
ElseIf Point#.x& < 4
Dispose Point#,Rect#
Retour ~HTLEFT
ElseIf Point#.x& >= (Rect#.right& - Rect#.left& - 4)
Dispose Point#,Rect#
Retour ~HTRIGHT
ElseIf Point#.y& >= (Rect#.bottom& - Rect#.top& - 4)
Dispose Point#,Rect#
Retour ~HTBOTTOM
D'autre
Dispose Point#,Rect#
Retour ~HTCAPTION
EndIf
ENDPROC
SubClassProc
Si SubClassMessage(&sWnd,~WM_NCHITTEST)
Set("WinProc", 0)
Retour HitTest(&swnd,&slParam)
Endif
ENDPROC
style de fenêtre 2+16+64
window 600,400
cls 255
var dg&=Créer("Window",%hwnd,»,10,10,200,100)
Début de peinture dg&
cls 255
EndPaint
SubClass dg&,1
SubClass %hwnd,1
tandis que 1
waitinput 30
cas iskey(27) : end
endwhile
|
|
| |
| |
| |
|
|
 Jörg Sellmeyer | | Na - si cela pas Rolf pour seinen ROC gebrauchen peux, sais ich's aussi pas. Irgendwer woltte doch aussi la fois Edits skalieren. on ici zwar pas reinschreiben mais pour une Entwurfsmodus ist cela doch grandiose!! |
|
| |
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 23.09.2011 ▲ |
|
| |
|
|
 | | Vlt. encore nen Déplacer avec einbauen. |
|
| |
| |
| |
|
|
 Jörg Sellmeyer | |
| |
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 23.09.2011 ▲ |
|
| |
|
|
 | | Ah, bestimmt à cause de d'autre HTCAPTION. |
|
| |
| |
| |
|
|
 Jörg Sellmeyer | | peux on cela so einrichten, qui es avec Statics également funktioniert? |
|
| |
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 11.11.2011 ▲ |
|
| |
|
|
 | de Andreas seiner variante per wm_ncHitTest sais je es pas mais avec "meiner" analogeren variante ginge es aussi avec unsichtbaren Controls: [...]  |
|
| |
| |
| |
|
| |
| |
| - page 3 - |
|
|
 Jörg Sellmeyer | quoi meinst Du avec unsichtbaren Controls? Irgendwie mag je qui variante de Andreas plus, quoique Votre aussi intéressant ist. qui de Andreas scheint mir systemnäher. |
|
| |
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 11.11.2011 ▲ |
|
| |
|
|
 | Andreas sa est comme de System gedacht ist et "meine" variante ist plutôt une analoge Selbermachvariante.
Beide Varianten avons ses avant- et Nachteile. chez "meiner" variante hat on plus Eingriffsmöglichkeiten et peux aussi Verschiebungen ermöglichen qui vom System plan pas "gedacht" sommes. qui alors Controls comment vom System gedacht Déplacer voudrais nimmt wm_ncHitTest et pour Spezialitäten arrêt qui analogere variante. |
|
| |
| |
| |
|