PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Dialog title  (Read 306 times)

Andre Smit

  • Guest
Dialog title
« on: March 09, 2006, 10:45:43 PM »

May be missing this in the help file but is it possible to set the title of a dialog using FF a la the DDT -> DIALOG SET TEXT hDlg, titletext$

TIA
Logged

JR Heathcote

  • Guest
Dialog title
« Reply #1 on: March 09, 2006, 11:07:39 PM »

Try using:

Code: [Select]

FF_Control_SetText (hWndForm, sTitle)
Logged

Andre Smit

  • Guest
Dialog title
« Reply #2 on: March 10, 2006, 01:05:26 AM »

Thanks

but doesn't work for me.
Logged

Roger Garstang

  • Guest
Dialog title
« Reply #3 on: March 10, 2006, 01:47:47 AM »

Always works for me.  In fact, I'm using it in an app I'm making right now.  Perhaps more details on the "dialog" you are wanting to change the name on.  One difference in FF is what it creates are actual Windows while DDT uses Dialogs behind the scenes which is a form of a window.  There are many discussions on differences between dialogs and windows both here and over at PB's forum.  The main difference is how messages are handled which Paul has made use of by making the message loop of the Windows respond like dialogs.  No matter what though, that code should work on either type, but DDT statements you should try to avoid using in FF.

Now, are you mixing DDT in with FF code?  Is the window/dialog you are trying to change text in your app or another app?  And is it a form/window or control?  If you push F4 in FireFly's Code Window you can double click on your Window's HWND value (Only Value right off the Root with an Arrow icon and named HWND_YourFormName).  This inserts the value you need into the function's hWndForm value, then sTitle you replace with a string like "My Title".  If you change text on a control like a label you need to make sure you use the HWND_ Handle ID and not the IDC_ Control ID too.  Control IDs are mostly used in WM_COMMAND messages.  Most controls have their own functions to add/edit text.  Paul provides all the wrappers for these to make it easy to use API calls for Windows you create instead of DDT which doesn't work well with straight Windows...F8 opens up the Wrapper list you can double click to insert them as with the Handle Window.
Logged