OK, I'm trying to extract the icon from an icon file so I can set it in the top left of the app window. Problem is, in the following code, icon is always 0, so ExtractIconA is not working as it should. The icon file exists in the same folder as the app. This code totally works in Blitz Plus, what am I doing wrong? Help please ... thanks.
Extern "win32"
Function FindWindowA:Int(nullstring%,WindowText$z)
Function ExtractIconA:Int(hWnd%,File$z,Index%)
End Extern
AppTitle = "test"
Graphics 640,320,0
Cls
Local handle:Int = FindWindowA(0,"test")
Local icon:Int = ExtractIconA(handle, "framework.ico", 0)
DrawText handle,0,0
DrawText icon,0,20
Flip
WaitKey
|