News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Definition of Controls

Started by Don57, June 09, 2008, 12:34:25 AM

Previous topic - Next topic

Don57

I have programmed on other OS, and been able to declare certain areas of the current window gadgets. These gadgets are supplied with their own bmps for animation. Is this possible in windows.

hutch--

Hi Don, Welcome on board. Controls are basically prebuilt windows that are designed for user interface tasks, buttons, text labels and many others. You can either use a dialog editor which creates a dialog template with controls on it or you can directly create the control of whatever type with the CreateWindowEx() function like a normal window is done.

As far as an animation control, Windows has one but its for a different media file format than multiple bitmaps. Tell us a bit more about what you need it to do and there may be a simpe way to do what you want. If its a simple set of bitmap files it sounds like a timer and use the BitBlt() function to sequentially blit the images onto a window.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Don57

I have a custom bitmap for my opening screen. It resides in a window created with WS_Border, therefore it has no buttons. I would like to have an area on my screen to be my button. That way I could set up a buffer to BitBlt the to screen and animate my controls.

hutch--

Don,

Usually with a splash screen you just run it for a set time but if you want it to have a button to close it for example you would make the window a bit higher to allow room for a button at the bottom and blit the bitmaps so they line up with the top two corners.

In the WndProc that controls the splash screen you would set up a timer with a duration of between 20 to 50 millseconds depending on the speed you want and process the timer message to blit the next bitmap onto the client area of the splash screen window.

You probably don't need a back buffer in this context as you already have the bitmaps and don't need to construct each image.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php