English
Entrance

Fernsteuern / Text copy prevent

 
- Page 1 -



Walter
Hello!
have the following trouble:
i want prevent, that into Input Text hineinkopiert go can.
Lösche moreover in my Program the clipboard through clearclip, once the Input whom Focus sustain. the functions.
still shining it nevertheless possible To his, over one other Program a Text (through DDE? ) in this area einzufügen.
is the possible?
How can I the prevent?
 
03/14/20  
 



« this Posting watts as Solution marked. »


Matthias
Arlt
others Possibility: Edit subclassen and WM_PASTE intercepting
proc EditSubclass

    parameters edit&, Msg&, wParam&, lParam&
    set("FastMode",1)

    if Msg& = 770''WM_PASTE

        return

    endif

    return external("USER32","CallWindowProcA",owp&,edit&, Msg&, WParam&, LParam&)
    set("FastMode",0)

endproc

declare owp&,edit&
cls
edit& = create("MultiEdit",%hwnd,"",100,30,200,100)
owp&=external("USER32","SetWindowLongA",edit&,-4, ProcAddr(EditSubclass,4))

while 1

    waitinput

wend


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




p.specht

understand I you correctly.: Text but should furthermore association go can. or?

me falls momentarily only the old boy from BASIC abgeleitete commands Input one

cls:declare x$:print " Text: ";
Input x$
print x$:waitinput:end

one. In XProfan-11.2a can there nothing from the Clipboard reintun. Klappt simply not!
 
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
03/14/20  
 




Walter
Yes, one Text should association go can.
It's all right thereby for a multiedit, into too one längerer Text registered go can. though should nothing hineinkopiert go can.
The Clipboard is therefore blockiert.
now Have I seen, there's z.B. a "Clipboardmaster"  [...]  the Texts evident self-employed (without the clipboard) in boxes one others Program transportiert.
might over DDE walk (becomes here indeed as Possibility to that Fernsteuern described) - still my Program should itself even against "Fernsteuern" / Text hineinkopieren wehren can.
means Anti-DDE, sozusagen...
 
03/14/20  
 




Matthias
Arlt
others Possibility: Edit subclassen and WM_PASTE intercepting
proc EditSubclass

    parameters edit&, Msg&, wParam&, lParam&
    set("FastMode",1)

    if Msg& = 770''WM_PASTE

        return

    endif

    return external("USER32","CallWindowProcA",owp&,edit&, Msg&, WParam&, LParam&)
    set("FastMode",0)

endproc

declare owp&,edit&
cls
edit& = create("MultiEdit",%hwnd,"",100,30,200,100)
owp&=external("USER32","SetWindowLongA",edit&,-4, ProcAddr(EditSubclass,4))

while 1

    waitinput

wend


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




Walter
From Subclassing Have I yet unfortunately no idea.
take But same as Anlass, me so To keep busy.
Try I today yet from!
Thank you!
 
03/15/20  
 




Walter
functions fine!
cordial Thanks!

now must I it only yet understand...
 
03/15/20  
 




Matthias
Arlt
this is really right simply. at that Insert sustain the Edit-Control The Message WM_PASTE and the Window-procedure the Edit-Controls reacted then properly hereon. this should in the concrete drop prevented go. means swap we The originale Window-procedure the Edit-Controls integrally simply from, let there The Message WM_PASTE quasi unbehandelt. for any others Edit-Messages clutching then again The originale Window-procedure...

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




Walter
Thank you!
 
03/15/20  
 




E.T.

proc EditSubclass

    parameters edit&, Msg&, wParam&, lParam&
    set("FastMode",1)

    if Msg& = 770''WM_PASTE

        return

    endif

    return external("USER32","CallWindowProcA",owp&,edit&, Msg&, WParam&, LParam&)
    set("FastMode",0)

endproc


in this procedure becomes but the "FastMode" never again shorted, there Yes selbige always to set("FastMode",0)  with return  leave becomes
 
XProfan X3
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
03/15/20  
 




Matthias
Arlt
is correct...the set("FastMode",0)  is on this place wirkungslos and entbehrlich. important is Yes only, that set("FastMode",1)  necessary is, what against [to the SubClassing] too on another place in the program staid go can...and ggf. too ought to

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




Walter
Since I with whom windows Api-Call none durchblicke, have I meanwhile from the Help a further Version through subclass, subclassproc and Set("WinProc", 0) zustande brought, The ditto functions:
SubClassProc

    if %sMessage = $0302' WM_PASTE

        Set("WinProc", 0)' windows should these Message not further mind

    endif

ENDPROC

declare me%
cls
me%=Create("MultiEdit",%Hwnd,"",10,50,280,-100)
SubClass me%, 1

while 1

    waitinput

wend

SubClass me%, 0
end

Lt. Help becomes The SubClassProc defaultmäßig in the FastMode called, and so here set("Fastmode",1) entfallen could.

thanks over again on Matthias for Info, that the trouble through Subclassing To solve is!
 
03/16/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

8.430 Views

Untitledvor 0 min.
mene05/29/24
p.specht06/04/21
N.Art11/18/20
iF09/27/20
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