Change form name

Started by Haakon Birkeland, September 28, 2005, 07:49:33 PM

Previous topic - Next topic

Haakon Birkeland

How do you change the caption on the titlebar after it was created?
My french interferes with the search keyword

Bert
Haakon 8o)

Haakon Birkeland

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
Haakon 8o)

TechSupport

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"

Haakon Birkeland

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
Haakon 8o)

Roger Garstang

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)