Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Developer Forum

Reply
 
Thread Tools Display Modes
Old 12-05-2017, 04:20 AM   #1
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: Huddersfield, UK
Posts: 1,088
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 | pMix | Endless Series | WDL-OL | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
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: 7,053
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
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass, Paul(X)Stretch and λ) :
http://xenakios.wordpress.com/
Xenakios is online now   Reply With Quote
Old 12-05-2017, 07:56 AM   #3
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: Huddersfield, UK
Posts: 1,088
Default

bingo WS_CHILD! thanks
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
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 04:43 AM.


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