Peter Below's Threaded Splash Screen and Modal Dialogs

前端 未结 3 477
说谎
说谎 2021-02-06 19:45

I\'m using Peter Below\'s PBThreadedSplashForm to display during application startup. It gets updated as various databases are opened during the creation of the data module (jus

3条回答
  •  伪装坚强ぢ
    2021-02-06 20:43

    Ok. Finally got the problem solved. It appears to be caused by the WS_EX_NOACTIVATE flag in the call to CreateWindowEx(). Changing it to remove that seems to solve the problem; the modal dialog displays above the splash screen, and because it's modal the splash screen can't be brought above it.

    The working code is:

    
      FWnd := CreateWindowEx(
                TopmostStyle[ FTopmost ] or WS_EX_TOOLWINDOW
                or WS_EX_STATICEDGE or WS_EX_CLIENTEDGE,
                MakeIntResource( FWndClass ),
                nil,
                WS_POPUP or WS_BORDER,
                Forigin.x, Forigin.y,
                wsize.cx, wsize.cy,
                0, 0, hInstance, self );
    

    Thanks, Rob and Craig, for the efforts.

提交回复
热议问题