Skip to content
MSN

Icons In Dropdown List using MDX.dll

A TG007 community discussion started by crash.

Discussion 5 posts
Page 1 of 1
Open
Topic #1249 · 5 published posts · 726 views

 
dialog sc.qlse {
 title "Settings"
 size -1 -1 89 235
 option dbu
 tab "one", 1, -12 -12 100 247
 text "Current theme:", 2, 2 8 36 7, tab 1
 edit "", 3, 1 16 86 10, read autohs tab 1
 text "Select a theme:", 4, 1 29 38 7, tab 1
-----------NEEDS ICONS  combo 5, 2 38 85 60, drop size tab 1 
 text "Select a background:", 6, 2 56 52 7, tab 1
-----------NEEDS ICONS  combo 7, 2 66 85 60, drop size tab 1 
 button "Preview", 8, 3 88 37 10, tab 1
 button "Apply", 9, 49 88 37 10, tab 1 
;icon 10, 3 129 82 48, tab 1
;icon 11, 3 181 82 49, tab 1
}

on *:dialog:sc.qlse:init:*: { 
 dll $rebard.ll Dock $dialog(sc.qlse).hwnd > right
 dll dlls\mdx.dll SetMircVersion $version
 dll dlls\mdx.dll MarkDialog $dname   
 
dll dlls\mdx.dll Code To Make Ids 5 and 7 have icons 
}

 

any help would be greatly appreciated. Thanx!

 

-Crash - .

 

\\=========//

CRASH

\\==============//

Um, I'm not sure what your asking, but um, try popups.dll ;s

 

I'm not totaly sure what you are asking either. If you want to know how to add icon to a dropdown list from a toolbar.... use this code I wrote (over a year ago)and rework it to fit your own needs. I still use it today - works fine. (used in mIRC 6.03):

 

;= ProLabz Toolbar =
;= Scripted By TheProfessor =

on *:start:{ dialog -m toolbar toolbar }
dialog toolbar {
 title "toolbar"
 size -1 -1 514 16
 option dbu
 list 1, 0 0 1001 16, size
}
on *:dialog:toolbar:init:0:{
 dll mdx.dll SetMircVersion $version 
 dll mdx.dll MarkDialog $dname
 dll mdx.dll SetControlMDX $dname 1 ToolBar list arrows flat wrap nodivider > bars.mdx
 dll mdx.dll SetDialog $dname style
 dll mdx.dll SetBorderStyle 1
 dll ktools.dll DockToolbar $dialog($dname).hwnd
 did -i $dname 1 1 bmpsize 18 18
 did -i $dname 1 1 setimage icon small Pics\close.ico
 did -i $dname 1 1 setimage icon small Pics\arrow.ico
 did -i $dname 1 1 setimage icon small Pics\butterfly.ico
 did -i $dname 1 1 setimage icon small Pics\pass.ico
 did -i $dname 1 1 setimage icon small Pics\tri.ico
 did -i $dname 1 1 setimage icon small Pics\book.ico
 did -i $dname 1 1 setimage icon small Pics\notes.ico
 did -i $dname 1 1 setimage icon small Pics\ds.ico
 did -i $dname 1 1 setimage icon small Pics\help.ico
 did -i $dname 1 1 setimage icon small Pics\ie.ico
 did -i $dname 1 1 setimage icon small Pics\messa.ico
 did -i $dname 1 1 setimage icon small Pics\messr.ico
 did -a $dname 1 +a 1 Quit $chr(9) Quits mIRC
 did -a $dname 1 +a 2 Restart $chr(9) Restarts mIRC
 did -a $dname 1 +a 3 Vincula $chr(9) Opens Vincula Options
 did -a $dname 1 +a 4 Passwords $chr(9) Change Pass Info
 did -a $dname 1 +a 5 Access List $chr(9) Opens The Access List
 did -a $dname 1 +a 6 Dialogs $chr(9) Shows All Dialogs
 did -a $dname 1 +a 7 Notes $chr(9) Shows All Note Pads
 did -a $dname 1 +a 8 Script Tools $chr(9) Opens Tools For Editing
 did -a $dname 1 +a 9 Help Files $chr(9) Opens Help Files
 did -a $dname 1 +a 10 iExplorer $chr(9) iExplorer Options
 did -a $dname 1 +a 11 AWAY $chr(9) Set Yourself To Away
 did -a $dname 1 +a 12 RETURN $chr(9) Set Yourself To Return
}

