Skip to main content
change style and position
Source Link

[ This app is now on github !! ]

[ This app is now on github !! ]

Tweeted twitter.com/StackCodeReview/status/698093164540862465
Well most people don't have two LCtrl keys on their keyboard, @Jamal :-)
Source Link

If in emergency, by pressing the both LCtrl+RCtrl keys together, you can to kill all captured windows (whether currently visible or hidden) and followed by this program killing itself. To kill the windows, I send them WM_QUIT and WM_CLOSE both, and hope they will respond and terminate. As of now, this method is working fine. But please suggest a more robust way of killing those.

If in emergency, by pressing the both LCtrl keys together, you can to kill all captured windows (whether currently visible or hidden) and followed by this program killing itself. To kill the windows, I send them WM_QUIT and WM_CLOSE both, and hope they will respond and terminate. As of now, this method is working fine. But please suggest a more robust way of killing those.

If in emergency, by pressing LCtrl+RCtrl keys together, you can to kill all captured windows (whether currently visible or hidden) and followed by this program killing itself. To kill the windows, I send them WM_QUIT and WM_CLOSE both, and hope they will respond and terminate. As of now, this method is working fine. But please suggest a more robust way of killing those.

added 24 characters in body
Source Link
Jamal
  • 35.3k
  • 13
  • 134
  • 239

This is my first post. I think I'm an Intermediate.

Its structure is like a Stack. You activate a window, and then press LCtrl+F7. The window will be captured and pushed into the stack. I call these the Slots. There are 10 empty Slots in the beginning. Slots are numbered from 0 to 9. So every captured window goes into the next available Slot. When captured, the Slot Number is briefly flashed on the window. Popping from the stack is currently not allowed. However, clearing the whole stack is possible. Just press LCtrl+F8 to clear the stack, and start over again.

To flash the Slot NumberIts structure is like a stack. You activate a window, I used GDIand then press (not GDI+)LCtrl+F7. PaintingThe window will be captured and pushed into the digit is easy, Erasing is impossible !!! I did whatstack. I could docall these the slots. There are 10 empty slots in the beginning. Slots are numbered from 0 to make9. So every captured window goes into the next available slot. When captured, the slot number is briefly flashed on the window repaint itself and hence erase. Popping from the digitstack is currently not allowed. I hope itHowever, clearing the whole stack is okay-ishpossible. Just press LCtrl+F8 to clear the stack, and start over again.

To interact withflash the programslot number, I used GDI (not GDI+). Painting the Left Ctrl button must be presseddigit is easy, but erasing is impossible. Then there are variety of controls I did what I could do to manipulatemake the windowswindow repaint itself and hence erase the digit. I hope it is okay-ish.

To interact with the program, the LCtrl button must be pressed. Then there are variety of controls to manipulate the windows. They can be toggled between hidden/shown individually by pressing LCtrl+NLCtrl+N, where NN is the Slot Numberslot number the window was captured into and was flashed briefly on the screen. NN must be pressed from Numeric Padthe numeric pad.

By pressing LCtrl+LWinLCtrl+LWin, all the visible captured windows can be toggled to hidden simultaneously. This is referred to as "Special Hide" in the source code. It is special because when LCtrl+LWinLCtrl+LWin is pressed again, it toggles the windows back to visible, but only specifically the ones which were hidden with "Special Hide". This is referred to as, appropriately enough, "Special Show" in the source code.

If in emergency, by pressing the both CtrlLCtrl keys together, you can to kill all captured windows (whether currently visible or hidden) and followed by this program killing itself. To kill the windows, I send them WM_QUIT and WM_CLOSE both, and hope they will respond and terminate. As of now, this method is working fine. But please someone suggest me a more robust way to killof killing those.

The input loop is a little confusing. I didn't use much message based processing. Instead I used GetAsyncKeyState() and then added some loop trickery to eliminate input bounces. The loop checks if a certain key combination is pressed every 0.1 seconds. If so, then appropriate action is performed. Some flags are used to eliminate things like bounces, distinct double input, etc. ItsIt's messy, but works. I hope you will figure it out.

  And I didn't know about source control back then.

