Jump to content
  • Advertisement

Spyro-

Member
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

122 Neutral

About Spyro-

  • Rank
    Newbie
  1. Looking at the code of the blit routines, I have seen that the image is drawn pixel by pixel, is there any way to make something like a color-key with this technique to create the transparent effect? I have read that is possible to do it using a back-buffer and SetColorKey() on the surface before calling BltFast(), but the library doesn't use that technique to draw the image.
  2. Hi. I'm using the DirectDraw Overlay Library, which works very well. Now I would like to make some parts of the overlay surface transparent, it is possible to do this with DirectDraw? [Edited by - Spyro- on August 23, 2008 7:26:55 PM]
  3. Spyro-

    Mouse Wheel Hook

    Thx. :-) Fixed code: #define _WIN32_WINDOWS 0x501 #define _WIN32_WINNT 0x0501 #include <windows.h> #include <stdio.h> // HHOOK g_hMouseHook; // LRESULT CALLBACK LowLevelMouseProc(int nCode, WPARAM wParam, LPARAM lParam) { if (nCode >= 0) { PMSLLHOOKSTRUCT pmll = (PMSLLHOOKSTRUCT) lParam; if (wParam == WM_MOUSEWHEEL) { int zDelta = (short) HIWORD(pmll->mouseData); (zDelta > 0) ? printf("Wheel Up\n") : printf("Wheel Down\n"); } } return CallNextHookEx(g_hMouseHook, nCode, wParam, lParam); } // int main() { MSG msg; g_hMouseHook = SetWindowsHookEx(WH_MOUSE_LL, LowLevelMouseProc, GetModuleHandle(NULL), 0); if (!g_hMouseHook) { printf("Error: %d\n", GetLastError()); } while(GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } UnhookWindowsHookEx(g_hMouseHook); return (int) msg.wParam; }
  4. Hi. I'm doing a hook to detect mouse wheel movements: #define _WIN32_WINDOWS 0x501 #define _WIN32_WINNT 0x0501 #include <windows.h> #include <stdio.h> // HHOOK g_hMouseHook; // LRESULT CALLBACK LowLevelMouseProc(int nCode, WPARAM wParam, LPARAM lParam) { if (nCode >= 0) { if (wParam == WM_MOUSEWHEEL) { int zDelta = (short) HIWORD(wParam); printf("Wheel: %i\n", zDelta); } } return CallNextHookEx(g_hMouseHook, nCode, wParam, lParam); } // int main() { MSG msg; g_hMouseHook = SetWindowsHookEx(WH_MOUSE_LL, LowLevelMouseProc, GetModuleHandle(NULL), 0); if (!g_hMouseHook) { printf("Error: %d\n", GetLastError()); } while(GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } UnhookWindowsHookEx(g_hMouseHook); return (int) msg.wParam; } This code detects well when the mouse wheel is moving, but the problem is that I can't detect the direction of the movement because zDelta is always zero. Any ideas?
  5. Hi. I want to use a technique that I have seen in programs like Xfire or Steam, something like this: example #1, example #2, example #3. As you can see in the screenshot, the program draws things in the screen at the same time that the game is running (the chat window is from X-Fire, not from the game). I have been Googling a long time but I don't find any documentation about how to do this. I want to do this in a game made using OpenGL (Quake III Arena), OS: Windows. Any ideas? Thanks. [Edited by - Spyro- on July 29, 2008 6:07:11 AM]
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!