OpenCV and video capturing Programming Software Development by bunkus …: Traceback (most recent call last): File "D:/Python26/Programme/WindowsAPI/capture_foreground1.py", line 66, in <module> [iplimage…, t] = capture_window(hwnd) File "D:/Python26/Programme/WindowsAPI/capture_foreground1.py", line 32, in capture_window saveBitMap.CreateCompatibleBitmap(mfcDC… Windows API Programming Programming Software Development by u8sand Hey guys, I've been programming in consoles/visual C++. But i've been wanting to learn WindowsAPI programming WITHOUT the stupid visual interface for a while now. Could someone provide me some pointers on a good place i can learn this? Right now I'm using [url]http://www.winprog.org/tutorial/start.html[/url] Re: Windows API Programming Programming Software Development by u8sand I know that, I always find that books are better... Anyone know a good book on WindowsAPI ? How to move bitmap with arrow keys Programming Software Development by random12810 … = L"App"; // Class name LPCTSTR WndName = L"WindowsAPI"; // Window title HWND hwnd; // Handle to our main window… Double Buffering vs assigning to Static Control Programming Software Development by random12810 … = L"App"; // Class name LPCTSTR WndName = L"WindowsAPI"; // Window title HWND hwnd; // Handle to our main window… Re: Visual C++ Programming Software Development by Dante Shamest … the arrow keys. [img]http://www.abdn.ac.uk/~u02cll2/windowsapi/movingball.jpg[/img] The program can be downloaded [url=http…://www.abdn.ac.uk/~u02cll2/windowsapi/MovingBall.exe]here[/url]. The source code can be viewed… in HTML format [url=http://www.abdn.ac.uk/~u02cll2/windowsapi/ball.cpp.htm]here[/url]. Re: Get the text with mouse hover Programming Web Development by MattEvans … to get the information that's in selection using the WindowsAPI - I would go with that angle of research personally… Re: Dragging program into the light Programming Software Development by Fbody Google "The Forger". That should get you to a WindowsAPI Tutorial. Just be ready to absorb a lot of information. Re: Remote Desktop Software using Java Programming Software Development by Sourav_1 Thanks man .Going through it .Will report in sometime And one more question . Can Close to Real time Standards with least delay (like teamviewer) can be acheivable through java/tcp or else i should shift my focus on windowsAPI or C# Re: OpenCV and video capturing Programming Software Development by bunkus I found a workaround. There are two modules existing which might help. These are called vnc2flv and pyvnc2swf which can be found here: You need to setup a VNC server running and these neat little python programs capture video input from your local desktop. No sound though. But can added with the vnc2flv to a flash movie file with flvaddmp3.py … Re: Windows API Programming Programming Software Development by Tom Gunn Tutorials only go so far. You need a [URL="http://www.amazon.com/Programming-Windows%C2%AE-Fifth-Microsoft/dp/157231995X"]good book[/URL] and a [URL="http://msdn.microsoft.com/en-us/library/default.aspx"]comprehensive reference[/URL]. Re: How to move bitmap with arrow keys Programming Software Development by tkud You did not post Icon.h and Menu.h.. Re: How to move bitmap with arrow keys Programming Software Development by random12810 These are my resources Re: How to move bitmap with arrow keys Programming Software Development by random12810 lines 143, 144 corresponds with line 185. If you wanted to you could delete lines 143, 144 and replace x any on line 185 with two numbers. Re: How to move bitmap with arrow keys Programming Software Development by strmstn I see you are drawing the bitmaps directly. Then you'll have to get the arrow keystrokes from the main window and then determine which bitmap is to be moved. Perhaps you could get mouse pointer coordinates at a WM_LBUTTONDOWN message and then decide which bitmap is to get attention. Re: How to move bitmap with arrow keys Programming Software Development by random12810 [QUOTE=strmstn;1170942]I see you are drawing the bitmaps directly. Then you'll have to get the arrow keystrokes from the main window and then determine which bitmap is to be moved. Perhaps you could get mouse pointer coordinates at a WM_LBUTTONDOWN message and then decide which bitmap is to get attention.[/QUOTE] Could you give an example. Isn'… Re: How to move bitmap with arrow keys Programming Software Development by random12810 Could I use a bool statment? Re: How to move bitmap with arrow keys Programming Software Development by strmstn [QUOTE=random12810;1171588]Could you give an example. Isn't WM_LBUTTONDOWN for mouse clicks?[/QUOTE] WM_LBUTTONDOWN is for mouse clicks, yes. But I saw you had two bitmaps so I thought you might want to decide which of them to move, otherwise handle WM_KEYDOWN. I'll write you a short example. Re: How to move bitmap with arrow keys Programming Software Development by strmstn Here you go. This is one way to go, it does not demonstrate how to select which bitmap to move but that wasn't the question either. Also, the bitmap will flicker. To prevent that you could either not paint the bitmaps directly but assign them to static controls or use double buffering. [CODE]#include <windows.h> struct { int x,… Re: How to move bitmap with arrow keys Programming Software Development by random12810 Thanks, It worked but does it matter if you don't load the bitmap as a resource. I didn't. I know how to select the one I want to move. All I need to do now is to stop it flickering. Which is better, assigning them to static controls or to use double buffering? Re: How to move bitmap with arrow keys Programming Software Development by random12810 Could you give me some help with double buffering. From what I've heard, that's the best solution to the problem. Re: How to move bitmap with arrow keys Programming Software Development by strmstn Double buffering is a bit tricky. Basically you create a second/third DC and do all your painting into that one and then BitBlt() everything into the main DC. Take a look at this page to see an example: [url]http://www.winprog.org/tutorial/animation.html[/url] Re: How to move bitmap with arrow keys Programming Software Development by strmstn A couple of things to consider are: If using InvalidateRect(), let the last parameter be FALSE, so that windows doesn't assume the window to be "dirty". When painting anywhere else than in WM_PAINT, use GetDC() and ReleaseDC() instead of BeginPaint() and EndPaint(). This way you can just do all the painting through a function and … Re: How to move bitmap with arrow keys Programming Software Development by random12810 What do I put in instead of prc->right? Re: How to move bitmap with arrow keys Programming Software Development by strmstn That's the width of the client area of the window. Get it like this: [CODE]RECT rcClient; GetClientRect(hwnd, &rcClient);[/CODE] Re: How to move bitmap with arrow keys Programming Software Development by random12810 This is the code I am trying to adapt: [CODE] bool LoadAndBlitBitmap(HDC hWinDC, LPCWSTR szFileName, int x, int y) { // Load the bitmap image file HBITMAP hBitmap; hBitmap = (HBITMAP)::LoadImage(NULL, szFileName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); // Verify that the image was loaded if (hBitmap == NULL) { ::MessageBox(NULL, __T("… Re: How to move bitmap with arrow keys Programming Software Development by strmstn It looks like it should work. How and where do you obtain hdc? Re: How to move bitmap with arrow keys Programming Software Development by random12810 Sorry, I didn't explain very well. This code works but it doesn't double buffer. I took out all of the code that should have made it double buffer as it didn't work. I need help making this code double buffer. Re: How to move bitmap with arrow keys Programming Software Development by strmstn That is correct, it does not double buffer. You need a third DC in which you do all the painting before you BitBlt() everything from that DC into the main DC. Re: How to move bitmap with arrow keys Programming Software Development by random12810 This is what I have done to the code: [CODE] bool LoadAndBlitBitmap(HDC hWinDC, LPCWSTR szFileName, int x, int y) { RECT rcClient; GetClientRect(hwnd, &rcClient); // Load the bitmap image file HBITMAP hBitmap; hBitmap = (HBITMAP)::LoadImage(NULL, szFileName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); // Verify that the image was loaded if …