PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: FF3 and ListViews  (Read 1344 times)

Andrew Lindsay

  • Junior Member
  • **
  • Posts: 76
FF3 and ListViews
« on: November 10, 2009, 04:08:18 AM »

Is it possible to get a quick tutorial on how to use list views in FF3?  I tried something as simple as follows, but just a blank list view, thinking that I should get a column with "Col1" at least..

Code: [Select]
Function FF_WINMAIN( ByVal hInstance     As Dword, _
                     ByVal hPrevInstance As Dword, _
                     ByVal lpCmdLine     As Asciiz Ptr, _
                     ByVal iCmdShow      As Long ) As Long


   ' If this function returns TRUE (non-zero) then the actual WinMain will exit
   ' thus ending the program. You can do program initialization in this function.
   
   FF_ListView_DeleteAllColumns(HWND_FORM1_LISTVIEW1)
   FF_ListView_InsertColumn(HWND_FORM1_LISTVIEW1, 0, "Col1", %LVCFMT_CENTER, 100)
   FF_ListView_InsertItem( HWND_FORM1_LISTVIEW1, 0, 0, "Test")

   Function = %FALSE    'return %TRUE if you want the program to end.

End Function
Regards

Andrew
Logged

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 8865
  • Windows 10
    • PlanetSquires Software
Re: FF3 and ListViews
« Reply #1 on: November 10, 2009, 07:22:37 AM »

The first thing that strikes me is that you are trying to setup the control in the FF_WinMain of the application. The form (FORM1) does not even exist at that point. In your case, the best place to setup the ListView is in the WM_CREATE message handler in FORM1.

Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Andrew Lindsay

  • Junior Member
  • **
  • Posts: 76
Re: FF3 and ListViews
« Reply #2 on: November 10, 2009, 07:36:47 AM »

 ::)

Cheers, that worked perfectly.  I've spent too much time in PBCC land writing once through physics and engineering routines, got to get my brain back into Win mode...
Logged

Gary Stout

  • Junior Member
  • **
  • Posts: 175
  • Mint Linux 17 (Host) w/VirtualBox PB10 and FF3
Re: FF3 and ListViews
« Reply #3 on: November 10, 2009, 12:27:39 PM »

The first thing that strikes me is that you are trying to setup the control in the FF_WinMain of the application. The form (FORM1) does not even exist at that point. In your case, the best place to setup the ListView is in the WM_CREATE message handler in FORM1.

Paul,
This would be another good topic to cover in one of your videos. Those of us coming over from an EZ way of doing things are as lost as a ball in tall weeds when it comes to where to place things (or I am anyway).

Thanks,
Gary
Logged

Robert Eaton

  • Junior Member
  • **
  • Posts: 126
Re: FF3 and ListViews
« Reply #4 on: November 10, 2009, 12:38:16 PM »

Gary,
I'm in the same boat as you! I bought FF2 and never actually used it  :-[. I'm giving it another try with FF3.
Logged

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 8865
  • Windows 10
    • PlanetSquires Software
Re: FF3 and ListViews
« Reply #5 on: November 10, 2009, 02:04:11 PM »

Quote
are as lost as a ball in tall weeds...

Hang in there guys. Probably my biggest priority with FF3 is the education behind it. Once the initial sales/orders die down then it will be easier to produce the tutorials. Now that FF3 is behind a protected wall, I feel much more comfortable providing learning material.

When things settle down, the best thing for me to do is ask everyone what their pressing needs are (maybe a poll or something). I'll then produce a video and PDF, etc... for the topics in question. (of course, as long as the material stays within our group and is not shared on other forums).

We're just getting started. :)  Granted, I don't know everything there is to know but I know enough to at least kickstart us in the right direction. I can explain the basics of most things and, for the most part, that is what a lot of people want to hear.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Jean-pierre Leroy

  • Senior Member
  • ***
  • Posts: 469
  • expect nothing, be prepared for everything ...
Re: FF3 and ListViews
« Reply #6 on: November 11, 2009, 08:54:03 AM »

Andrew,

I've just uploaded a sample FireFly project called ListViewDemo to illustrate some aspects of the ListView control.

I hope it could be of some help.

http://www.planetsquires.com/protect/forum/index.php?topic=2026.0

Jean-Pierre
« Last Edit: November 15, 2009, 05:40:41 AM by Jean-Pierre Leroy »
Logged

Andrew Lindsay

  • Junior Member
  • **
  • Posts: 76
Re: FF3 and ListViews
« Reply #7 on: November 11, 2009, 10:07:05 AM »

Jean-Piere,

Very much appreciated.

Regards

Andrew Lindsay
Logged

Barry Marks

  • Little Newbie
  • *
  • Posts: 45
Re: FF3 and ListViews
« Reply #8 on: November 12, 2009, 04:22:33 PM »


Hang in there guys. Probably my biggest priority with FF3 is the education behind it. Once the initial sales/orders die down then it will be easier to produce the tutorials. Now that FF3 is behind a protected wall, I feel much more comfortable providing learning material.

I wonder if you lose more opportunities for sales than you gain by being overprotective.

Pirates are going to pirate things.  There's not anything you can do about that.  It's a safe bet that in a few weeks, probably sooner, your new Firefly will be posted with serial numbers, etc.  The best you can do against a tornado is shake your fist at it.  Nothing else works. :)

I bought PB after downloading a pirate copy and trying it out first.  I liked it and I bought it.  I did the same thing with Firely 2.  It came with the pirate version of PB I tried out.

I like to play around with graphics programs.  Most I tried out first the same way.  I bought the ones I use.

Another way of trying out graphics programs is to follow their tutorials.  Most of those I bought have tutorials online.  I'll be amazed if those aren't a big moneymaker for them.

I think most people are basically honest if they can be.  If they have a chance to try out a program and they find they actually use it most people will pay for it.  I also suspect that the vast majority of pirates never use the stuff they download.  They're counting coups.  If your program gets pirated 1000 times probably 995 of those will never use it or buy it anyway so you haven't really lost anything.  Of the other 5 probably 1 or 2 will use it and keep their mouth shut about it and the rest will pay.  That's a net profit for you.

I started looking for pirated software to make my own trial program after a year of careful counting of what I spent on software.  That year I spent close to $4000 on software and I actually used about 1/10th of that.  At that point I decided that trying before I buy made sense.  Now I spend typically $500 a year on software and I use about 80% of it.  Call it dishonest if you like.  I have no plans to stop doing it or to stop buying what I use.

I really think being overly protective is shooting yourself in the foot.  You only hurt yourself.  The pirates aren't really affected.  Even your customers don't lose as much as you do.

Barry
Logged