Author Message

<  beginners  ~  can OF do this stuff?

PostPosted: Sun Nov 15, 2009 8:55 pm
User avatarJoined: Tue Sep 23, 2008 6:20 pmPosts: 6Location: Long Island, NY/NYC
HeeeEEEeey,
I'm not sure if this qualifies as a beginner question, but I'm putting it here because it is more OF-related. I've been trying to figure out how to do some things with C++, but thought maybe OF would help. I know C++ syntax okay, but not too much about graphical or Windowing API's...this particular question is Windows related

I wondering if OF can do the following things:

*move icons on the screen
===================
ie enumerate the icons on the desktop, find a specific one that I am looking for like photoshop, or My Documents (Wind0ze) and then make it move from its location to follow the mouse pointer or something like that.
I know that this is possible with the Windows API with a bit of work. If this isn't in OF, are there any known issues to mixing Windows API code with the stuff in OF (other than not being cross platform), I'm asking because if I'm not making an application with a window idk what code inside OF's inner sanctum is creating the windows.

*create a "splash screen" type graphical overlay on "top" of the screen?
=================================================
Pretty self-explanatory. I know that everything is set up to render a single window or fullscreen app, but I figure this is possible with openGL. if not in OF how can I find more info about how to do it in openGL?

Sorry if I missed anything rudimentary, I looked at the docs a bit and did some searching here. Let me know if I need to give anymore specific info or am mixing up terms.
Thanks in advance!!!!1


Offline Profile
PostPosted: Sun Nov 15, 2009 11:21 pm
Site AdminJoined: Thu Mar 01, 2007 10:03 pmPosts: 916Location: Amsterdam
For the first question - this is not super OF specific - but yes you can mix windows API code with OF provided you included the headers needed. If the code requires windows libraries not used by OF then you would need to add them to your linker settings.

For the second question it would be as simple as loading an ofImage and drawing it at the width and height of the screen.

T



_________________
http://www.theowatson.com
Offline Profile
PostPosted: Mon Nov 16, 2009 3:36 pm
User avatarJoined: Tue Sep 23, 2008 6:20 pmPosts: 6Location: Long Island, NY/NYC
hey theo, maybe I misunderstood/asked the wrong way, trying to load the image on top of the screen (ie without a window) as in when code::blocks loads or photoshop or what have you. I can load an ofImage fine. Just wondering how I might load an image independent of a window.


Offline Profile
PostPosted: Tue Nov 17, 2009 11:31 am
User avatarJoined: Fri Jul 04, 2008 9:31 amPosts: 414Location: Vienna, Austria
you're talking about what's called a 'splash screen', i think. oF comes built with GLUT, and afaik GLUT doesn't allow this (although you could google 'glut splash screen' to find out).

alternatively you could plug in another window manager that allows you to do this.



_________________
damian stewart | skype: damiansnz | damian [at] frey [dot] co [dot] nz
frey | live art with machines | http://www.frey.co.nz
Offline Profile
PostPosted: Tue Nov 17, 2009 12:56 pm
Joined: Thu Aug 21, 2008 1:30 pmPosts: 26Location: Amsterdam, The Netherlands
on Windows I've used following code inside main.cpp to create a window without any chrome:

Code:
HWND m_hWnd = WindowFromDC(wglGetCurrentDC());
    LONG style = ::GetWindowLong(m_hWnd, GWL_STYLE);
    style &= ~WS_DLGFRAME;
    style &= ~WS_CAPTION;
    style &= ~WS_BORDER;
    style &= WS_POPUP;

    LONG exstyle = ::GetWindowLong(m_hWnd, GWL_EXSTYLE);
    exstyle &= ~WS_EX_DLGMODALFRAME;

    ::SetWindowLong(m_hWnd, GWL_STYLE, style);
    ::SetWindowLong(m_hWnd, GWL_EXSTYLE, exstyle);

    SetWindowPos(m_hWnd, HWND_TOPMOST, 0,0,0,0, SWP_NOSIZE|SWP_NOMOVE);



_________________
www.robotfunk.com
Offline Profile
PostPosted: Wed Dec 23, 2009 1:23 am
Joined: Wed Dec 23, 2009 1:22 amPosts: 1
is it possible to create dxf or obj outputs with oF? Or is there some other file format that allows one to export geometries to be used in CAD programs? Thanks for your help.


Offline Profile
PostPosted: Mon Feb 08, 2010 9:20 pm
Joined: Fri Jan 22, 2010 3:54 pmPosts: 12
Very good.
The solution of robotfunk is perfect!


Offline Profile
PostPosted: Mon Feb 08, 2010 11:21 pm
Joined: Sat Mar 29, 2008 1:05 pmPosts: 261Location: Lisbon, Portugal
@rns
i have made an STL exporter, not sure if it works with CAD or not. you can download it here ruicode.googlecode.com if it's useful.

cheers

rui



_________________
www.ruim.pt
Online Profile

Display posts from previous:  Sort by:

All times are UTC
Page 1 of 1
8 posts
Users browsing this forum: No registered users and 1 guest
Search for:
Post new topic  Reply to topic
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
cron