COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :

Go Back   Cockos Incorporated Forums > Other Software Discussion > WDL users forum

Reply
 
Thread Tools Display Modes
Old 08-05-2019, 03:02 PM   #1
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default On macOS, windows created via CreateDialog always remain in background

As far as I can tell, the only way to create new windows through swell, is by using CreateDialog.

To create a blank top-level, modeless windows, I therefore tried:
Code:
hwnd = CreateDialog(nullptr, MAKEINTRESOURCE(0), nullptr, myWinProc);
SetWindowLong(hwnd, GWL_STYLE, WS_CAPTION|WS_THICKFRAME|WS_SYSMENU);
SetWindowText(hwnd, title);
SetWindowPos(hwnd, HWND_TOPMOST, x, y, w, h, SWP_SHOWWINDOW | SWP_NOCOPYBITS);
ShowWindow(hwnd, SW_SHOW);
where myWinProc mostly just passes every message on to DefWindowProc.

On Linux, this works fine. On macOS, however, the newly created window remains below all other REAPER windows except the main window. Even if I try SetForeground, the window doesn't come to the foreground.

I am doing something wrong?

(EDIT: Cross-posted to the ReaScript/Developer forum, since that forum is more active.)

Last edited by juliansader; 08-06-2019 at 03:59 AM.
juliansader is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:47 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.