English
Source / code snippets

Api Combobox Entries without Sorting

 

CompileMarkSeparation
Source wurde am 15.07.2007 aus der MMJ-Quellcodesammlung (Dietmar Horn) in die Babyklappe auf XProfan.Com abgelegt:
API: ComboBox ohne Sortierung der Einträge
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#
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

    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) Imagelist erzeugen
    Let ExecuteHandle&=@GetModuleHandle(0)  Handle des laufenden Programms
    String ICONNAME#,0=Weg
    Let Hicon&=@loadicon(Executehandle&,Iconname#) Handle des Icons ok
    @ImageList_AddIcon(Imagelist&,HIcon&)
    String ICONNAME#,0=Windows
    Let Hicon&=@loadicon(Executehandle&,Iconname#) Handle des Icons ok
    @ImageList_AddIcon(Imagelist&,HIcon&)
    String ICONNAME#,0=Editor
    Let Hicon&=@loadicon(Executehandle&,Iconname#) Handle des Icons ok
    @ImageList_AddIcon(Imagelist&,HIcon&)
    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
ComBoBoxInsertEx Andreas,ComoBoxEx&,1,1,1
ComBoBoxInsertEx Dennis,ComoBoxEx&,2,2,2

While %Key<>2

    Waitinput
    Drawtext 0,0,@Gettext$(ComoBoxEx&)+@Space$(255)

Wend

@ImageList_Destroy(Imagelist&
Dispose INITC#
 
07/15/07  
 



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

2.648 Views

Untitledvor 0 min.
H.Brill05/17/23
rquindt06/25/15
holmol9304/24/13
Torsten Boo03/02/11

Themeninformationen

this Topic has 1 subscriber:

unbekannt (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