• Welcome to PlanetSquires Forums.
 

Dialog title

Started by Andre Smit, March 09, 2006, 10:45:43 PM

Previous topic - Next topic

Andre Smit

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

JR Heathcote

Try using:


FF_Control_SetText (hWndForm, sTitle)

Andre Smit

Thanks

but doesn't work for me.

Roger Garstang

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.