Foro | | | | | Der unten stehende Code se una Combobox con Icons bajo Profano 6.6 erzeugen. Cuestión: Auf welchem XP Sistema se ejecuta dieser Code (bajo Profano² 6.6) y wo se ejecuta el no (ServicePack y Prozessorgeschwindigkeit)? Lo va no a Fehler, el Yo hier gemacht habe... KompilierenMarcaSeparaciónDeclaring new functions for Profan² 6.6 through windows API
Def @InitCommonControlsEx(1) !COMCTL32,InitCommonControlsEx
DEF @ImageList_Create(5) !COMCTL32,ImageList_Create
DEF @ImageList_AddIcon(2) !COMCTL32,ImageList_AddIcon
DEF @ImageList_Destroy(1) !COMCTL32,ImageList_Destroy
DEF @GetModuleHandle(1) !KERNEL32,GetModuleHandleA
DEF @LoadIcon(2) ! USER32,LoadIconA
DEF @GetProcAddress(2) !KERNEL32,GetProcAddress
Declare INITC#,ComoBoxEx&,Imagelist&,Iconname#
Declare ExecuteHandle&,Hicon&,M_Present&
Declare Proc_Name#,MHandle&,M_NAME#
Declare CBTEXT#,CBINSERT#
This peace of code is for looking, if icons can be placed in ComboBox.
If InitCommonControlsEx doesnt exist in the system-dll COMCTL32.DLL, there is displayed
a normal combobox without icons
DIM PROC_NAME#,256
DIM M_NAME#,256
String PROC_NAME#,0=InitCommonControlsEx
String M_NAME#,0=$SYSPATH+COMCTL32.DLL
LET MHANDLE&=@GetModuleHandle(M_NAME#)
LET M_Present&=@GetProcAddress(MHANDLE&,PROC_NAME#)
Dispose PROC_NAME#
Dispose M_NAME#
Proc ComBoBoxInsertEx
You can place other icons for selected items, but in the code it is not done (that why there are 3 icons)
Parameters Inserttext$,CBHandle&,Icon1&,Icon2&,Icon3&
DIM CBINSERT#,36
DIM CBTEXT#,256
Clear CBINSERT#
String CBTEXT#,0=Inserttext$
Long CBINSERT#,0=$1+$2+$4+$8
Long CBINSERT#,4=-1
Long CBINSERT#,8=CBTEXT#
Long CBINSERT#,12=Icon1&
Long CBINSERT#,16=Icon2&
Long CBINSERT#,20=Icon3&
IF M_Present&=0
@ADDCHOICE(CBHandle&,Inserttext$)
else
@SendMessage(CBHandle&,$401,0,CBINSERT#)
endif
Dispose CBINSERT#
Dispose CBTEXT#
EndProc
DIM INITC#,8
long INITC#,0=8
long INITC#,4=$200
Windowstyle 31+512
Windowtitle ComboboxEx
Window 0,0-640,440
If M_Present&=0
Print NO
LET ComoBoxEx&=@Control(ComboBox,,$40000000+$10000000+$200000+$100000+2+$40,0,100,150,180,%HWND,2615,%HINSTANCE)
else
@InitCommonControlsEx(INITC#)
DIM Iconname#,256
Let Imagelist&=@ImageList_Create(16,16,$0001,3,3) create imagelist
Let ExecuteHandle&=@GetModuleHandle(0) Handle of the Profan-exe
String ICONNAME#,0=Weg
Let Hicon&=@loadicon(Executehandle&,Iconname#) Get the handle of the icon weg
@ImageList_AddIcon(Imagelist&,HIcon&) put the icon into the imagelist
String ICONNAME#,0=Windows
Let Hicon&=@loadicon(Executehandle&,Iconname#) Get the handle of the icon windows
@ImageList_AddIcon(Imagelist&,HIcon&) put the icon into the imagelist
String ICONNAME#,0=Editor
Let Hicon&=@loadicon(Executehandle&,Iconname#) Get the handle of the icon editor
@ImageList_AddIcon(Imagelist&,HIcon&) put the icon into the imagelist
LET ComoBoxEx&=@Control(ComboBoxEx32,,$40000000+$10000000+$200000+$100000+2+$40,0,100,150,180,%HWND,2115,%HINSTANCE)
@Sendmessage(ComoBoxEx&,$402,0,Imagelist&)
dispose Iconname#
endif
ComBoBoxInsertEx Claudia,ComoBoxEx&,0,0,0 put the item Claudia with the icon weg into the combobox
ComBoBoxInsertEx Andreas,ComoBoxEx&,1,1,1 put the item Andreas with the icon windows into the combobox
ComBoBoxInsertEx Dennis,ComoBoxEx&,2,2,2 put the item Dennis with the icon editor into the combobox
While %Key<>2
Waitinput
Drawtext 0,0,@Gettext$(ComoBoxEx&)+@Space$(255)
Wend
@ImageList_Destroy(Imagelist&)
Disponer INITC#
|
| | | | |
| | Dieter Zornow | En me voluntad no Icons en el Box gezeigt, alles otro funktioniert
Windows XP home SP2, XProfan 10
gruß
Dieter |
| | | Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2 | 18.02.2007 ▲ |
| |
| | | XProfan es klar, como puede no laufen wegen des Manifests! Lo va en 6.6. |
| | | | |
| | Dieter Zornow | Posesiones deinen Code veces abgeändert, entonces se ejecuta él auch bajo Xprofan 10, habe nun gerade eben con 6.6 getestet, así funktioniert él auch en el Original . Yo denke el COMCTL32.DLL ha cada standardmäßig en el PC, sonst sería sí vieles en Windows no trabajo, el muss no abgeprüft voluntad. Tal vez wäre sólo el Versión interessant KompilierenMarcaSeparaciónDeclaring new functions for Profan² 6.6 through windows API
Def @InitCommonControlsEx(1) !COMCTL32,InitCommonControlsEx
DEF @ImageList_Create(5) !COMCTL32,ImageList_Create
DEF @ImageList_AddIcon(2) !COMCTL32,ImageList_AddIcon
DEF @ImageList_Destroy(1) !COMCTL32,ImageList_Destroy
DEF @GetModuleHandle(1) !KERNEL32,GetModuleHandleA
DEF @LoadIcon(2) ! USER32,LoadIconA
DEF @GetProcAddress(2) !KERNEL32,GetProcAddress
Declare INITC#,ComoBoxEx&,Imagelist&,Iconname#
Declare ExecuteHandle&,Hicon&,M_Present&
Declare Proc_Name#,MHandle&,M_NAME#
Declare CBTEXT#,CBINSERT#
This peace of code is for looking, if icons can be placed in ComboBox.
If InitCommonControlsEx doesnt exist in the system-dll COMCTL32.DLL, there is displayed
a normal combobox without icons
Proc ComBoBoxInsertEx
You can place other icons for selected items, but in the code it is not done (that why there are 3 icons)
Parameters Inserttext$,CBHandle&,Icon1&,Icon2&,Icon3&
DIM CBINSERT#,36
DIM CBTEXT#,256
Clear CBINSERT#
String CBTEXT#,0=Inserttext$
Long CBINSERT#,0=$1+$2+$4+$8
Long CBINSERT#,4=-1
Long CBINSERT#,8=CBTEXT#
Long CBINSERT#,12=Icon1&
Long CBINSERT#,16=Icon2&
Long CBINSERT#,20=Icon3&
@SendMessage(CBHandle&,$401,0,CBINSERT#)
Dispose CBINSERT#
Dispose CBTEXT#
EndProc
DIM INITC#,8
long INITC#,0=8
long INITC#,4=$4000
Windowstyle 31+512
Windowtitle ComboboxEx
Window 0,0-640,440
@InitCommonControlsEx(INITC#)
DIM Iconname#,256
Let Imagelist&=@ImageList_Create(16,16,$0001,3,3)create imagelist
Let ExecuteHandle&=@GetModuleHandle(0)Handle of the Profan-exe
String ICONNAME#,0=Weg
Let Hicon&=@loadicon(Executehandle&,Iconname#)Get the handle of the icon weg
@ImageList_AddIcon(Imagelist&,HIcon&)put the icon into the imagelist
String ICONNAME#,0=Windows
Let Hicon&=@loadicon(Executehandle&,Iconname#)Get the handle of the icon windows
@ImageList_AddIcon(Imagelist&,HIcon&)put the icon into the imagelist
String ICONNAME#,0=Editor
Let Hicon&=@loadicon(Executehandle&,Iconname#)Get the handle of the icon editor
@ImageList_AddIcon(Imagelist&,HIcon&)put the icon into the imagelist
LET ComoBoxEx&=@Control(ComboBoxEx32,,$40000000+$10000000+$200000+$100000+2+$40,0,100,150,180,%HWND,2115,%HINSTANCE)
@Sendmessage(ComoBoxEx&,$402,0,Imagelist&)
dispose Iconname#
ComBoBoxInsertEx Claudia,ComoBoxEx&,0,0,0put the item Claudia with the icon weg into the combobox
ComBoBoxInsertEx Andreas,ComoBoxEx&,1,1,1put the item Andreas with the icon windows into the combobox
ComBoBoxInsertEx Dennis,ComoBoxEx&,2,2,2put the item Dennis with the icon editor into the combobox
While %Key<>2
Waitinput
Drawtext 0,0,@Gettext$(ComoBoxEx&)+@Space$(255)
Wend
@ImageList_Destroy(Imagelist&)
='./../../references-fonction/XProfan/disponer/'>Disponer INITC#
|
| | | Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2 | 18.02.2007 ▲ |
| |
| | | Lies doch veces bastante oben - por lo tanto es no!
¿Por qué el en dir bajo XProfan10 no se ejecuta, dürfte wohl cada klar ser - el liegt al Manifest (schau mal con TNT después de). Lo va me por lo tanto, si el como el de me Nuevo wurde bajo 6.6 no se ejecuta. |
| | | | |
| | Dieter Zornow | Tuve el oben ya Nuevo, wurde aber abgeschnitten. Bajo 6.6 se ejecuta él en me |
| | | Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2 | 18.02.2007 ▲ |
| |
| | | Gracias, el stellt mein Weltbild otra vez her . |
| | | | |
| | Jörg Sellmeyer | ¡Hola Andreas, XP Pro, SP2, Profano 6.6: Lo se ejecuta y el Combobox son 3 Icons con Namen a sehen. |
| | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 18.02.2007 ▲ |
| |
| | | Gracias, wunderbar. Test ha se así hecho. |
| | | | |
|
RespuestaThemeninformationenDieses Thema ha 3 subscriber: |