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 8687087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:01:57+00:00 2026-06-12T23:01:57+00:00

When exactly is WM_PAINT called? Im trying to create a dialog based slot machine

  • 0

When exactly is WM_PAINT called? Im trying to create a dialog based slot machine application, but i’ve run into a couple of logical issues. My application will consist of:

  • “Spin” Button
  • Exit Button
  • Three BMP images to display the results of the spin(coin/heart/soldier)

How will i show the final result of the spin using the BMP images? Am i correct in using WM_PAINT to attempt to display the images, how will i refresh the screen each time the user presses the spin button to show the new images? I really appreciate the help!

  • 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-12T23:02:00+00:00Added an answer on June 12, 2026 at 11:02 pm

    Dialog boxes normally use DefDlgProc as the window procedure. You can’t handle WM_PAINT in your DialogProc (it isn’t a window procedure). You can use your own window procedure with a dialog but that’s probably more trouble than it’s worth.

    The simplest way to display a bitmap on a dialog is to use a static control with the SS_BITMAP style.

    You can change the displayed bitmap by sending the STM_SETIMAGE message to the static control. The control will take care of repainting itself with the new bitmap.

    This is OK if you just want to display the result of a spin, but won’t work very well if you want to animate the spinning of the reels. To handle this you could create your own static control (i.e. a window for each reel) that would display a portion of a reel bitmap.

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

Sidebar

Related Questions

Exactly as the subject, How to create oval button in WPF application?
More exactly, the web browser control. In a WM6 dialog based MFC project. This
I'm trying to create a user control that will provide a draggable splitter between
I have written a runtime-created dialog class that doesn't use any resource files based
im trying to insert a certain DMO into my DirectShow Graph. i've wrapped this
I'm trying to send a keystroke to another application. I can successfully find the
Exactly as the title says, why does Core Data create instances of NSManagedObject with
Exactly 50px, to be precise. I know it's in the code somewhere, but I
Exactly the same questions as Create an array with elements of different types ,
I have been trying to get my program to display different modeless dialog boxes

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.