OpenApp project!

This post probably doesnt belong here…
but here it is anyway. Ive jst setup my new
site - + 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…


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


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

thanks again!

  • 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

On MSDN are two methods which should work :;en-us;q226359

Cheers m8 - jst grabbed it + will test it
out asap.

  • i will tell you how it goes

-> i will add your names to the credits
of OpenApp - should i just use your
alias’s here?

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

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…

sadly the it didnt disable alt-tab or prevent the user from invoking the task bar… so im back to square one

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

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…

This could be hard…never looked at this
before… :stuck_out_tongue:

Anyway - thanks again

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

  • thanks for all your help guys ))
  • i will add the pragma line m8

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