Old 12-05-2017, 04:20 AM   #1
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
Default using swell for native gui in vst plugins for reaper

can anyone with win32 knowledge tell me how to embed a swell/win32 gui in the main plugin window? I have a new version of IPlug that can work without IGraphics:

https://github.com/olilarkin/wdl-ol/...s/ReaperPlugin

Code:
static WDL_DLGRET MainDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
  ReaperPlugin* _this = (ReaperPlugin*) lParam;
//  SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
  
  switch (uMsg) {
    case WM_INITDIALOG:
//      hwndDlg = _this->mHWND;
      ShowWindow(hwndDlg, SW_SHOW); // TODO: how to embed window?
      return 1;
    default:
      break;
  }
  
  return 0;
}

void* ReaperPlugin::OpenWindow(void* handle)
{
  mHWND = CreateDialogParam(0, MAKEINTRESOURCE(MAPPING_DIALOG),(HWND)handle, MainDlgProc,(LPARAM) this);
  
  return mHWND;
}
__________________
VirtualCZ | Endless Series | iPlug2 | Linkedin | Facebook
olilarkin is offline   Reply With Quote
Old 12-05-2017, 07:35 AM   #2
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

How does your dialog resource file look like? I have the following in a win32 using VST plugin :

Code:
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 12-05-2017, 07:56 AM   #3
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
Default

bingo WS_CHILD! thanks
__________________
VirtualCZ | Endless Series | iPlug2 | Linkedin | Facebook
olilarkin 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 01:07 PM.


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