Français
Forum

Skalierbares-la fenêtre erstellen, sans Dicken cadre

 
- 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
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—
Webseite [...] 
20.09.2011  
 



« 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
 
21.09.2011  
 




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!
 
21.09.2011  
 




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

 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—Ë—
Webseite [...] 
22.09.2011  
 




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.
 
23.09.2011  
 




Jörg
Sellmeyer
ça va déjà!
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
23.09.2011  
 



Ah, bestimmt à cause de d'autre HTCAPTION.
 
23.09.2011  
 




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:  [...] 
 
11.11.2011  
 



 
- 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.
 
11.11.2011  
 




répondre


Topictitle, max. 100 marque.
 

Systemprofile:

ne...aucune Systemprofil angelegt. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

s'il te plaît s'inscrire um une Beitrag trop verfassen.
 

Options du sujet

29.664 Views

Untitledvor 0 min.
H.Brill16.09.2023
R.Schneider04.04.2022
Peter Max Müller01.11.2017
Jörg Sellmeyer04.02.2016
plus...

Themeninformationen



Admins  |  AGB  |  Applications  |  Auteurs  |  Chat  |  protection des données  |  Télécharger  |  Entrance  |  Aider  |  Merchantportal  |  Empreinte  |  Mart  |  Interfaces  |  SDK  |  Services  |  Jeux  |  cherche  |  Support

un projet aller XProfaner, qui il y a!


Mon XProfan
Privé Nouvelles
Eigenes Ablageforum
Sujets-La liste de voeux
Eigene Posts
Eigene Sujets
Zwischenablage
Annuler
 Deutsch English Français Español Italia
Traductions

protection des données


Wir verwenden Cookies seulement comme Session-Cookies à cause de qui technischen Notwendigkeit et chez uns gibt es aucun Cookies de Drittanbietern.

si du ici sur unsere Webseite klickst ou bien navigierst, stimmst du unserer Erfassung de Informationen dans unseren Cookies sur XProfan.Net trop.

Weitere Informationen trop unseren Cookies et en supplément, comment du qui Kontrolle par-dessus behältst, findest du dans unserer nachfolgenden Datenschutzerklärung.


d'accordDatenschutzerklärung
je voudrais keinen Cookie