Announcement

Collapse
No announcement yet.

firefly newbie: where do I put dll inits?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Shawn Anderson
    replied
    Awesome, thanks!

    Leave a comment:


  • Elias Montoya
    replied
    Originally posted by Paul Squires View Post
    Shawn - don't forget to take a look at...

    Also take a look at the goodies on the F8 key.

    Leave a comment:


  • Paul Squires
    replied
    Shawn - don't forget to take a look at the FireFly Forums over on the PlanetSquires site. Lots of questions asked and answered over there about the various controls. http://planetsquires.com/support/index.php

    Leave a comment:


  • Paul Squires
    replied
    Definitely - use the LVN_ITEMCHANGED. That is the actual Listview notification that gets sent to the Form when an item has been clicked on in the ListView. Using the LBUTTONDOWN/LBUTTONUP messages is not the best choice for this scenario.

    Code:
    Function FORM1_LISTVIEW1_LVN_ITEMCHANGED ( _
                                             ControlIndex  As Long,            _  ' index in Control Array
                                             hWndForm      As Dword,           _  ' handle of Form
                                             hWndControl   As Dword,           _  ' handle of Control
                                             ByVal lpNMV   As NM_LISTVIEW Ptr  _  ' pointer to NM_LISTVIEW
                                             ) As Long
    
    End Function
    If you want to deal with the current item row *prior* to it changing to the newly selected row then use the LVN_ITEMCHANGING message handler.

    Leave a comment:


  • Shawn Anderson
    replied
    OK, I've added itemchanged, and that seems to work like I expect.
    It also works with the arrow buttons.

    thoughts?

    Leave a comment:


  • Shawn Anderson
    replied
    I changed the trigger from lbuttondown to lbuttonup and that works better, but I still have to double click.

    It feels like I'm doing something wrong....

    Leave a comment:


  • Shawn Anderson
    replied
    listview

    I'm not sure I'm implementing my listview correctly with firefly.

    I want to return the value of whatever is in the the leftmost field of the selected row when clicked upon.

    Code:
    Function CLIENT_CLIENTLISTVIEW_WM_LBUTTONDOWN ( _
                                                  ControlIndex  As Long,  _  ' index in Control Array
                                                  hWndForm      As Dword, _  ' handle of Form
                                                  hWndControl   As Dword, _  ' handle of Control
                                                  MouseFlags    As Long,  _  ' virtual keys that are pressed
                                                  xPos          As Long,  _  ' x-coordinate of cursor
                                                  yPos          As Long   _  ' y-coordinate of cursor
                                                  ) As Long
    
    	Local clientID As String
    	Local lvIndex As Long       
                                             
                                                 
    	 lvIndex = ListView_GetNextItem( hwnd_client_clientListview, -1, %LVNI_SELECTED )+1   
    	 
    	 If lvIndex> 0 Then  
        
    	 	ListView Get Text hwnd_client, idc_client_clientListview, lvIndex, 1 To clientID
    	 
    	 	MsgBox clientID   
    
    	 End If                                                                                          
    
    End Function
    when I click on the listview data, it grabs what is currently selected, then moves focus onto what was clicked, if that makes sense.

    What am I doing wrong?

    Leave a comment:


  • Shawn Anderson
    replied
    next question

    nevermind.... it was me this time
    Last edited by Shawn Anderson; 15 Jan 2009, 05:05 PM.

    Leave a comment:


  • Paul Squires
    replied
    Originally posted by Shawn Anderson View Post
    I can see FireFly is going to save me some time (thanks Paul).
    Thanks Shawn! I appreciate it.

    Elias is spot on with his answer.

    Leave a comment:


  • Shawn Anderson
    replied
    perfect, thanks elias

    Leave a comment:


  • Elias Montoya
    replied
    You can do init stuff in FF_WINMAIN or in the XX_WM_CREATE of your main form, and to shutdown anything on close, you can use XX_WM_DESTROY on the main form.

    Leave a comment:


  • Shawn Anderson
    started a topic firefly newbie: where do I put dll inits?

    firefly newbie: where do I put dll inits?

    Though I bought FireFly last year I just really starting using FireFly today.
    I've only used PBForms before (DDT).
    I'd like to say that in about a half hour I was pretty comfortable with creating my multi-tabbed form. I can see FireFly is going to save me some time (thanks Paul).

    Anyway, I have a dumb question:
    I plan to use sqlTools with this particular program.

    Normally I would put the command to open the database and close the database in the pbmain function. Same goes with other tools inits (like socket tools). Where do I put that stuff now?



    thanks
Working...
X
😀
🥰
🤢
😎
😡
👍
👎