|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
DriverHeaven Newbie
Join Date: Jan 2006
Location: /germany/bremen/home
Posts: 19
Rep Power: 0 ![]() |
How to set up a frame to draw in for kx plugin
Hey guys, im planning to do some plugin stuff myself, and after spending hours to get the "sample" working, i now need something in the settings window of my plugin where i can draw several objects to (a graph in this case).
How do i do that? Info: im using the samle project files and everything, because i wouldnt get a self created working
__________________
"Hail to thy McDonald's that shalt be (Burger) King instead" |
|
|
|
|
|
#2 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61 ![]() ![]() ![]() ![]() ![]() ![]() |
Are you talking about some static picture, or, are you talking about drawing the graph yourself, from within the C++ code, and if so, do you know how to do that?
|
|
|
|
|
|
|
|
DriverHeaven Newbie
Join Date: Jan 2006
Location: /germany/bremen/home
Posts: 19
Rep Power: 0 ![]() |
if i would know how to do it i wouldnt ask
![]() its about drawing the stuff from C++, the problem is just how to get that frame where i can draw to
__________________
"Hail to thy McDonald's that shalt be (Burger) King instead" |
|
|
|
|
|
#4 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61 ![]() ![]() ![]() ![]() ![]() ![]() |
The reason I ask, is because you can draw on anything in C++.
You can start with a CWnd object , or you could use another object (i.e. CStatic, CButton), and draw on that. It is more of a generic programming question then anything kX related. It is a fairly complicated subject, so I would suggest searching the web for some tutorials on Windows programming with C++, related to drawing in a window (using the Windows API, or MFC). Additionally, you may want to look up information on subclassing controls, and creating custom controls. Last edited by Russ; Apr 14, 2006 at 12:31 AM. |
|
|
|
|
|
|
|
DriverHeaven Newbie
Join Date: Jan 2006
Location: /germany/bremen/home
Posts: 19
Rep Power: 0 ![]() |
thats the point, how far are those areas integrated into kx, or are there no predefined area functions? such as maybe mysurface = kx_createsurface(x1, y1, x2, x2); or anything?
__________________
"Hail to thy McDonald's that shalt be (Burger) King instead" |
|
|
|
|
|
#6 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61 ![]() ![]() ![]() ![]() ![]() ![]() |
KX objects are just windows.
When you create the plugin window, you specify its size. If you create another object to draw on, when you create it, you specify it's size and location, within it's parent window. Each window has it's own DC (Device Context) for drawing, with it's own properties (size, etc) that defines your drawing surface. You specify the drawing coordinates yourself, within that DC (the drawing functions take coordinates as the arguments). These coordinates may be relative to the screen size, the client area, the parent window, the DC, etc, depending on what you need to do. Again, it gets fairly complicated, and all this would be better explained in a tutorial. It is the same in kX as it would be for anything else. Last edited by Russ; Apr 14, 2006 at 01:12 AM. Reason: typo |
|
|
|
|
|
#7 |
|
DriverHeaven Junior Member
Join Date: Mar 2006
Location: Notts, UK
Posts: 68
Rep Power: 0 ![]() |
My I suggest you look at the Dynamics Processor?
That contains a graph of sorts. I managed to muddle my way through allsorts by just reverse engineering the examples. BR JN
__________________
AMD 64 skt 939 4000+, 2G DDR, XFX6800GT, 80G + 200G, Audigy2 Value, IKEA room |
|
|
|
|
|
|
|
DriverHeaven Newbie
Join Date: Jan 2006
Location: /germany/bremen/home
Posts: 19
Rep Power: 0 ![]() |
Dammit! The new Dynamics Processor (never had a look at it before) seems to be exactly what i planned
![]() Well ok, not really, im planning to do the curve (graph in the middle) with newton's interpolation (dunno coorect name ) providing much more flexibility and saving ressources of the kx chip (the interface calculates a polynom, and just the coefficients are then passed to the chip, making the whole calculation about 10 macs or so ![]() ATM im working with a customized "osciloscope" from the fx pack, just c'n'p into my project and removing the bits i don't need... it semms to work... hardly
__________________
"Hail to thy McDonald's that shalt be (Burger) King instead" |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|