You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
Is it technically possible to display more than one bitmap in the same picture box ? If yes, I would very greatly appreciate code snippet showing how to accomplish this, with control over positioning of each bitmap inside the box .
Yes it is quite possible. I don't have any example code, but the general technique is straight forward. I like to use a LABEL control with the %GRAY_FRAME style to emulate a "picturebox", and then I display my images in response to %WM_PAINT events.
Assuming that you have your bitmaps loaded into memory DC's, use StretchBlt() to bit-block-transfer the bitmap into the DC of the control, only giving each bitmap the amount of room it is required to have.
For example, if we have a control that is 100 units x 100 units, we could display one hundred 10x10 images... just give StretchBlt() the starting location in the DC of the LABEL control (the target), and tell it to use a width and height of 10 units.
Clear as mud? This is probably a bit too complicated to describe briefly but good books like Petzold cover this stuff in great detail. See the FAQ forum for ISBN details.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment