The Efficient Month Starts Now

Now Christmas is over and it is time to get seriously efficient. Right now I've got 30 days, seven chapters and three articles to write before I get back to writing in my spare time. Before my head falls of from all this writing (I have prepared 9 examples and written down all the notes for a chapter of multi-threading today) I just wanted to show a small update to my Acer fix software.

I found a gap in the calendar last week and added a small loop that looks for the window every five seconds. This means that it works regardless of the starting order of the applications. The new source looks like this.

#include <windows.h>

int APIENTRY WinMain(HINSTANCE hinst, HINSTANCE hinstPrev, LPSTR lpCmdLine, int nCmdShow)
HWND acerWin = NULL;

while( (acerWin=FindWindow( NULL, "ACER_GraviSense" )) == NULL )
Sleep( 5000 );

if( !acerWin )
return -1;

SetWindowLong( acerWin, GWL_EXSTYLE, GetWindowLong( acerWin, GWL_EXSTYLE ) | WS_EX_TOOLWINDOW );

return 0;
Using this you can alt-tab freely without having to run into an invisible window now and then. I wonder if it would be fun calling their help-desk and trying to give it to them as a contribution. :-)

Another note is that my employer, Bitsim, has announced Badger. This is a platform that I'm really looking forward to playing with. So if you're ever in need of an Arm system capable of hardware accelerated graphics you know where to look :-)


Post a Comment

<< Home