Control the Start-/ Stop Capture Button by plugin

A place for developers to exchange information about extending OmniPeek, and ask technical questions about plugins on MyPeek, scripting, and programming.
Posts: 7
Joined: Thu Sep 02, 2010 8:28 am

Control the Start-/ Stop Capture Button by plugin

Postby krumpc » Thu Sep 02, 2010 8:37 am

Hi all,

I'm developing a little plugin, which analysis frames in the background, and waits for a trigger. When a trigger bangs, the plugin starts capturing frames for a defined time and should stop the record after this.

Is it anywise possible, to control the start/stop capture button in OmniPeek by the plugin?? I want to send e.g. a message from my plugin to OmniPeek, and then the button should be clicked / activated / deactivated automatically.

Any ideas??

Best Regards

Posts: 78
Joined: Thu May 22, 2008 9:36 am

RE: Control the Start-/ Stop Capture Button by plugin

Postby Spacepacket » Thu Sep 23, 2010 9:08 am

Hi Chris,

Yes, you can start and stop captures by pro grammatically pushing the start/stop capture button. Here is some code:

CWnd* pParent = m_Tab.GetParent();
pParent = pParent->GetParent();
pParent = pParent->GetParent();
pParent->PostMessage( WM_COMMAND, 32785 );

This code assumes you have created a tab. If you do not have a tab, the capture window handle is passed as a param to the OnCreateContext() method in the PluginCreateContextParam structure:

PluginCreateContextParam* ioParams )
m_hCaptureWindow = (HWND) ioParams->fContextData;

Return to “Developers”

Who is online

Users browsing this forum: No registered users and 1 guest