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 04-29-2017, 10:55 AM   #1
Opcode 7
Human being with feelings
 
Join Date: Mar 2017
Posts: 79
Default Control that opens a Win32 Dialog Box

Hello! I was wondering if anyone has an example of a control that uses WDL to open a classical Win32 Dialog Box (the kind that need a resource definition, Modeless, or Modal, doesn't matter.)

I am trying to make all my Win32 Menu Items in the ASIO Application, be able to be opened through the VST version as well -- and an example of how to open a DialogBox using the WDL framework would be really helpful

Last edited by Opcode 7; 04-30-2017 at 08:18 AM.
Opcode 7 is offline   Reply With Quote
Old 04-29-2017, 07:01 PM   #2
michaelwayneharwood
Human being with feelings
 
Join Date: Mar 2017
Location: Littleton, CO USA
Posts: 22
Default

What kind of dialog box?
michaelwayneharwood is offline   Reply With Quote
Old 04-30-2017, 05:14 AM   #3
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 356
Default

You can access dialog boxes with the ShowMessageBox() function in IGraphics. Something like this:
Code:
int ret = pGraphics->ShowMessageBox("Are you sure you want to BLAH?", "BLAH ?", MB_OKCANCEL);
if (ret == 1) {
     Blah();
}
Three different types are built-in (OKCancel, YesNo, and YesNoCancel).
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 04-30-2017, 07:57 AM   #4
Opcode 7
Human being with feelings
 
Join Date: Mar 2017
Posts: 79
Default

Apologies for not being more clear in my original post, and thanks for the replies!

I mean a DialogBox. You know, the kind created with CreateWindowEx, or the DialogBoxA/W macro, and need a definition like :


Quote:
IDD_DIALOG_MAIN DIALOG DISCARDABLE 0, 0, GUI_WIDTH, GUI_HEIGHT
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX
CAPTION "Test Window"
MENU IDR_MENU1
FONT 8, "MS Sans Serif"
BEGIN
// EDITTEXT IDC_EDIT1,59,50,145,14,ES_AUTOHSCROLL
// LTEXT "Enter some text here:",IDC_STATIC,59,39,73,8
END

Basically, in the ASIO Application version of my plugin, there's a Win32 Menu Item called "Program Change", which opens the Program Change dialog via calling "DialogBox". I would like to be able to open that same DialogBox window from within a VST in a DAW.

Last edited by Opcode 7; 04-30-2017 at 08:15 AM.
Opcode 7 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 08:54 AM.


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