0

I have a Application mostly written with the owl-libary.

There I want open new vcl-windows out of the main owl-window.
This works great, though if a dialog-window is opened (even with ShowModal) and I focus another application, then the main-window get's into foreground but is blocked by the window behind it.

I guess the Problem is the missing parent-setting.

However, I can't convert owl's TWindow to vcl's TWinControl.

Is there a trick to set a vcl's parent setting to a owl's TWindow-Object? Or could this be caused by something entirely different?

EDIT: I'm using...

void(TWindow* parent){
    Form=new TForm((HWND)parent->Handle);
    Form->ParentWindow=parent->Handle;
    Form->BorderIcons >> biMinimize >> biMaximize << biSystemMenu; //No minimize, no maximize, but close
    Form->BorderStyle = bsSingle;
    Form->Position = poMainFormCenter;
    ...
    Form->ShowModal();

...now. However, the new window is locked up and can not be clicked/closed/switched to. Is there something I missed in using ParentWindow?

EDIT2: I think it might be a Problem that the parent is a TDecoratedMDIFrame, which is a MDI-Container, so my dialog is treated like a mdi-child instead of a normal dialog...

Julian
  • 493
  • 4
  • 22
  • Please be sure to read the tag wiki descriptions. This question was tagged with [tag:owl], but it's not about OWL, the Web Ontology Language. I've removed the tag. – Joshua Taylor Sep 02 '14 at 20:34
  • @JoshuaTaylor: OWL (Object Window Library) is the predecessor to VCL, and has been carried on as an [open-source project](http://owlnext.sourceforge.net). Probably needs a new tag created for it. – Remy Lebeau Sep 02 '14 at 23:54
  • Yes, I've seen some questions about it before. It's just that [tag:owl] is for something else. – Joshua Taylor Sep 03 '14 at 00:33
  • @JoshuaTaylor ah, sorry, I missed owl's description as it seems the only available tag for object window library... – Julian Sep 03 '14 at 07:21
  • @Julian You can "create" tags by just writing them in (you might need a certain amount of rep before you can do that, though; I'm not sure). At any rate, I've created an [tag:owlnext] tag and added it to this question, as well as a few other questions. Just a note, I noticed that some of your other questions that use OWLNext didn't have the [tag:c++] tag. You'll tend to get many more views if you use a "mainline" language tag in addition to the more specific ones. – Joshua Taylor Sep 03 '14 at 11:14

1 Answers1

1

TWinControl has a ParentWindow property for specifying a non-VCL parent window.

Also, in modern VCL versions, you can specify a ParentWnd when displaying a VCL dialog.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
  • Thank you for the answer! It was exactly what I was looking for, but I seem to be too dull to use it right^^ I added an EDIT at my question above: The new vcl-Form is locked up and not responding – Julian Sep 03 '14 at 14:36