PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: John Messingham on January 29, 2005, 05:24:54 PM

Title: Windows Control Settings
Post by: John Messingham on January 29, 2005, 05:24:54 PM
Hi, I just want to check that I am heading in the right direction. I want to make some controls read only from my application. Do I use the 'control send' command to do this, I cannot see a FF function to do it.

Many Thanks
Title: Windows Control Settings
Post by: Roger Garstang on January 29, 2005, 10:57:10 PM
What kinds of controls and what do you want to read/use them for?  For starters you'd want to set the control's style for being disabled, or for a text/edit box make it read only if you want them to be able to still do other things with the text except edit it.

Paul has Control_SetText/GetText functions to get the data...for some reason he made one for TextBoxes too, but they pretty much do the same thing if I recall....some functions even appear to do something different because his coding style was different at the time he wrote one to another.  Like BYCOPY TheText in one and BYVAL STRPTR(TheText ) in another, etc.  I think passing the pointer would be quicker than making a copy and passing that pointer, but not by much...main thing to me is just keeping them using the same way and being sure that the function doesn't change the value where ByCopy may or may not be needed.

Also, I wouldn't mix DDT with FF/SDK code.  Control Send(DDT), SendMessage(SDK).
Title: Windows Control Settings
Post by: John Messingham on January 31, 2005, 09:29:45 AM
Thanks Roger,

I want to make the controls read only/disabled if the selected record is being edited by another user.

Many Thanks
Title: Windows Control Settings
Post by: TechSupport on January 31, 2005, 10:01:09 AM
You can use ff_control_enable and ff_control_disable to make controls enabled/disabled. These are just simple wrappers around the WinAPI function, EnableWindow.