Transparent OF window losing transparency with setParent

Hi,

I’m working on a transparent OF window in win10. I’m drawing a PNG image in it and all works great until I try to change the parent of the OF window with setParent.

The transparency is lost and the background turns black, I do still see the png, but the background transparency is lost.

I’ve looked into SetLayeredWindowAttributes and the likes, but that’s a little bit over the top for me, so any guidance is really appreciated.

R

i have this quest

Hi, I found that function on https://github.com/sangww/eyecan/blob/master/src/theApp.cpp#L53

But I have a problem: the window is not set on the left-top corner when I set “SetWindowPos(m_hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE)”

I solved my problem:

ofSetupOpenGL(100, 100, OF_WINDOW);
....
SetWindowPos(m_hWnd, HWND_TOPMOST, 0, 0, 1090, 100, SWP_NOSIZE);
//SWP_NOSIZE: No change window size
ofRunApp(new ofApp());