| |
|
|
|
Source watts on the 15.07.2007 from the MMJ-Quellcodesammlung (Dietmar horn) in The Babyklappe on XProfan.Com stored:
ChoiceBox and GridBOX
ex XProfan 10
DECLARE __cf1&,__cf2&
Def __cf1(2) !KERNEL32,GetProcAddress
Def __cf2(1) !KERNEL32,GetModuleHandleA
__cf1&=__cf1(__cf2(user32.dll),FindWindowExA)
__cf2&=__cf1(__cf2(user32.dll),GetAsyncKeyState)
CLS
var STATIC&=CREATE(choicebox,%HWND,Choicebox,16,16,560,180)
USERMESSAGES 16,$0134
WHILE 1
WAITINPUT
SELECT %UMESSAGE
CASEOF 16
BREAK
CASEOF $0134
PROCEEDCHOICEBOX
OTHERWISE
ENDSELECT
ENDWHILE
end
proc PROCEEDCHOICEBOX
var TITEL$=left;0;80;middle;2;100;right;1;80
var PARENT&=call(__cf1&,65556,0,ComboLBox,0)
SHOWWINDOW(PARENT&,0)
var HGRID&=CREATE(GridBOX,%HWND, TITEL$, 3,16,40,WIDTH(PARENT&),HEIGHT(PARENT&))
SENDKEY(PARENT&,27)
ADDSTRING(HGRID&,AB|DEF|0123)
ADDSTRING(HGRID&,GHI|J23KL|012345)
WHILE call(__cf2&,1)<>0
ENDWHILE
DULCOIF
WAITINPUT
IF GETFOCUS(STATIC&)
SENDKEY(PARENT&,27)
ENDIF
var s$=
IF GETCURSEL(HGRID&)>-1
s$=GETSTRING$(HGRID&,GETCURSEL(HGRID&))
ENDIF
DESTROYWINDOW(HGRID&)
IFNOT s$=
LOCATE 10,1
PRINT select: ,s$
ENDIF
endproc
proc DULCOIF
SETTIMER 1
WAITINPUT
KILLTIMER
endproc
|
|
|
| |
|
|