View Full Version : OpenApp project!

01-03-2003, 11:52 AM
This post probably doesnt belong here..
but here it is anyway. Ive jst setup my new
site - www.mindcage.4saken.co.uk (http://www.mindcage.4saken.co.uk) + im nearly
done with my first project -
a win32 OpenGL setup class...trouble is im
having trouble trapping Win32 system key strokes..which is big time annoying when the app is set to fullscreen...

anyone willing help please check out my project - its 100% Open Source + im sure it
will prove to be very useful many beginner/intermediate coders... http://www.opengl.org/discussion_boards/ubb/smile.gif

Thanks! http://www.opengl.org/discussion_boards/ubb/smile.gif

01-03-2003, 09:44 PM
Hey, there...i got it to work...well actually it was already working. Everytime you build the application OpenTest, you want to link the updated version of the library. Here is what i did to test to see if it worked:

1) under the WM_SYSKEYDOWN and the other few flags i put MessageBox(null,"hi","hi",MB_OK); right before the return 0UL. This is in the OpenApp.lib project. THen copy the compiled OpenApp.lib file from the debug folder and put it in the OpenTest folder.

2) In the OpenTest.cpp file at the VERY top of the file put the following line ... then compile and run it...when u hit f10 it should work. It did for me

#pragma comment (lib, "OpenApp")

Basically, i think you made a change and forgot to link the latest library. If you do it through the IDE you have to link the updated copy every time you compile it if you make changes. With the code above (the #pragma statement), that work is done for you. Let me know how it works out.

- Halcyon

01-04-2003, 04:06 AM
Thanks! http://www.opengl.org/discussion_boards/ubb/smile.gif

I have been linking to the current library
built - but it doesnt seem to trap the
alt-tab combo or the winkeys - these still
interrupt the app when in fullscreen mode..

- i will put the message box line in though.

Please, if you get a chance -try to trap the
events i talked about - then i can concentrate on adding features for the next public release http://www.opengl.org/discussion_boards/ubb/smile.gif

thanks again!

01-04-2003, 04:29 AM
+ you were right about it kinda working.
-it does prevent sys keys alt-f4 etc...

but i still need to figure out how to
trap alt-tab - allowing me write my own
control for this.

+I want to prevent the user from being able
to call up the start bar with the win keys...


Thanks again + please help

01-04-2003, 04:50 AM
On MSDN are two methods which should work :

01-04-2003, 05:17 AM
Cheers m8 - jst grabbed it + will test it
out asap.

- i will tell you how it goes http://www.opengl.org/discussion_boards/ubb/smile.gif

-> i will add your names to the credits
of OpenApp - should i just use your
alias's here? http://www.opengl.org/discussion_boards/ubb/smile.gif http://www.opengl.org/discussion_boards/ubb/smile.gif http://www.opengl.org/discussion_boards/ubb/smile.gif

[This message has been edited by Defoc8 (edited 01-04-2003).]

01-04-2003, 06:58 AM
This is supposed to allow you to prevent
task swapping...

UINT nPreviousState;

// Disables task switching
SystemParametersInfo (SPI_SETSCREENSAVERRUNNING, TRUE, &nPreviousState, 0);

// Enables task switching
SystemParametersInfo (SPI_SETSCREENSAVERRUNNING, FALSE, &nPreviousState, 0);

i added the var as a static of OpenApp and
called this functions within the window proc
to switch on/off task switching depending on whether or not the app is fullscreen or not.

I also removed the sys key untercepts..because i guessed these wouldnt be needed anymore...

http://www.opengl.org/discussion_boards/ubb/frown.gif sadly the it didnt disable alt-tab or prevent the user from invoking the task bar... so im back to square one http://www.opengl.org/discussion_boards/ubb/frown.gif http://www.opengl.org/discussion_boards/ubb/frown.gif

perhaps you could try it yourself..
-rebuild OpenApp.lib
+ rebuilt the Opentest project with the
the new build of the library...

..im having no luck with this http://www.opengl.org/discussion_boards/ubb/frown.gif

01-04-2003, 09:49 AM
hmmm...well ive done some digging +
- talked to a couple of other dev bods, and
it looks like im gonna have to create a hook
callback function + intercept the offending
messages before they reach the applications
message queue.. http://www.opengl.org/discussion_boards/ubb/frown.gif

This could be hard..never looked at this
before... :p

Anyway - thanks again http://www.opengl.org/discussion_boards/ubb/smile.gif

01-04-2003, 03:04 PM
first off id like to apologise..

Ive sussed it..in a roundabout way...
had a bit of a brain storm or perhaps it jst
started to function...

all i had to really do was look at the side
effect of pressing those keys...which was to
swap tasks - making the my app inactive...

So there you go..if the app becomes paused
and set to fullscreen..i can force it minmised + restore the screen res..fixing the problem - without doing anything dangerouse http://www.opengl.org/discussion_boards/ubb/smile.gif http://www.opengl.org/discussion_boards/ubb/smile.gif http://www.opengl.org/discussion_boards/ubb/smile.gif http://www.opengl.org/discussion_boards/ubb/smile.gif http://www.opengl.org/discussion_boards/ubb/smile.gif http://www.opengl.org/discussion_boards/ubb/smile.gif

01-04-2003, 03:08 PM
+ thanks for all your help guys http://www.opengl.org/discussion_boards/ubb/smile.gif))

- i will add the pragma line m8 http://www.opengl.org/discussion_boards/ubb/wink.gif

But unlike the download version - my build
settings point into the debug directory of
the OpenApp project...this means when i do
a full rebuild of OpenTest it automatically
uses the new library version http://www.opengl.org/discussion_boards/ubb/wink.gif