on *:dialog:toolbar:sclick:1:{
 var %click $did($dname,1).sel
 if (%click == 2) { exit | /splay shutdown.wav } 
 elseif (%click == 3) { exit | run $mircexe | /splay shutdown.wav }
 elseif (%click == 4) { Vincula }
 elseif (%click == 5) { Pass }
 elseif (%click == 6) { /access | /splay zip.wav }
 elseif (%click == 7) { Dialogs }
 elseif (%click == 8) { Notes }
 elseif (%click == 9) { Tools }
 elseif (%click == 10) { help }
 elseif (%click == 11) { ie }
 elseif (%click == 12) { /away away | /splay zip.wav }
 elseif (%click == 13) { /away | /splay zip.wav }
}

alias pdll { .return popups.dll }
alias Vincula {
 dll $pdll New Vincula 16 16
 dll $pdll SetStyle Vincula bordericon
 dll $pdll LoadImg Vincula icon small pics\butterfly.ico
 dll $pdll AddItem Vincula 0 1 Settings
 dll $pdll LoadImg Vincula icon small pics\butterfly.ico
 dll $pdll AddItem Vincula 0 2 Update Passport
 dll $pdll LoadImg Vincula icon small pics\butterfly.ico
 dll $pdll AddItem Vincula 0 3 Reset Lookup Servers
 dll $pdll LoadImg Vincula icon small pics\butterfly.ico
 dll $pdll AddItem Vincula 0 4 Join Room (passport)
 dll $pdll LoadImg Vincula icon small pics\butterfly.ico
 dll $pdll AddItem Vincula 0 5 Join Room (guest)
 var %do = $dll($pdll,Popup,Vincula $mouse.dx $mouse.dy)
 if ($gettok(%do,1,32) == ok) {
   var %item = $gettok(%do,3,32)
   if (%item == 1) {
     msn.setup | /splay zip.wav | /splay zip.wav
   }
   if (%item == 2) {
     msn.getpp | /splay zip.wav | /splay zip.wav
   }
   if (%item == 3) {
     msn.relookcon | /splay zip.wav | /splay zip.wav
   }
   if (%item == 4) {
     /splay zip.wav | joins $$input(Enter a room name $chr(40) $+ Only normal ASCII characters allowed $+ $chr(41),129,Enter Roomname)
   }
   if (%item == 5) {
     /splay zip.wav | joins -g $$input(Enter a room name $chr(40) $+ Only normal ASCII characters allowed $+ $chr(41),129,Enter Roomname)
   }
 }
}

alias pdll { .return popups.dll }
alias Pass {
 dll $pdll New Pass 16 16
 dll $pdll SetStyle Pass bordericon
 dll $pdll LoadImg Pass icon small pics\pass.ico
 dll $pdll AddItem Pass 0 1 Room Pass
 dll $pdll LoadImg Pass icon small pics\pass.ico
 dll $pdll AddItem Pass 0 2 Set Gold Pass
 dll $pdll LoadImg Pass icon small pics\pass.ico
 dll $pdll AddItem Pass 0 3 Set Brown Pass
 var %do = $dll($pdll,Popup,Pass $mouse.dx $mouse.dy)
 if ($gettok(%do,1,32) == ok) {
   var %item = $gettok(%do,3,32)
   if (%item == 1) {
     /splay sounds/pass.wav | /mode $me +h $$?="Enter Passkey"
   }
   if (%item == 2) {
     /splay sounds/pass.wav | set %passg $$?="Enter Pass To Store"
   }
   if (%item == 3) {
     /splay sounds/pass.wav | set %passh $$?="Enter Pass To Store"
   }
 }
}

