Hallo Sven.
Ich habe es übrigens doch nicht geschafft, die API Variante in einer Listbox zum laufen zu bekommen... habe die %hwnd durch das Listbox-Handle getauscht - reicht das nicht?
Nein. Die Usermessages funktionieren natürlich nur im Hauptfenster. Damit es in einem Control funktioniert, musst du das Control subclassen. Habe für dich ein Beispiel in XPIA vorbereitet. Damit du mit dem Code was anfangen kannst, hab ichs als Enhanced Profancode gepostet. Dir steht jetzt eine neue Funktion SC_Init(n) zur Verfügung, die als Parameter den Handle des zu subclassenden Controls verlangt. Habs so angelegt, dass du bis zu 35 Controls auf einmal subclassen kannst, das sollte für den Anfang reichen. Was für Controls das sind, sollte egal sein. Als neue Usermessages habe ich $1500 (links), $1501 (rechts) und $1502 (mitte) angelegt. Probiers halt aus. KompilierenMarkierenSeparierenDECLARE XPIA_#,XPIA$,EXPIA&,SCDLL&,X&,Y&,Z&,TEXT$,LISTBOX&
DIM XPIA_#,2048
CLEAR XPIA_#
LONG XPIA_#,0=9460301,3,4,65535,184,0,64,0,0,0,0,0,0,0,0,176,247078670,-855002112,1275181089,1750344141,1881174889,1919381362,1663069537,1869508193,1700929652,1853190688,544106784,542330692,1701080941,168627502,36,0,-1797187717
LONG XPIA_#,132=-946899393,-946899393,-946899393,-945989949,-946899394,-946050639,-946899410,1751345490,-946899393,0,0,17744,131404,1149538661,0,0,554565856,201654539,1024,512,0,4328,4096,8192,268435456,4096,512,4,0,4,0,12288
LONG XPIA_#,260=512,0,2,1048576,4096,1048576,4096,0,16,4960,80,4788,40,0,0,0,0,0,0,8192,64,0,0,0,0,0,0,0,0,0,0,0,0,4096,24,0,0,0,0,0,0,1297301837,12851,944,4096,1024,512,0,0,0,-536870880,1818587694,25455,78,8192,512,1536,0,0
LONG XPIA_#,496=0,1107296320,0,0,4896,4882,4870,4852,4912,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1192457387,1,836297,-1477963926,-16777215,93259893,268439576
LONG XPIA_#,772=-1895008769,1055749,276168464,270534031,1979650048,604344084,-15728624,93263989,268439592,-1893960193,1059845,544603920,271582607,1979650048,872779556,-15728624,93268085,268439608,-1892911617,1063941,813039376
LONG XPIA_#,856=272631183,1979650048,1141215028,-15728624,93272181,268439624,-1891863041,1068037,1081474832,273679759,1438846976,361622667,268439640,-125631861,-1752952833,-2097152000,292815096,1161495179,-1962248952,1419969602
LONG XPIA_#,936=-351272944,79856389,2105793259,309658124,273954303,-60157952,-402098689,230,2105631979,131852,-15108864,-1041758091,1342177280,1745384959,5376,12511312,1122697216,101481857,1962934274,141950745,40936,1979666432
LONG XPIA_#,1024=352413704,-397410304,156,2105614571,133388,-15239936,2112358517,1342177280,1745384959,5378,8054864,1979645952,276168468,-15960577,905906293,268439636,20968,281200896,-326413056,-939735933,130117,-1712848896,-1912602626
LONG XPIA_#,1116=1071125,-2096985328,712310776,1962997891,270049568,42536960,293824594,-60157952,270022143,669519872,1509949440,-352042359,79856389,-1026961429,637468676,268439564,268969471,637472768,268439556,268445183,637472768
LONG XPIA_#,1200=268439568,4828,0,0,4930,4096,0,0,0,0,0,4896,4882,4870,4852,4912,0,1631780883,1767337068,2003788910,1668248144,19136577,1349805383,1852142177,19988596,1400137031,1866691449,7499628,1699938786,1699570798,1734439795
LONG XPIA_#,1324=16741,1699938845,1852397428,1282895716,1097297519,1937047552,842232421,1819042862,1684471808,775041897,7105636,0,0,0,1149538661,0,5010,1,1,1,5000,5004,5008,4681,5032,1147076608,1701867631,1768713068,1601399651
LONG XPIA_#,1440=778595941,7105636,1230979923,7629166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4096,64,822685952,823865618,825045284,826224950,827404616,828584282,829763948,831009150,834285991,844968508,846606958,848835198,849621662
LONG XPIA_#,1596=850408106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
LONG XPIA_#,1996=0,0,0,0,0,0,0,0,0,0,0,0,0
XPIA$=$TEMPDIR+/_Doppelklicks_enh.dll
FILEMODE 1
ASSIGN #1,XPIA$
OPENRW #1
BLOCKWRITE #1,XPIA_#,0,2048
CLOSERW #1
DISPOSE XPIA_#
Profanprogramm
DEF SC_INIT(1) !XPIA$,SC_Init
SCDLL&=USEDLL(XPIA$)
CLS
LISTBOX&=CREATE(LISTBOX,%HWND,LISTBOX,16,320,400,80)
SC_INIT(LISTBOX&)
USERMESSAGES $1500,$1501,$1502
WHILE 1
WAITINPUT
IF %KEY=2
BREAK
ENDIF
IF %UMESSAGE=$1500
PRINT Linker Doppelklick.
ELSEIF %UMESSAGE=$1501
PRINT Rechter Doppelklick.
ELSEIF %UMESSAGE=$1502
PRINT Mittlerer Doppelklick.
ENDIF
ENDWHILE
FREEDLL SCDLL&
END
|