My Win32 Program isn't working?

This is a discussion on My Win32 Program isn't working? within the Windows Programming forums, part of the Platform Specific Boards category; My source code seems right. I don't know what the problem is. Nothing would appear....

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    18

    My Win32 Program isn't working?

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

  2. #2
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    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:

    Code:
    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
    Location
    Waterloo, Texas
    Posts
    5,662
    You should call ReleaseDC before you return from the function.



    ITSA
    Socket Library!

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, 11:46 AM
  3. Program not working
    By jat421 in forum C Programming
    Replies: 6
    Last Post: 03-20-2005, 07:28 PM
  4. Program was working good until.....
    By cazil in forum C++ Programming
    Replies: 1
    Last Post: 02-12-2002, 09:53 PM
  5. Program logic not working..
    By ronkane in forum C++ Programming
    Replies: 2
    Last Post: 01-22-2002, 07:31 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21