[PD] window handle in pd external?

Bert Schiettecatte bschiett at stanford.edu
Tue Apr 30 12:57:58 CEST 2002


thanks for the hint. I'll use GetForegroundWindow() and hope it works.
I get a nasty error now when compiling my external in visual studio .net:

c:\Documents and Settings\bschiett\My Documents\Visual Studio
Projects\dinput\dinput.c(64): error C2039: 'CreateDevice' : is not a member
of 'IDirectInput8A'

I've included <dinput.h> ... I don't understand what could be wrong with my
code. the external struct looks like this

typedef struct _dinput {
  t_object  x_obj;

	t_int m_devid;	// device number (index in list of available devices)
	t_int m_nrdevs; // number of devices available
	t_int m_currdev; // device counter for enumeration

	t_int m_nrbuttons; // nr of buttons found on device (check through caps)
	t_int* m_buttons; // array of button numbers passed to object
	t_int* m_newstate; // state for buttons

	t_outlet* m_outlets; // outlets for object

	t_float m_value; // just for holding temp list values

	LPDIRECTINPUT8 m_di;	// directinput interface
	LPDIRECTINPUTDEVICE8 m_dev; // device this object gives access to

} t_dinput;



-----Original Message-----
From: mark [mailto:mark at junklight.com]
Sent: dinsdag 30 april 2002 12:22
To: Bert Schiettecatte; pd-list at iem.kug.ac.at
Subject: RE: [PD] window handle in pd external?

I do somthing like this in the Vst~ plugin - either download
the source code (http://www.junklight.com/pd) or I'll send
an email tomorrow when I get back to work and have a look



-----Original Message-----
From: Bert Schiettecatte [mailto:bschiett at stanford.edu]
Sent: 30 April 2002 01:59
To: pd-list at iem.kug.ac.at
Subject: [PD] window handle in pd external?


I'm writing a directinput external for PD (does this already exist???), and
I need
to pass one of the api functions a handle to the window that owns the input
I'm creating... what window handle should I pass and how do I get that
previously, my code was running in an mfc dialog box as a stand-alone
and I could just do GetSafeHWnd() to get the dialog's handle. What should I
do now?



More information about the Pd-list mailing list