English
Forum

Subclassing one Edit-Field

 
- Page 1 -



Stephan
Sonneborn
Hi,

wieso becomes The Message EM_GETMODIFY not ausgewertet, The Message WM_KEYUP but already?
'************************************************************************************************
'* SubClassing                                                                                  *
'************************************************************************************************
 $H MESSAGES.PH
DECLARE Edit&
DECLARE end%
'+----------------------------------------------------------------------------------------------+

SUBCLASSPROC

    IF SUBCLASSMESSAGE(Edit&, ~EM_GETMODIFY)

        'IF SUBCLASSMESSAGE(Edit&, ~WM_KEYUP)

        IF GETTEXT$(Edit&) = "Ende"

            LOCATE 10,1
            PRINT "Einfach clicking for "; GETTEXT$(Edit&)
            end% = 1

        ENDIF

        SET("WinProc", 0)

    ENDIF

ENDPROC

'+----------------------------------------------------------------------------------------------+
CLS
Edit& = CREATE("Edit",%HWND, "", 10,10,100,20)
SUBCLASS Edit&,1

WHILENOT end%

    WAITINPUT

WEND

SUBCLASS Edit&,0
END
 
XProfan X4
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
10/04/20  
 



« this Posting watts as Solution marked. »


Matthias
Arlt
If already SubClassing, then about so:
SUBCLASSPROC

    IF SUBCLASSMESSAGE(Edit&, ~WM_KEYUP) OR SUBCLASSMESSAGE(Edit&, ~WM_PASTE)

        SET("WinProc", 1)
        LOCATE 10,1
        PRINT "Subclassing erfolgreich"

    ENDIF

    IF SendMessage(Edit&,~EM_GETMODIFY,0,0)

        IF GETTEXT$(Edit&) = "Ende"

            PRINT "Einfach clicking for "; GETTEXT$(Edit&)
            waitinput
            end% = 1

        ENDIF

    ENDIF

ENDPROC


with such "Eingabeaufforderung" in the SubClassproc is the but no very elegant Solution... and really need it for no SubClassing, because so goes it too:
CLS
Edit& = CREATE("Edit",%HWND, "", 10,10,100,20)

WHILENOT end%

    WAITINPUT

    IF SendMessage(Edit&,~EM_GETMODIFY,0,0)

        IF GETTEXT$(Edit&) = "Ende"

            PRINT "Einfach clicking for "; GETTEXT$(Edit&)
            waitinput
            end% = 1

        ENDIF

    ENDIF

WEND

END

it be because, You need the SubClassing yet for further, here not yet encompassed functions...

the EM_GETMODIFY is in both Make entbehrlich and serves only to demonstration, where and how one it anwendet.

Greeting Matthias
 
WinXP SP2, Win7 - XProfan 10/11/FreeProfan32 - Xpia
10/07/20  
 




Matthias
Arlt

lt. Win32hlp: on application sends on EM_GETMODIFY message to determine whether the content of on edit control has been modified.


EM_GETMODIFY should means first of all on the Edit gesendet go. How WM_KEYUP indeed...through release of/ one Button...

Greeting Matthias
 
WinXP SP2, Win7 - XProfan 10/11/FreeProfan32 - Xpia
10/05/20  
 



EM_GETMODIFY  [...]  should one (by SendMessage) on the Edit Send and on the Return Value discern, whether the Edit "modifiziert" watts.

Subclassmessage would hierbei helpful If Windows The Message ans Edit sends, what but not the case is.

there's but too EN_CHANGE (  [...]  ) - vlt. sooner what You seek.
 
10/05/20  
 




Stephan
Sonneborn
iF (05.10.2020)
there's but too EN_CHANGE (  [...]  ) - vlt. sooner what You seek.


Hm. No. goes neither...
WM_KEYUP would Yes OK, but if something by Clipboard and Context menu einfügt, I get not with...
 
XProfan X4
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
10/05/20  
 




Matthias
Arlt

...if something by Clipboard and Context menu einfügt, I get not with...


still, simply on WM_PASTE react...very How WM_KEYUP.
 
WinXP SP2, Win7 - XProfan 10/11/FreeProfan32 - Xpia
10/05/20  
 




Stephan
Sonneborn
Hm... somehow can I then quite nothing more insert by CTRL+V or RMT+Insert...
'************************************************************************************************
'* SubClassing                                                                                  *
'************************************************************************************************
 $H MESSAGES.PH
DECLARE Edit&
DECLARE end%
'+----------------------------------------------------------------------------------------------+

SUBCLASSPROC

    'IF SUBCLASSMESSAGE(Edit&, ~EM_GETMODIFY)

    IF SUBCLASSMESSAGE(Edit&, ~WM_KEYUP) OR SUBCLASSMESSAGE(Edit&, ~WM_PASTE)

        IF GETTEXT$(Edit&) = "Ende"

            LOCATE 10,1
            PRINT "Einfach clicking for "; GETTEXT$(Edit&)
            end% = 1

        ENDIF

        SET("WinProc", 0)

    ENDIF

