MLG and FB

Started by Richard Marchessault, June 02, 2015, 05:40:10 PM

Previous topic - Next topic

Richard Marchessault

How might MLG be used in a FB project using FireFly?
Thanks,
Dick

James Klutho

I don't have headers (.bi) or an object file built for freebasic.  You could call MLG_Init dynamically and use messages for now

DIM hLib as DWORD
DIM hProc as DWORD

hLib = LoadLibrary("MLG.DLL")

IF hLib <> 0 THEN
   hProc = GetProcAddress(hLib, "MLG_INIT")
   IF hProc <> 0 THEN CALL DWORD hProc USING MLG_INIT()
   'FreeLibrary hLib  when your program exits
END IF

hGrid1 = CreateWindow("MYLITTLEGRID", "r500/c10/b3",%MLG_STYLE,4, 4, 765, 555,hDlg, %IDC_MLGGRID1, GetWindowLong(hDlg, %GWL_HINSTANCE), BYVAL 0)