May 11, 200422 yr This question is for C/C++ gauge developer.When the gauge callback is called with service_id PANEL_SERVICE_PRE_INSTALL or PANEL_SERVICE_POST_INSTALL, the value of the parameter "extra_data" is the resource_handle.Can someone tell me what this is? Is it the instance handle of the gauge file, which is a DLL? Is it another handle?Thanks for any info.Eric My Web Site
May 11, 200422 yr I'm not 100% sure if it is the resource handle or a handle to a module a resource can be loaded of (maybe the same). However some sound modules for gauges (e.g. rfgutils.lib) can load a wav file embedded in the gauge itself (load it from the resource part of the gauge). Using ((HINSTANCE)extra_data) as the resource handle does the trick. Maybe even image loading is possible, e.g. with Gdi+ and Bitmap::FromResource((HINSTANCE)extra_data,bitmapName);Quite some time ago when I checked, but I think ((HINSTANCE)extra_data) is different to GetModuleHandle(NULL) (to get a handle to the .gau file).Arne Bartels
May 12, 200422 yr GetModuleHandle(NULL) returns not handle of your gau file but handle of main executable. In FS9 it will return handle of fs9.exeGetModuleHandle("mygauge.gau") returns handle of given gauge file name.
Create an account or sign in to comment