can OF do this stuff?

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

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.


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.

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.

on Windows I’ve used following code inside main.cpp to create a window without any chrome:

 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);  

1 Like

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.

Very good.
The solution of robotfunk is perfect!

i have made an STL exporter, not sure if it works with CAD or not. you can download it here if it’s useful.



cheers robotfunk!
works fine, a beautiful nobrainer