Solved

loading a bitmap in OWL

Posted on 2000-04-28
1
171 Views
Last Modified: 2013-12-26
How do you go about loading a bitmap located on the hard drive, and displaying it on the screen?
0
Comment
Question by:onnix
1 Comment
 
LVL 14

Accepted Solution

by:
AlexVirochovsky earned 15 total points
Comment Utility
..
#include <owl/dibitmap.h>
...
void YouClass::Paint(TDC& dc, bool, TRect& rect)
{
  TDiBitmap *dib = new TDiBitmap("mybitmap.bmp");
  TMemoryDC memoryDC(dc);  
  memoryDC.SelectObject(*dib);
  dc.BitBlt(rect, memoryDC, TPoint(0,0));
  delete dib;
}

I hope, it helps. Alex

BTW: 15PTS???
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now