Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to make a floating DirectX Child Window with Delphi?
    primarykey
    data
    text
    <p>I have a Delphi project and the main form is a child window of another application. The parent application (a 3D game coded in C++) has two window states, <strong>windowed</strong> and <strong>full screen</strong>. In windowed mode the Delphi form floats on top of the parent application perfectly. It can be clicked on, dragged around, no problem (using <strong>params.Style := WS_POPUP;</strong> in the CreateParams procedure of my main form):</p> <pre><code>procedure TMyForm.CreateParams(var Params: TCreateParams); begin inherited CreateParams(Params); HandleToTheOtherApp := FindWindow('THE_OTHER_APP', nil); if HandleToTheOtherApp = 0 then begin ShowMessage('The parent app was not found'); exit; end; params.Style := WS_POPUP; params.WndParent := HandleToTheOtherApp; params.WinClassName := 'MyAppClassName'; end; </code></pre> <p>However if the parent application is put into <strong>full screen</strong> mode (it uses DirectX 9/10) my Delphi form is hidden from view. It appears to still be on the screen as I can see if flashing occasionally, but is not being redrawn. </p> <p>If I click on the window (or where it appears to be) it re-appears for a second and then dumps the game out of full screen mode and back into windowed mode. Clearly there is something it doesn't like about the form. The form <strong>used</strong> to appear in previous editions of this game, but perhaps due to changes in the DirectX version (my guess) it no longer appears.</p> <p>The form doesn't display anything complicated like 3D graphics, just basic controls like buttons and list boxes. I have tried various Window styles and made it Doublebuffered, all to no avail. Perhaps there is someone out there who has been successful in getting a window to show in these circumstances using a particular function, Window style or header?</p> <p>Is there some way to make a Delphi form appear correctly within a DirectX environment?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload