PlanetSquires Forums

Support Forums => General Board => Topic started by: John Waalkes on May 24, 2010, 09:15:18 PM

Title: Error 460 "Undefined Equate"
Post by: John Waalkes on May 24, 2010, 09:15:18 PM
Hi guys,

I created a project that included the "My Little Grid" control (actually, a couple of them) and without editing anything in the FireFly generated code, I get a "Error 460 - Undefined Equate".

FireFly then takes me to this snippet of code

' Create a registration-free instance of the MSHFlexGrid control
Local  cp As OC_CREATEPARAMS
cp.clsid = $CLSID_MSFlexGrid
cp.riid = $IID_IMSFlexGrid
cp.szLicKey = $RTLKEY_MSFlexGrid
cp.szLibName = Exe.Path$ & "Msflxgrd.ocx"
hGrid = CreateWindowEx(0, $OC_CLASSNAME, "", _
   %WS_CHILD Or %WS_VISIBLE Or %WS_BORDER Or %WS_TABSTOP, _
   10, 10, 400, 300, hParent, %IDC_GRID, GetModuleHandle(ByVal %Null), cp)


With the cursor located on "%IDC_GRID".

I checked to see if I had "Msflxgrd.ocx" on the system, and I do.

Any idea as to what is wrong?


Thanks,

John

Title: Re: Error 460 "Undefined Equate"
Post by: Wilko Verweij on May 25, 2010, 05:00:04 AM
Hi John,
Did you follow all the instructions in the help file about OCX's?
Wilko
Title: Re: Error 460 "Undefined Equate"
Post by: Paul Squires on May 25, 2010, 10:29:55 AM
You must have wrote that code yourself because FF did not generate it. Because it is not FF generated code then you need to define the control identifier %IDC_GRID yourself. Put this at the top of your Form's code:

%IDC_GRID = 100

Title: Re: Error 460 "Undefined Equate"
Post by: José Roca on May 25, 2010, 11:30:05 AM
That code is taken from a post in my forum:

http://www.jose.it-berater.org/smfforum/index.php?topic=2950.0

and has nothing to do with My Little Grid, bhut with the Microsoft Flex Grid control.
Title: Re: Error 460 "Undefined Equate"
Post by: John Waalkes on May 25, 2010, 02:11:33 PM
Quote from: Wilko Verweij on May 25, 2010, 05:00:04 AM
Hi John,
Did you follow all the instructions in the help file about OCX's?
Wilko

Nope, I didn't even know they were there. I'll look now.

Thanks!


John
Title: Re: Error 460 "Undefined Equate"
Post by: John Waalkes on May 25, 2010, 02:20:43 PM
Quote from: TechSupport on May 25, 2010, 10:29:55 AM
You must have wrote that code yourself because FF did not generate it. Because it is not FF generated code then you need to define the control identifier %IDC_GRID yourself. Put this at the top of your Form's code:

%IDC_GRID = 100

Nope. 100% FireFly code.

You give me *way* too much credit, I haven't even begun to figure out how to add *my* stuff to the code as of yet. :)

I gave up on the grid since the treeview is a better fit for my project. I'm using the sample you provided, and I just got done adding my radio buttons, command buttons, combobox, etc. It compiled and ran perfectly. :)

Now I just need to add my stuff from my PB code.


Thanks, :)

John
Title: Re: Error 460 "Undefined Equate"
Post by: John Waalkes on May 25, 2010, 02:25:05 PM
Quote from: Jose Roca on May 25, 2010, 11:30:05 AM
That code is taken from a post in my forum:

http://www.jose.it-berater.org/smfforum/index.php?topic=2950.0

and has nothing to do with My Little Grid, bhut with the Microsoft Flex Grid control.

Hey, thanks Jose. I'll bookmark that page for future reference.

I'm going with a treeview control since that makes more sense from a user's perspective, but eventually I will have to present all of the data that I'm collecting for report generation. For that a grid control might make more sense.


Thanks!

John