alias pdll { .return popups.dll }
alias Dialogs {
 dll $pdll New Dialogs 16 16
 dll $pdll SetStyle Dialogs bordericon
 dll $pdll LoadImg Dialogs icon small pics\book.ico
 dll $pdll AddItem Dialogs 0 1 Command Center 
 dll $pdll LoadImg Dialogs icon small pics\book.ico
 dll $pdll AddItem Dialogs  0 2 Script Kicker 
 dll $pdll LoadImg Dialogs icon small pics\book.ico
 dll $pdll AddItem Dialogs 0 3 GK Recorder 
 dll $pdll LoadImg Dialogs icon small pics\book.ico
 dll $pdll AddItem Dialogs 0 4 Away System
 dll $pdll LoadImg Dialogs icon small pics\book.ico
 dll $pdll AddItem Dialogs 0 5 Pass Catcher
 dll $pdll LoadImg Dialogs icon small pics\book.ico
 dll $pdll AddItem Dialogs 0 6 Clone Protect
 dll $pdll LoadImg Dialogs icon small pics\book.ico
 dll $pdll AddItem Dialogs 0 7 Room Modes
 dll $pdll LoadImg Dialogs icon small pics\book.ico
 dll $pdll AddItem Dialogs 0 8 Flooder
 dll $pdll LoadImg Dialogs icon small pics\book.ico
 dll $pdll AddItem Dialogs 0 9 Kick Counter
 dll $pdll LoadImg Dialogs icon small pics\book.ico
 dll $pdll AddItem Dialogs 0 10 Remote Control
 dll $pdll LoadImg Dialogs icon small pics\book.ico
 dll $pdll AddItem Dialogs 0 11 Super Search
 dll $pdll LoadImg Dialogs icon small pics\book.ico
 dll $pdll AddItem Dialogs 0 12 Advertisement
 dll $pdll LoadImg Dialogs icon small pics\book.ico
 dll $pdll AddItem Dialogs 0 13 Profile Kicker
 dll $pdll LoadImg Dialogs icon small pics\book.ico
 dll $pdll AddItem Dialogs 0 14 Notify
 dll $pdll LoadImg Dialogs icon small pics\book.ico
 dll $pdll AddItem Dialogs 0 15 !Command List
 dll $pdll LoadImg Dialogs icon small pics\book.ico
 dll $pdll AddItem Dialogs 0 16 Room ReCreate
 var %do = $dll($pdll,Popup,Dialogs $mouse.dx $mouse.dy)
 if ($gettok(%do,1,32) == ok) {
   var %item = $gettok(%do,3,32)
   if (%item == 1) {
     /dialog -m cc cc | splay zip.wav
   }
   if (%item == 2) {
     /dialog -m alarm alarm | splay zip.wav
   }
   if (%item == 3) {
     /dialog -m gkrec gkrec | splay zip.wav
   }
   if (%item == 4) {
     /dialog -m away away | splay zip.wav
   }
   if (%item == 5) {
     /dialog -m pass pass | splay zip.wav
   }
   if (%item == 6) {
     /dialog -m clonescan clonescan | splay zip.wav
   }
   if (%item == 7) {
     /dialog -m mode mode | splay zip.wav
   }
   if (%item == 8) {
     /dialog -m flood2 flood2 | splay zip.wav
   }
   if (%item == 9) {
     /dialog -m kk kk | splay zip.wav
   }
   if (%item == 10) {
     /dialog -m remhelp remhelp | splay zip.wav
   }
   if (%item == 11) {
     /dialog -m scrch scrch | splay zip.wav
   }
   if (%item == 12) {
     /dialog -m advert advert | splay zip.wav
   }
   if (%item == 13) {
     /dialog -m prokick prokick | splay zip.wav
   }
   if (%item == 14) {
     /dialog -m noti noti | splay zip.wav
   }
   if (%item == 15) {
     /dialog -m com com | splay zip.wav
   }
   if (%item == 16) {
     /dialog -m room.recreate room.recreate | splay zip.wav
   }
 }
}

alias pdll { .return popups.dll }
alias Notes {
 dll $pdll New Notes 16 16
 dll $pdll SetStyle Notes bordericon
 dll $pdll LoadImg Notes icon small pics\notes.ico
 dll $pdll AddItem Notes 0 1 Script Notes
 dll $pdll LoadImg Notes icon small pics\notes.ico
 dll $pdll AddItem Notes 0 2 Personal Notes
 dll $pdll LoadImg Notes icon small pics\notes.ico
 dll $pdll AddItem Notes 0 3 New NotePad
 var %do = $dll($pdll,Popup,Notes $mouse.dx $mouse.dy)
 if ($gettok(%do,1,32) == ok) {
   var %item = $gettok(%do,3,32)
   if (%item == 1) {
     /run notepad.exe scripts/notes2.txt | /splay zip.wav
   }
   if (%item == 2) {
     /run notepad.exe scripts/notes.txt | /splay zip.wav
   }
   if (%item == 3) {
     /run notepad.exe | /splay zip.wav
   }
 }
}

