Prev Previous Post   Next Post Next
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
 

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:19 AM.


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