Jacek Kwiecień
Jacek Kwiecień

Reputation: 12637

Geting an instance of Windows Control (dialog window) by its handle

I called some dialog window in delphi. I'm trying to get refference to it, bu encountering problem. Those controls are not VCL so I can't use FindWindow(handle): TWinControl

Is there method that returns proper window control?

Is there any chace That I would be able to gather from dialog window info like:

*number of controls on dialog window *names, text, classnames of controls on dialog window

Upvotes: 1

Views: 407

Answers (1)

Rob Kennedy
Rob Kennedy

Reputation: 163277

If there isn't really a VCL control representing the dialog box, then you cannot manufacture one out of nothing. VCL controls create and assume responsibility for their corresponding Windows controls, but if the Windows controls already exist, then there is no way to "wrap" them into new VCL objects.

You'll just have to operate on the window handles directly instead. You can use them to gather whatever information you want.

Upvotes: 2

Related Questions