Click here to Skip to main content
15,881,789 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
OK, this is off the beaten path.

I have a COM Dll control surface plugin that plugs into a 3rd Party Digital Audio Workstation.
I need to read the strip number from the VST plugin's title bar's string as they are single clicked. There is no calls available to the control surface plugin to read this data otherwise.

I should say that if the VST plugin is single clicked, then it's GUI by default is not launched.

So what I did was force a GUI launch of the VST plugin upon single click, hook the non client window creation to try and grab the title bar string then hide the window in hopes the user would never see it's GUI as expected.

The VST's are apparently pre-activated as I don't see WM_NCACTIVATE sent to my hook.
I do see the WM_NCPAINT that follows and at that time the string is filed in like I want so I grab the text and send a SetWindowPos() with HIDE_WINDOW set which makes the VST GUI disappear and we never see it YAY!

Except: A GUI blue frame is visible for a very brief moment causing me angst.

Below is the SPY++ parade that happens when a VST plugin is single clicked.

Do you think suppressing the blue frame is also possible?

P.S. NC_ACTIVE IS sent to my hook upon manual close of the VST GUI but no (apparently) upon it's creation.

Thanks.

:Ron


<00001> 000E04F6 S WM_NCACTIVATE fActive:True
<00002> 000E04F6 R WM_NCACTIVATE
<00003> 000E04F6 S WM_NCACTIVATE fActive:False
<00004> 000E04F6 R WM_NCACTIVATE fDeactivateOK:True
<00005> 000E04F6 S WM_NCACTIVATE fActive:False
<00006> 000E04F6 R WM_NCACTIVATE fDeactivateOK:True
<00007> 000E04F6 S WM_NCACTIVATE fActive:False
<00008> 000E04F6 R WM_NCACTIVATE fDeactivateOK:True
<00009> 000E04F6 S WM_NCACTIVATE fActive:False
<00010> 000E04F6 R WM_NCACTIVATE fDeactivateOK:True
<00011> 000E04F6 S WM_NCPAINT hrgn:01042269
<00012> 000E04F6 R WM_NCPAINT
<00013> 000E04F6 S WM_NCACTIVATE fActive:True
<00014> 000E04F6 R WM_NCACTIVATE
<00015> 000E04F6 S WM_NCPAINT hrgn:F4041664
<00016> 000E04F6 R WM_NCPAINT
<00017> 000E04F6 S WM_NCACTIVATE fActive:True
<00018> 000E04F6 R WM_NCACTIVATE
<00019> 000E04F6 S WM_NCACTIVATE fActive:False
<00020> 000E04F6 R WM_NCACTIVATE fDeactivateOK:True
<00021> 000E04F6 S WM_NCACTIVATE fActive:False
<00022> 000E04F6 R WM_NCACTIVATE fDeactivateOK:True
<00023> 000E04F6 S WM_NCACTIVATE fActive:False
<00024> 000E04F6 R WM_NCACTIVATE fDeactivateOK:True
<00025> 000E04F6 S WM_NCPAINT hrgn:DA040B9E
<00026> 000E04F6 R WM_NCPAINT
<00027> 000E04F6 S WM_NCHITTEST xPos:680 yPos:407
<00028> 000E04F6 R WM_NCHITTEST nHittest:HTLEFT
<00029> 000E04F6 P WM_NCMOUSEMOVE nHittest:HTLEFT xPos:680 yPos:407
<00030> 000E04F6 P WM_NCMOUSELEAVE
<00031> 000E04F6 S WM_NCHITTEST xPos:680 yPos:239
<00032> 000E04F6 R WM_NCHITTEST nHittest:HTLEFT
<00033> 000E04F6 P WM_NCMOUSEMOVE nHittest:HTLEFT xPos:680 yPos:239
<00034> 000E04F6 P WM_NCMOUSELEAVE
<00035> 000E04F6 S WM_NCPAINT hrgn:00000001
<00036> 000E04F6 R WM_NCPAINT
<00037> 000E04F6 S WM_NCACTIVATE fActive:True
<00038> 000E04F6 R WM_NCACTIVATE
<00039> 000E04F6 S WM_NCACTIVATE fActive:False
<00040> 000E04F6 R WM_NCACTIVATE fDeactivateOK:True
<00041> 000E04F6 S WM_NCACTIVATE fActive:False
<00042> 000E04F6 R WM_NCACTIVATE fDeactivateOK:True
<00043> 000E04F6 S WM_NCACTIVATE fActive:False
<00044> 000E04F6 R WM_NCACTIVATE fDeactivateOK:True
<00045> 000E04F6 S WM_NCACTIVATE fActive:False
<00046> 000E04F6 R WM_NCACTIVATE fDeactivateOK:True
<00047> 000E04F6 S WM_NCPAINT hrgn:01042276
<00048> 000E04F6 R WM_NCPAINT
<00049> 000E04F6 S WM_NCACTIVATE fActive:True
<00050> 000E04F6 R WM_NCACTIVATE
<00051> 000E04F6 S WM_NCACTIVATE fActive:True
<00052> 000E04F6 R WM_NCACTIVATE
<00053> 000E04F6 S WM_NCACTIVATE fActive:False
<00054> 000E04F6 R WM_NCACTIVATE fDeactivateOK:True
<00055> 000E04F6 S WM_NCACTIVATE fActive:False
<00056> 000E04F6 R WM_NCACTIVATE fDeactivateOK:True
<00057> 000E04F6 S WM_NCACTIVATE fActive:False
<00058> 000E04F6 R WM_NCACTIVATE fDeactivateOK:True
Posted

1 solution

I'm not sure what "force a GUI launch of the VST plugin upon single click" means and I know nothing of VST so just throwing this out there.

1. intercept the WM_CREATE of the overlapping window that includes the "blue frame". Don't know if that is possible. Is the plugin active before any GUI? The interaction between your plugin and the containing window isn't clear to me.

2. Hook the CreateWindow / CreateWindowEx and SetWindowText APIs for your running application. Examine the window class name to determine which window hanlde is the one that interests you. No doubt you've seen articles covering this on CP.

3. similar hook to capture the WM_NOTIFY / NM_CLICK

These are all sledgehammer techniques but it seems the plugin API has you stymied.
 
Share this answer
 
Comments
Ron Anders 23-Jul-14 18:52pm    
Thanks I'll give that a go tonight.
Ron Anders 26-Jul-14 23:05pm    
Well thankfully I did not have to resort to API hooking but it did cause study in this area so I will accept your solution. Thank you. I hooked both CBT and WM hooks and between the two am able to hide the window just before it is created and after the window title is set. All with no evidence that any of this happened.

Onward and Upward!

Thank you again!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900