alias pdll { .return popups.dll }
alias Tools {
 dll $pdll New Tools 16 16
 dll $pdll SetStyle Tools bordericon
 dll $pdll LoadImg Tools icon small pics\mdx.ico
 dll $pdll AddItem Tools 0 1 MDX Studio
 dll $pdll LoadImg Tools icon small pics\ds.ico
 dll $pdll AddItem Tools 0 2 Dialog Studio Final
 dll $pdll LoadImg Tools icon small pics\rh.ico
 dll $pdll AddItem Tools 0 3 Resource Hacker
 var %do = $dll($pdll,Popup,Tools $mouse.dx $mouse.dy)
 if ($gettok(%do,1,32) == ok) {
   var %item = $gettok(%do,3,32)
   if (%item == 1) {
     /run mdxstudio\mdxstudio | /splay zip.wav
   }
   if (%item == 2) {
     /run dstudio_final\dstudio | /splay zip.wav
   }
   if (%item == 3) {
     /run resourcehacker\RESOURCE_HACKER | /splay zip.wav
   }
 }
}

alias pdll { .return popups.dll }
alias help {
 dll $pdll New help 16 16
 dll $pdll SetStyle help bordericon
 dll $pdll LoadImg help icon small pics\help.ico
 dll $pdll AddItem help 0 1 mIRC Help
 dll $pdll LoadImg help icon small pics\help.ico
 dll $pdll AddItem help 0 2 IRC Intro Help
 dll $pdll LoadImg help icon small pics\help.ico
 dll $pdll AddItem help 0 3 mIRC FAQ
 var %do = $dll($pdll,Popup,help $mouse.dx $mouse.dy)
 if ($gettok(%do,1,32) == ok) {
   var %item = $gettok(%do,3,32)
   if (%item == 1) {
     mirc.hlp | /splay zip.wav
   }
   if (%item == 2) {
     Ircintro.help | /splay zip.wav
   }
   if (%item == 3) {
     mircfaq.help | /splay zip.wav
   }
 }
}
alias pdll { .return popups.dll }
alias ie {
 dll $pdll New ie 16 16
 dll $pdll SetStyle ie bordericon
 dll $pdll LoadImg ie icon small pics\ie.ico
 dll $pdll AddItem ie 0 1 Open iExplorer
 dll $pdll LoadImg ie icon small pics\ie.ico
 dll $pdll AddItem ie 0 2 Open Windows Explorer
 dll $pdll LoadImg ie icon small pics\ie.ico
 dll $pdll AddItem ie 0 3 Join This Room On IE
 dll $pdll LoadImg ie icon small pics\ie.ico
 dll $pdll AddItem ie 0 4 Visit TechGear007 On IE
 var %do = $dll($pdll,Popup,ie $mouse.dx $mouse.dy)
 if ($gettok(%do,1,32) == ok) {
   var %item = $gettok(%do,3,32)
   if (%item == 1) {
     /run iexplore.exe | /splay zip.wav
   }
   if (%item == 2) {
     /run C:\WINDOWS\EXPLORER.EXE /n,/e,C:\  | /splay zip.wav
   }
   if (%item == 3) {
     /run iexplore $msn.geturl(h) | /splay zip.wav
   }
   if (%item == 4) {
     /run iexplore http://www.techgear007.net | /splay zip.wav
   }
 }
}

alias pdll { .return popups.dll }
alias help {
 dll $pdll New help 16 16
 dll $pdll SetStyle help bordericon
 dll $pdll LoadImg help icon small pics\away.ico
 dll $pdll AddItem help 0 1 Away
 dll $pdll LoadImg help icon small pics\return.ico
 dll $pdll AddItem help 0 2 Return
 var %do = $dll($pdll,Popup,help $mouse.dx $mouse.dy)
 if ($gettok(%do,1,32) == ok) {
   var %item = $gettok(%do,3,32)
   if (%item == 1) {
     away | /splay zip.wav
   }
   if (%item == 2) {
     away | /splay zip.wav
   }
 }
}

 

Hope thats what you mean... if not... totally disreguard my retarded reply smile.gif

Edited Aug 23, 2004 1:31 AM by TheProfessor

He's asking how he can add icons to a combo (dropdown) box, not a toolbar.

 

Read the mdx help file, especially help on the ComboBoxEx control. smile.gif

would help if i could find the mdx help file lol_sign.gif

 

anyway i think i can figure it out from what you said...tidy

 

alias $view { return $shortfn($scriptdirdlls\views.mdx) }

 

 

dll mdx.dll SetControlMDX $dname 5,7 ComboBoxEx > $views

did -i $dname 5 1 0 0 seticon icons\cancel.ico

did -a $dname 5 1 0 0 Cancel

 

 

 

is this close?

 

 

 

\\=========//

CRASH

\\==============//