Adding custom graphic objects to dialogs

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Adding custom graphic objects to dialogs

    Hello,

    I have a dialog created with GUI_CreateDialogBox(), I want to add my custom graphic objects - bmp images, digital clocks to this windows. I've added a custom handler for dialog callback (on receiving WM_PAINT message). But how to invalidate window? I've created a timer for this goal, set it to 1 second (1 second is okay for me) and set window be invalidated by timer's event (WM_TIMER message). Is it a good choice?

    Best regards
    Anton
  • Hello Anton,

    In order to show a clock a timer sounds like a good choice. I recommend invalidating just the rectangle which the clock is placed on. If the complete dialog is invalidated all objects in the dialog are redrawn what may be time consuming.

    Best regards,
    Adrian