Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - kneksacke

Pages: [1]
1
Window / Ignore mouse input
« on: April 23, 2017, 03:50:10 pm »
I have a window in sfml its transparent. i want to be able to click behind it (its topmost window)
is it possible to do this? i don't mind using windows.h its just a personal program.

i want to make a screen overlay for my self.


Code i use for transparent window
   
SetWindowLong(window.getSystemHandle(), GWL_STYLE, WS_POPUP | WS_VISIBLE);
DwmExtendFrameIntoClientArea(window.getSystemHandle(), &margins);

2
System / Embedded image using resource
« on: February 28, 2017, 05:20:44 pm »
My last question was on how to remove the DLLs and i could just static link them or whatever its called,
it was really simple... but now i want my game textures to be stored inside the executable too
i was thinking that this would be easy. so i looked it up and you need to use resource files for that.
i tried doing it but failed a lot.

i don't now how to load in the resource. can someone program a function like

sf::texture = loadResource("MyResource");

or give me a tutorial.


this is my current code
        HRSRC resBlock = FindResource(NULL, "IDB_BITMAP1", RT_BITMAP);
                HGLOBAL myGlobal = LoadResource(NULL, resBlock);
                LPVOID firstByte = LockResource(myGlobal);
                DWORD resSize = SizeofResource(NULL, resBlock);
                sf::Image loadImg;
                sf::Sprite tmpSpr;
                sf::Texture text;
                loadImg.loadFromMemory(firstByte, resSize);
                text.loadFromImage(loadImg);


it does not work. at all.
oh and i copied it from someone else. (another post)


NOTE:
i'm using visual studio 2015
my English is horrible i know.
my last post was a bit unclear i hope this one is better.




3
System / SFML With no DLLS?
« on: February 21, 2017, 07:34:05 pm »
When i make a small program and i want to send it to a friend or upload it i must include all the DLLs in a rar file. i just want a nice and simple .EXE file with no DLLs. (Well at least not send them)
i made a few games with Game maker studio and with that program you can
export just a single EXE file, really handy.
how do they do it?
they even pack the Textures inside the EXE.

what if someone just wants the game on their desktop. they would have to create a shortcut or put all the DLLs on their desktop. not really user friendly.

Pages: [1]