architecture - Loading scheme for icons -
what best scheme loading icons application?
a little bit of background... i’m creating ftp-like application has 4 panes (local folder pane, local file pane, cloud folder pane, cloud file pane). in both file panes, 1 of columns filename, want display icon next (just see in windows explorer).
do fact not have physical file files in cloud, have poke registry (with file extension in hand) , exefilename , iconindex combination file type, , there retrieve icon. said, think have below options, , opinion:
1) load exefilename/iconindex combinations every extension (eg: .doc, .txt) on program load , needed query , use them call out extracticon win32 api.
2) poke registry when needed exefilename/iconindex combinations , call out extracticon win32 api icon of associated file type.
3) save 1 byte file of every extension known, directory , call out shgetfileinfo win32 api , pluck associated icon file when needed.
4) save physical icon file every file extension @ time of install directory , call out when need (but not change file association changes, additions, or deletions).
5) junk whole thing , buy set of icons icon shop has top 1000 icon file types known, , display unknown icon type of other file types.
thank time , comments.
-jessy houle
i think option 2 sounds reasonable, long cache results, query given file type once, if there many files of type.
i think options 4 & 5 out, since not reflect changes in associations. confuse user if icons different in app versus windows explorer.
options 1 & 3 seem overkill, since showing common icons many times, , perhaps never showing more obscure ones.
Comments
Post a Comment