Hello,
I'm trying to open a new window in Holyhock. So I use a CreateDialog function wich third argument is a handle of the main program window. I've tried with sdkGetUsineMainWindow(), but when I pause debugging on this line :
HWND UsineWnd = (HWND) sdkGetUsineMainWindow();
UsineWnd seems empty. Can anyone (Martin, for exemple...) tell me what's wrong ?
Thanx.
Usine main window handle
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
hi, LevraiBernardo
happy to see you around the sdk again
strange that sdkGetUsineMainWindow() don't work for you, i use it in the pluginwrapper with no problem (PluginWrapper.cpp, line 1482)
anyway, you shouldn't rely on CreateDialog as it is WIN only, you know, multi-plateform stuff...
there is a brunch of methods in the sdk to open a child window :
you can use sdkCreateDeskWindow () plus sdkSetDeskWindowClientSize (int clientWidth, int clientHeight) to make your child window
it let open the question about populating this window in a multiplateform way...
in the pluginwrapper, i use juce, you can too if your module is under a juce compatible licence
of course, you can use any other UI lib you want
hope it help
happy to see you around the sdk again
strange that sdkGetUsineMainWindow() don't work for you, i use it in the pluginwrapper with no problem (PluginWrapper.cpp, line 1482)
anyway, you shouldn't rely on CreateDialog as it is WIN only, you know, multi-plateform stuff...
there is a brunch of methods in the sdk to open a child window :
Code: Select all
// there is a typo in the actual sdk, it's actually "sdkCreatDeskeWindow"
// but it will be corrected in the next release
void* sdkCreateDeskWindow ();
void sdkDestroyDeskWindow ();
void sdkSetDeskWindowClientSize (int clientWidth, int clientHeight);
void* sdkShowDeskWindow ();
void sdkHideDeskWindow ();it let open the question about populating this window in a multiplateform way...
in the pluginwrapper, i use juce, you can too if your module is under a juce compatible licence
of course, you can use any other UI lib you want
hope it help
Martin FLEURENT - Usine Developer - SDK maintainer
-
LevraiBernardo
- Site Admin
- Posts: 110
- Contact:
Yes Martgnasse. Thank you for your fast answer.
It works. I had seen these very usefull functions, but I really don't know how to populate the window (is there a way to catch a handle for it) ? So I went back to my old school CreateDialog function.
So how can I put my components (I use a datagrid Excel style) in this desk window ?
It works. I had seen these very usefull functions, but I really don't know how to populate the window (is there a way to catch a handle for it) ? So I went back to my old school CreateDialog function.
So how can I put my components (I use a datagrid Excel style) in this desk window ?
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
normally, the two methods :LevraiBernardo wrote:Yes Martgnasse. Thank you for your fast answer.
It works. I had seen these very usefull functions, but I really don't know how to populate the window (is there a way to catch a handle for it) ? So I went back to my old school CreateDialog function.
So how can I put my components (I use a datagrid Excel style) in this desk window ?
Code: Select all
void* sdkCreateDeskWindow ();
void* sdkShowDeskWindow ();you have to cast it like this if you choose the pur windows route
Code: Select all
HWND WndHandle = (HWND)sdkCreateDeskWindow ();hope it help
Martin FLEURENT - Usine Developer - SDK maintainer
-
LevraiBernardo
- Site Admin
- Posts: 110
- Contact:
Sure it will help !
Now you told it, it's so clear. Thank you. I'll try and I'll give you news.
Now you told it, it's so clear. Thank you. I'll try and I'll give you news.
Who is online
Users browsing this forum: No registered users and 94 guests