ENDPROC

'+----------------------------------------------------------------------------------------------+
CLS
Edit& = CREATE("Edit",%HWND, "", 10,10,100,20)
SUBCLASS Edit&,1

WHILENOT end%

    WAITINPUT

WEND

SUBCLASS Edit&,0
END
 
XProfan X4
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
10/06/20  
 




Matthias
Arlt
The einzufügende String must naturally too at Edit arrive. means The Message not only intercepting, separate to entry too on The originale WindowProc of Edit weiterreichen by 'SET("WinProc", 1)'. or but self treat (bspw. 'settext'...)

Greeting Matthias
 
WinXP SP2, Win7 - XProfan 10/11/FreeProfan32 - Xpia
10/06/20  
 




Stephan
Sonneborn
Matthias Arlt (06.10.2020)
The einzufügende String must naturally too at Edit arrive. means The Message not only intercepting, separate to entry too on The originale WindowProc of Edit weiterreichen by 'SET("WinProc", 1)'. or but self treat (bspw. 'settext'...)

Greeting Matthias


Vielen Thanks for your Help, Matthias!
Have now WinProc again eingeschaltet. thereafter wished I then the Edit-area evaluate... without success.
'************************************************************************************************
'* SubClassing                                                                                  *
'************************************************************************************************
 $H MESSAGES.PH
DECLARE Edit&
DECLARE end%
'+----------------------------------------------------------------------------------------------+

SUBCLASSPROC

    'IF SUBCLASSMESSAGE(Edit&, ~EM_GETMODIFY)

    IF SUBCLASSMESSAGE(Edit&, ~WM_KEYUP) OR SUBCLASSMESSAGE(Edit&, ~WM_PASTE)

        SET("WinProc", 1)
        LOCATE 10,1
        PRINT "Subclassing erfolgreich"

        IF GETTEXT$(Edit&) = "Ende"

            PRINT "Einfach clicking for "; GETTEXT$(Edit&)
            end% = 1

        ENDIF

    ENDIF

ENDPROC

'+----------------------------------------------------------------------------------------------+
CLS
Edit& = CREATE("Edit",%HWND, "", 10,10,100,20)
SUBCLASS Edit&,1

WHILENOT end%

    WAITINPUT

WEND

SUBCLASS Edit&,0
END
 
XProfan X4
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
10/07/20  
 




Matthias
Arlt
If already SubClassing, then about so:
SUBCLASSPROC

    IF SUBCLASSMESSAGE(Edit&, ~WM_KEYUP) OR SUBCLASSMESSAGE(Edit&, ~WM_PASTE)

        SET("WinProc", 1)
        LOCATE 10,1
        PRINT "Subclassing erfolgreich"

    ENDIF

    IF SendMessage(Edit&,~EM_GETMODIFY,0,0)

        IF GETTEXT$(Edit&) = "Ende"

            PRINT "Einfach clicking for "; GETTEXT$(Edit&)
            waitinput
            end% = 1

        ENDIF

    ENDIF

ENDPROC


with such "Eingabeaufforderung" in the SubClassproc is the but no very elegant Solution... and really need it for no SubClassing, because so goes it too:
CLS
Edit& = CREATE("Edit",%HWND, "", 10,10,100,20)

WHILENOT end%

    WAITINPUT

    IF SendMessage(Edit&,~EM_GETMODIFY,0,0)

        IF GETTEXT$(Edit&) = "Ende"

            PRINT "Einfach clicking for "; GETTEXT$(Edit&)
            waitinput
            end% = 1

        ENDIF

    ENDIF

WEND

END

it be because, You need the SubClassing yet for further, here not yet encompassed functions...

the EM_GETMODIFY is in both Make entbehrlich and serves only to demonstration, where and how one it anwendet.

Greeting Matthias
 
WinXP SP2, Win7 - XProfan 10/11/FreeProfan32 - Xpia
10/07/20  
 




Stephan
Sonneborn
Hello Matthias,

many Thanks for your example!

the power it klarer! I wanted to me simply at times The "neuen" functions carriages. as target should it yes a Vokabeltrainer go.

what about me wished over Subclassing a Zeitmesser run. Klappt too very well!

And then wished I during the input of/ one response with a change one Icons for correctly. or wrong a feedback give.

the example supra ought to the trouble only vereinfacht present. i think, now I get it there!
 
XProfan X4
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
10/08/20  
 




Matthias
Arlt
Hello Stephan,
then good Success! Freut me, if I a little bit moreover contribute could...
Greeting Matthias
 
Alle Sprachen
WinXP SP2, Win7 - XProfan 10/11/FreeProfan32 - Xpia
10/08/20  
 



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.133 Views

Untitledvor 0 min.
Gast.0815 vor 13 Tagen
Member 862464105/20/24
Normann Strübli02/03/23
Walter12/30/22
More...

Themeninformationen



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