View Single Post
Old Jun 12th, 2005, 5:18 AM   #3
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,260
Rep Power: 5 grumpy will become famous soon enough
If he's using Borland Builder, he's almost certainly using the VCL. If he's using Borland C++, he may or may not be using the VCL.

First the VCL way: TWinControl, is the base class from which all windowing controls are derived. In rough terms, the definition of a windowing control is one that has three core attributes (it can receive focus, it can contain other controls, and it has a window handle). TWinControl has a method called SetFocus(), which takes no arguments, and makes the control grab focus.

The win32 SDK way requires a handle for the control. Use SendMessage() to send a WM_SETFOCUS message to the control.
grumpy is offline   Reply With Quote