So, here is the code (insteadInstead of wordwrappingword-wrapping, better copy paste/paste it into some editor and view in widescreen):

This is my first post. I think I'm an Intermediate.

Its structure is like a Stack. You activate a window, and then press LCtrl+F7. The window will be captured and pushed into the stack. I call these the Slots. There are 10 empty Slots in the beginning. Slots are numbered from 0 to 9. So every captured window goes into the next available Slot. When captured, the Slot Number is briefly flashed on the window. Popping from the stack is currently not allowed. However, clearing the whole stack is possible. Just press LCtrl+F8 to clear the stack, and start over again.

To flash the Slot Number, I used GDI (not GDI+). Painting the digit is easy, Erasing is impossible !!! I did what I could do to make the window repaint itself and hence erase the digit. I hope it is okay-ish.

To interact with the program, the Left Ctrl button must be pressed. Then there are variety of controls to manipulate the windows.

They can be toggled between hidden/shown individually by pressing LCtrl+N, where N is the Slot Number the window was captured into and was flashed briefly on the screen. N must be pressed from Numeric Pad.

By pressing LCtrl+LWin, all the visible captured windows can be toggled to hidden simultaneously. This is referred to as "Special Hide" in the source code. It is special because when LCtrl+LWin is pressed again, it toggles the windows back to visible, but only specifically the ones which were hidden with "Special Hide". This is referred to as, appropriately enough, "Special Show" in the source code.

If in emergency, by pressing the both Ctrl keys together, you can to kill all captured windows (whether currently visible or hidden) and followed by this program killing itself. To kill the windows, I send them WM_QUIT and WM_CLOSE both, and hope they will respond and terminate. As of now, this method is working fine. But please someone suggest me a more robust way to kill those.

The input loop is a little confusing. I didn't use much message based processing. Instead I used GetAsyncKeyState() and then added some loop trickery to eliminate input bounces. The loop checks if certain key combination is pressed every 0.1 seconds. If so, then appropriate action is performed. Some flags are used to eliminate things like bounces, distinct double input, etc. Its messy, but works. I hope you will figure it out.

  And I didn't know about source control back then.

So, here is the code (instead of wordwrapping, better copy paste it into some editor and view in widescreen):

Its structure is like a stack. You activate a window, and then press LCtrl+F7. The window will be captured and pushed into the stack. I call these the slots. There are 10 empty slots in the beginning. Slots are numbered from 0 to 9. So every captured window goes into the next available slot. When captured, the slot number is briefly flashed on the window. Popping from the stack is currently not allowed. However, clearing the whole stack is possible. Just press LCtrl+F8 to clear the stack, and start over again.

To flash the slot number, I used GDI (not GDI+). Painting the digit is easy, but erasing is impossible. I did what I could do to make the window repaint itself and hence erase the digit. I hope it is okay-ish.

To interact with the program, the LCtrl button must be pressed. Then there are variety of controls to manipulate the windows. They can be toggled between hidden/shown individually by pressing LCtrl+N, where N is the slot number the window was captured into and was flashed briefly on the screen. N must be pressed from the numeric pad.

By pressing LCtrl+LWin, all the visible captured windows can be toggled to hidden simultaneously. This is referred to as "Special Hide" in the source code. It is special because when LCtrl+LWin is pressed again, it toggles the windows back to visible, but only specifically the ones which were hidden with "Special Hide". This is referred to as, appropriately enough, "Special Show" in the source code.

If in emergency, by pressing the both LCtrl keys together, you can to kill all captured windows (whether currently visible or hidden) and followed by this program killing itself. To kill the windows, I send them WM_QUIT and WM_CLOSE both, and hope they will respond and terminate. As of now, this method is working fine. But please suggest a more robust way of killing those.

The input loop is a little confusing. I didn't use much message based processing. Instead I used GetAsyncKeyState() and then added some loop trickery to eliminate input bounces. The loop checks if a certain key combination is pressed every 0.1 seconds. If so, then appropriate action is performed. Some flags are used to eliminate things like bounces, distinct double input, etc. It's messy, but works. And I didn't know about source control back then.

Instead of word-wrapping, copy/paste it into some editor and view in widescreen:

Source Link
Loading