Shell32.dll/ExtractIconA gibt nichts zurück [erledigt]
Übersicht BlitzMax, BlitzMax NG Beginners-Corner
d-bugBetreff: Shell32.dll/ExtractIconA gibt nichts zurück [erledigt] |
Sa, Nov 26, 2005 14:39 Antworten mit Zitat |
|
---|---|---|
Hallo, liebe Kinder
Hab mal versucht x-pressives SetAppIcon nach BM zu portieren. Leider nur mit mäßigem Erfolg, bisher. Das Problem ist, das ExtractIconA grundsätzlich nur 0 zurück gibt. erst mal den code: Code: [AUSKLAPPEN] Global deiniconpfad:String = "blub.ico"
Extern "win32" Function GetActiveWindow () Function SetClassLongA (hwnd,index,NewLong) Function ExtractIconA (hwnd,file:String,index) '<-- Problemkind End Extern ?win32 Function SetAppIcon (file:String) If Not FileType (file) Notify "Icon "+file+" not found ..." Else Local hwnd = GetActiveWindow () Local icon = ExtractIconA (hwnd,file,0) '<-- Problemkind gibt immer nur 0 zurück Print hwnd Print icon SetClassLongA (hwnd,-14,icon) EndIf End Function ? 'GUItest 'Rem test:tgadget = CreateWindow ("Test Fenster",200,200,300,200) SetAppIcon (deiniconpfad) While WaitEvent() Select EventID() Case EVENT_WINDOWCLOSE End End Select Wend 'End Rem Rem 'NonGUItest Graphics 640,480,0 SetAppIcon (deiniconpfad) WaitKey End Rem Ich bin mir wirklich nicht sicher, was ich da falsch gemacht habe. Ich meine, wenn B+ oder B3D es schaffen die shell32.dll anzusprechen, wird BM das doch auch noch hinbekommen, oder nicht ? naja, vielleicht weiß ja einer Rat. greetz |
||
- Zuletzt bearbeitet von d-bug am Sa, Nov 26, 2005 15:12, insgesamt einmal bearbeitet
Suco-XBetreff: ..... |
Sa, Nov 26, 2005 15:02 Antworten mit Zitat |
|
---|---|---|
Code: [AUSKLAPPEN] Global deiniconpfad:String = "c:\Edit.ico" Extern "win32" Function GetActiveWindow () Function SetClassLongA (hwnd,index,NewLong) Function ExtractIconA (hwnd,file:Byte Ptr,index) '<-- Problemkind End Extern ?win32 Function SetAppIcon (file:String) If Not FileType (file) Notify "Icon "+file+" not found ..." Else Local hwnd = GetActiveWindow () Local icon = ExtractIconA (hwnd,file.ToCString(),0) '<-- Problemkind gibt immer nur 0 zurück Print hwnd Print icon SetClassLongA (hwnd,-14,icon) EndIf End Function ? 'GUItest 'Rem test:tgadget = CreateWindow ("Test Fenster",200,200,300,200) SetAppIcon (deiniconpfad) While WaitEvent() Select EventID() Case EVENT_WINDOWCLOSE End End Select Wend 'End Rem Rem 'NonGUItest Graphics 640,480,0 SetAppIcon (deiniconpfad) WaitKey End Rem Mfg Suco |
||
Intel Core 2 Quad Q8300, 4× 2500 MHz, 4096 MB DDR2-Ram, GeForce 9600GT 512 MB |
d-bug |
Sa, Nov 26, 2005 15:04 Antworten mit Zitat |
|
---|---|---|
Suco-X du bist und bleibst mein Held
Große Danke !!!! |
||
Übersicht BlitzMax, BlitzMax NG Beginners-Corner
Powered by phpBB © 2001 - 2006, phpBB Group