PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Yet another newbie question..  (Read 298 times)

Roger Garstang

  • Master Member
  • ****
  • Posts: 1360
Yet another newbie question..
« on: January 26, 2009, 12:52:14 PM »

I am working my way through this and it is starting to make more sense. At this point, I am still a little unsure where to put things (code).

For the sake of experimenting, I have 2 forms (a main form and a secondary form). I click a menu option, the second form displays....no problem. I want to have some text appear in a text box of the second form once it opens. I tried the FF_SetText in a couple of places and finally got the desired results, but I am not sure I put it where it really needs to go. I put the FF_SetText command in the WM_Notify function for the second form. Am I close or is there a better spot to put this?

Thanks,
Gary
Logged

TechSupport

  • Guest
Re: Yet another newbie question..
« Reply #1 on: January 26, 2009, 03:24:31 PM »

I wouldn't put it in the WM_NOTIFY message handler. The best place to put initialization code for a Form (or the Controls on that Form) is in the WM_CREATE message handler for the Form.

At the time that WM_CREATE fires in FireFly, the Form exists and all Controls on that Form exist, but the Form is not yet displayed. This gives you the opportunity to change properties of the Controls at runtime (using FF_Control_SetText, etc...).

Keep the questions comin' :)
Logged

Roger Garstang

  • Master Member
  • ****
  • Posts: 1360
Re: Yet another newbie question..
« Reply #2 on: January 26, 2009, 03:45:02 PM »

THANKS AGAIN!!!
Logged

TechSupport

  • Guest
Re: Yet another newbie question..
« Reply #3 on: January 26, 2009, 05:56:29 PM »

You are very welcome. A number of people will try programs like FireFly and get overwhelmed very quickly. Unfortunately, they will give up way too quickly without really getting to enjoy just how easy software development can be.
Logged