Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Mass load icons into imagemanager?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Mass load icons into imagemanager?

 Post Reply Post Reply
Author
Message
xvisceral View Drop Down
Newbie
Newbie


Joined: 22 November 2009
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote xvisceral Quote  Post ReplyReply Direct Link To This Post Topic: Mass load icons into imagemanager?
    Posted: 22 November 2009 at 4:06pm
Okay, so I have an imagelist that I really like that I have been using in my projects.

I recently switched my GUI to include codejock controls because it looks 1000x better.

The listview when you right click it, you cannot assign an imagelist, or a SmallIcon property. You have to use their imagemanager to load icons as far as I know.

Is there a way that I could possibly either load all of the imagelist into the imagemanager, or any way around this?

Maybe a way to mass add a folder of icons into a imagemanager?

I've tried something along the lines of...
Quote Dim IcoPath As String
Dim i As Integer
For i = 1 To 247
IcoPath = "C:\fam\" & "picture" & i  & ".gif"
With ImageManager1
.Icons.LoadIcon(IcoPath, i, xtpImageNormal)
Next i
End With


Of course that didn't work...
Help? :D

I know I could just add all of the icons to an imagemanager manually but theres 247 pictures
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 23 November 2009 at 5:02am
Hi,
try LoadBitmap instead of LoadIcon.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
xvisceral View Drop Down
Newbie
Newbie


Joined: 22 November 2009
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote xvisceral Quote  Post ReplyReply Direct Link To This Post Posted: 23 November 2009 at 5:12pm
Private Sub Form_Load()
Dim IcoPath As String
Dim i As Integer
For i = 1 To 247
IcoPath = "C:\fam\" & "picture (" & i & ")" & ".gif"
ImageManager1.Icons.LoadBitmap IcoPath, 1, xtpImageNormal
Next i
ListView1.Icons = ImageManager1.Icons
ListView1.ColumnHeaders.Add , , "hello", 2000
With ListView1.ListItems.Add
.Text = "About me"
.Icon = 1
End With
End Sub


Is not working for me...
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.031 seconds.