English
Source / code snippets

Control Mauscursor change

 
Mauscursor Änderung according to Control, of these code can each Control one eigener Cursor zugeordnet go.

CompileMarkSeparation
DEF ASetClassLong(3) ! User32,SetClassLongA
Def ALoadCursor(2) !USER32,LoadCursorA

proc oid_cur2hdl

    parameters hdl&,cur&
    add cur&,32648
    ASetClassLong(hdl&,-12,ALoadCursor(0,cur&))

endproc

oid_cur2hdl %hwnd,1
oid_cur2hdl toolbar&,1
oid_cur2hdl button&,2
oid_cur2hdl input&,4 ..5...6...7...... 
05/27/04  
 




Manfred
Barei
Hello if,

How must I vorgehen if I different Cursor from the Prfrun32 loading and the Controls allocate would like.

Grus Manfred
 
Zu wenig Wissen ist gefärlich, zu viel auch.(XProfan X4) | Win 10 Pro 64 | Win7 Ultimate 32/64 | AMD FX-8320, 16GB, GeForce GT 630 |
07/13/04  
 



Achso, well is integrally simply:
CompileMarkSeparationTo denne, iF
 
07/14/04  
 




Manfred
Barei
Hello if,

Yes this is me clear, so mach I it Yes in the momentum.
now would like I but each Control a own Cursor To point.
speak the %HWnd Cursor 1, whom Buttons Cursor 2 an so on.
in your first besispiel was is Yes woll too so whom I it correctly. understood have, there get but the Cursor from an external DLL loaded.
These would like I but not, i want no seperate dll with supplying, sonder The Cuirsor from the Prfrun32 loading and the individual Controlls zuzweisen (if this possible is?).

I hofe You can help.

grus manfred
 
Zu wenig Wissen ist gefärlich, zu viel auch.(XProfan X4) | Win 10 Pro 64 | Win7 Ultimate 32/64 | AMD FX-8320, 16GB, GeForce GT 630 |
07/16/04  
 



calm, should time of/ one say I couldn't on the Topic past-piffle.
CompileMarkSeparation
 {$iq}
DEF ASetClassLong(3) ! "User32","SetClassLongA"
Def ALoadCursor(2) !"USER32","LoadCursorA"
print
ASetClassLong(%HWND,-12,ALoadCursor(%hinstance,"DRUCKER"))
waitinpu
To denne, iF
 
07/16/04  
 




Manfred
Barei
Hello if,

Yes so meant I it, now works it.

however have I another question moreover :?: , How belege I The Menüleiste with a own Cursor?

the Hauptwindow and the Buttons is clear but the Menüleiste?

for your nochmalige Help now already one thanks!

Grus Manfred
 
Zu wenig Wissen ist gefärlich, zu viel auch.(XProfan X4) | Win 10 Pro 64 | Win7 Ultimate 32/64 | AMD FX-8320, 16GB, GeForce GT 630 |
07/18/04  
 



now, this is not all-To simply, with Subclassing or one Nebenthread went it however already. have You really yet interest? then would I there time ransetzen. need XProfan.

To denne, iF
 
07/18/04  
 




Manfred
Barei
Hello if,

Yes , true very interesant.
XProfan is in the employment.

grus manfred
 
Zu wenig Wissen ist gefärlich, zu viel auch.(XProfan X4) | Win 10 Pro 64 | Win7 Ultimate 32/64 | AMD FX-8320, 16GB, GeForce GT 630 |
07/18/04  
 



OK, I look whether I tommorrow moreover komm. To denne.
 
07/18/04  
 



Nagut, you have it Yes so pseudo.
CompileMarkSeparation
 {$crq}
