Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8874101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:38:10+00:00 2026-06-14T18:38:10+00:00

I made this code for 3D Effect in a Game, this code help change

  • 0

I made this code for 3D Effect in a Game, this code help change Possition and Zoom In + Out the screen!

But if I run it on win 7 64 bits, when scroll the mouse wheel, both forward and backward, it Zoom In only but it works correctly when run on Windows 7 32 bits!

How can I fix it for any win?
Thanks for any help!!!!

LRESULT CALLBACK MouseProc(int code, WPARAM wParam, LPARAM lParam)

{

MOUSEHOOKSTRUCTEX* mhs = (MOUSEHOOKSTRUCTEX*)lParam;
HWND MuWnd = FindWindow(TEXT("MU"), NULL);

if(UseCamera)
{
    if(GetForegroundWindow() == MuWnd)
    {

        if(InitCamera)
        {

            Camera.ClipX  = *Camera_ClipX;
            Camera.ClipY  = *Camera_ClipY;
            Camera.GlClip = *Camera_GlClip;
            Camera.PosZ   = *Camera_PosZ;
            Camera.RotY   = *Camera_RotY;
            Camera.RotZ   = -45;
            Camera.Zoom   = *Camera_Zoom;
            InitCamera    = false;

        }

        else if(wParam == WM_MBUTTONDOWN)
        {
            MouseX = mhs->pt.x;
            MouseY = mhs->pt.y;
            MoveCamera = true;
        }

        else if(wParam == WM_MBUTTONUP)
        {
            MoveCamera = false;
        }

        else if(wParam == WM_MOUSEWHEEL)
        {
            int direction = mhs->mouseData;
            if(direction < 0)
            {
                if(*Camera_Zoom < 60)
                {
                    *Camera_Zoom += 2;
                }
                *Camera_ClipX  = 1190 + (abs(*Camera_PosZ - 150) * 3) + 4000;
                *Camera_ClipY  = 2400 + (abs(*Camera_PosZ - 150) * 3) + 4000;
                *Camera_GlClip = 2300 + (abs(*Camera_PosZ - 150) * 3) + 4000;
            }

            else if(direction > 0)
            {
                if(*Camera_Zoom > 12)
                {
                    *Camera_Zoom -= 2;
                }
                *Camera_ClipX  = 1190 + (abs(*Camera_PosZ - 150) * 3) + 4000;
                *Camera_ClipY  = 2400 + (abs(*Camera_PosZ - 150) * 3) + 4000;
                *Camera_GlClip = 2300 + (abs(*Camera_PosZ - 150) * 3) + 4000;
            }
        }

        else if(wParam == WM_MOUSEMOVE)
        {
            if(MoveCamera)
            {
                if(MouseX < mhs->pt.x)
                {
                    *Camera_RotZ += 8;
                    if (*Camera_RotZ > 315) *Camera_RotZ = -45;
                }

                else if(MouseX > mhs->pt.x)
                {
                    *Camera_RotZ -= 8;
                    if (*Camera_RotZ < -405) *Camera_RotZ = -45;
                }

                if(MouseY < mhs->pt.y)
                {
                    if(*Camera_RotY < -45)
                    {
                        *Camera_PosZ -= 44;
                        *Camera_RotY += (double)2.42;
                    }
                }

                else if(MouseY > mhs->pt.y)
                {
                    if(*Camera_RotY > -90)
                    {
                        *Camera_PosZ += 44;
                        *Camera_RotY -= (double)2.42;
                    }
                }

                MouseX = mhs->pt.x;
                MouseY = mhs->pt.y;

                *Camera_ClipX  = 1190 + (abs(*Camera_PosZ - 150) * 3) + 4000;
                *Camera_ClipY  = 2400 + (abs(*Camera_PosZ - 150) * 3) + 4000;
                *Camera_GlClip = 2300 + (abs(*Camera_PosZ - 150) * 3) + 4000;
            }
        }
    }
}
return CallNextHookEx(MouseHook, code, wParam, lParam);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T18:38:12+00:00Added an answer on June 14, 2026 at 6:38 pm

    Problem is solved with that fix:
    http://support.microsoft.com/kb/2752274/en-us

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am pretty new at C# and .NET, but I've made this code to
Ok. I've made this awe-crap-code Exporting table to XLS (but still no idea how
I have made this piece of code that makes a roll hover effect on
I am trying to replicate a screen made by designers through code but I
I have made this code: var foo=document.createElement(div); var childs=foo.getElementsByTagName(*); console.log(childs.length);//0 OK var a=document.createElement(a); foo.appendChild(a);
I have made this code to open a database(created in SQLite browser) stored in
How can I improve this code? What has made this long winded is the
I have a problem, and I made this test code to show you my
I've made this piece of code, it will re-size images on the fly, if
I have a line, which is a sprite made by using this code CGPoint

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.