PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Haakon Birkeland on September 28, 2005, 07:49:33 PM

Title: Change form name
Post by: Haakon Birkeland on September 28, 2005, 07:49:33 PM
How do you change the caption on the titlebar after it was created?
My french interferes with the search keyword

Bert
Title: Change form name
Post by: Haakon Birkeland on September 28, 2005, 08:04:27 PM
Sorry finally found the proper key word. It is "SetWindowText, hwnd,"text". Second question going thru a few examples on PB's site "text" parameter has to be Asciiz or a regular string. It seems to work fine with regular strings but just wondering.

Bert
Title: Change form name
Post by: TechSupport on September 28, 2005, 09:41:26 PM
You can also use FireFly's built in function to change the caption of the Form. FireFly and Windows treats controls/forms as windows.


FF_Control_SetText hWndForm, "My New Title"
Title: Change form name
Post by: Haakon Birkeland on September 28, 2005, 09:49:44 PM
Again looked thru the functions and didn't see that one. Will use FF's as I am not very familiar with api uses.

Bert
Title: Change form name
Post by: Roger Garstang on September 29, 2005, 02:19:32 AM
Usually PB doesn't put too much emphasis on it, but in memory I think when you store a regular string they allocate the length of it plus one and terminate it with a nul, so either method will work (For things you pass a value at least...not when the API gives your string a value unless you assign it something to make it the needed size since they are variable)