DECLARE A%,B%,C%,A$,B$,C$,A&,B&,C&,A!,B!,C!,A#,B#,C#,FUNCT1&,FUNCT2&,FUNCT3&,MINID%,MAXID%,ASM&,DUMMY&,INFO%
Declare mxi#,threadstack%
threadstack%=0
WINDOWTITLE ""
WINDOWSTYLE 16+8+2
WINDOW 50,50-500,150
USERMESSAGES 16
SETACTIVEWINDOW(%HWND)
INFO%=CREATE("text",%HWND,"",200,50,200,20)
DEF GETMODULEHANDLE(1) !"KERNEL32","GetModuleHandleA"
DEF GETPROCADDRESS(2) !"KERNEL32","GetProcAddress"
DEF CREATETHREAD(6) !"KERNEL32","CreateThread"
DEF TERMINATETHREAD(2) !"KERNEL32","TerminateThread"
A$="Kernel32"
A&=GETMODULEHANDLE(ADDR(A$))
A$="Sleep"
FUNCT1&=GETPROCADDRESS(A&,ADDR(A$))
A$="User32"
A&=GETMODULEHANDLE(ADDR(A$))
A$="GetMenuState"
FUNCT2&=GETPROCADDRESS(A&,ADDR(A$))
A$="SendMessageA"
FUNCT3&=GETPROCADDRESS(A&,ADDR(A$))
POPUP "Datei"
APPENDMENU 2001,"Neu"
APPENDMENU 2002,"Öffnen"
APPENDMENU 2003,"Speichern"
MINID%=2001
MAXID%=2003
DiM B#,200
CLEAR B#
LONG B#,0 	=FUNCT1&
LONG B#,4 	=FUNCT2&
LONG B#,8 	=FUNCT3&
LONG B#,12 	=&HMENU
LONG B#,16	=MINID%
LONG B#,20	=MAXID%
LONG B#,24	=INFO%
LONG B#,28	=20
LONG B#,32	=0
LONG B#,36	=0
STRING B#,40="Neue Datei anlegen"
STRING B#,60="Datei öffnen"
STRING B#,80="Datei speichern"
STRING B#,100="Kein Menü"
DiM A#,100
LONG A#,0=-1947432107
LONG A#,4=1200294013
LONG A#,8=1200177172
LONG A#,12=276269856
LONG A#,16=174727403
LONG A#,20=-788592757
LONG A#,24=-11141014
LONG A#,28=1200295031
LONG A#,32=1037106948
LONG A#,36=128
LONG A#,40=2005468021
LONG A#,44=1200309792
LONG A#,48=-264552428
LONG A#,52=1603001461
LONG A#,56=608668448
LONG A#,60=527745851
LONG A#,64=723804041
LONG A#,68=-1014296481
LONG A#,72=-149135477
LONG A#,76=-2084109341
LONG A#,80=1783638208
LONG A#,84=-15963648
LONG A#,88=1200298103
LONG A#,92=-2083455224
LONG A#,96=-1569521153
ASM&=CREATETHREAD(0,0,A#,B#,0,ADDR(DUMMY&))
Class mxiiNt = #iNtTime&,#iNtPrc&,#iNtID&,OniNt@,iNtOn@,iNtOff@
Dim mxi#,mxiiNt
mxi#.OniNt(100,ProcAddr("Thread",0))
mxi#.iNtOn()

WHILEnot equ(%key,2)

    WAITINPUT

    IF %UMESSAGE=16

        BREAK

    ENDIF

ENDWHILE

mxi#.iNtOff()
TERMINATETHREAD(ASM&,259)
DISPOSE A#
DISPOSE B#
end

proc thread

    case threadstack%:return
    add threadstack%,1

    if "Kein Menü"=gettext$(info%)

        usecursor 0

    else

        usecursor 4

    endif

    add threadstack%,-1

endproc

Proc mxiiNt.OniNt

    Parameters time&, proc&
    .iNtTime& = time&
    .iNtPrc& = proc&

Endproc

Proc mxiiNt.iNtOn

    .iNtID& = External("user32.dll","SetTimer",0,0,.iNtTime&,.iNtPrc&)

Endproc

Proc mxiiNt.iNtOff

    If .iNtID& <> 0

        External("user32.dll","KillTimer",0,.iNtID&)

    <
s=s4 href='./../../Function-References/XProfan/endif/'>EndIf Endproc

To denne, iF
 
07/19/04  
 



Nachtrag:

one Control whom Default-Cursor settle:
CompileMarkSeparation
CompileMarkSeparation
OCR_APPSTARTING = { $7F8A | 32650 }
OCR_CROSS = { $7F03 | 32515 }
OCR_HAND = { $7F89 | 32649 }
OCR_IBEAM = { $7F01 | 32513 }
OCR_ICOCUR = { $7F87 | 32647 }
OCR_ICON = { $7F81 | 32641 }
OCR_NO = { $7F88 | 32648 }
OCR_NORMAL = { $7F00 | 32512 }
OCR_SIZE = { $7F80 | 32640 }
OCR_SIZEALL = { $7F86 | 32646 }
OCR_SIZENESW = { $7F83 | 32643 }
OCR_SIZENS = { $7F85 | 32645 }
OCR_SIZENWSE = { $7F82 | 32642 }
OCR_SIZEWE = { $7F84 | 32644 }
OCR_UP = { $7F04 | 32516 }
OCR_WAIT = { $7F02 | 32514 >}
 
09/16/06  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

8.130 Views

Themeninformationen

this Topic has 3 subscriber:

unbekannt (6x)
Manfred Barei (4x)
iF (1x)


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