I am creating a Delphi service. Is there any way to use controls derived from TWinControl within services? Ultimately the control and any controls I place on it will be saved to a bitmap. But anything I try I get “control has no parent window” error.
I have successfully created a TBitMap and can accomplish the same functionality. But having all the functionality built into the VCL would greatly simplify the task.
Your program complains that the control has no parent window, so give it one. Create a form and put your controls there. Forms can be top-level windows, so they don’t need to have parents. The form will serve as the parent window for the rest of your controls.
They still won’t be visible, but they will at least exist.