[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-swt-dev] Win32: Convert HICON to SWT Image
|
If by file's icon you mean a .ico file, then you can try something like:
SWT can decode .ico files.
fileName = "./myfile.ico";
ImageData data = new ImageData(fileName);
or directly:
Image image = new Image(display, fileName);
(In the future, please send user questions to the SWT user forum.
http://www.eclipse.org/newsportal/thread_frameset.php3?name=eclipse.platform.swt)
Chris
mailinglists@xxxxxx
Sent by: To: platform-swt-dev@xxxxxxxxxxx
platform-swt-dev-admin@ cc:
eclipse.org Subject: [platform-swt-dev] Win32: Convert HICON to SWT Image
2003-05-19 06:42
Please respond to
platform-swt-dev
hi,
I need to get a file's Icon on win32. I think I could use some api function
for this, but
it returns a HICON - Handle of the icon.
Now how can I convert this handle to a SWT image? As I'm not very
experienced in JNI and I think most of SWT users aren't either, I am
posting this here,
as there should be some JNI and Win32API experienced people round here...
Or could you even add such a function (p.e. Image getFileIcon(File f)) to
all swt implementations (it could return a generic file/dir-icon on
platforms
with no file-icons (such as motif) and the according icon on win32 and
gnome
Peschmä
--
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev