Thread: My Win32 Program isn't working?

  1. #1
    Registered User
    Join Date
    Nov 2002

    My Win32 Program isn't working?

    My source code seems right. I don't know what the problem is. Nothing would appear.

  2. #2
    Registered User
    Join Date
    Apr 2002
    Okay, I fixed it. Take out our BeginPaint and EndPaint from your RenderScene function. Move those functions to WM_PAINT message. All you need to do in that message is beginpaint and then immediately endpaint. It's important so do it. Then your RenderScene should look like this:

    VOID RenderScenery( )
     DisplayBitmap(GetDC(WIN_HANDLE), bRect, 0, 0, 50, 50);
    Good luck.
    "...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers

  3. #3
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Waterloo, Texas
    You should call ReleaseDC before you return from the function.
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
        return std::pow
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 10
    Last Post: 09-07-2008, 11:38 PM
  2. Console program to Win32
    By Ducky in forum Windows Programming
    Replies: 3
    Last Post: 02-25-2008, 12:46 PM
  3. Program not working
    By jat421 in forum C Programming
    Replies: 6
    Last Post: 03-20-2005, 08:28 PM
  4. Program was working good until.....
    By cazil in forum C++ Programming
    Replies: 1
    Last Post: 02-12-2002, 10:53 PM
  5. Program logic not working..
    By ronkane in forum C++ Programming
    Replies: 2
    Last Post: 01-22-2002, 08:31 PM