nav-left cat-right
cat-right
Home » Blog » 2007 » April

Open, Save and Read Bitmaps...

The task to read a bitmap into a data array, show this bitmap and save an array or dc to a file sound like a simple task but is rather difficult in reality if one uses MFC. Maybe I am totaly wrong when stating this, but that is my result of one week searching for solutions and implementing my own ones.

What I have achieved can be as an example project.

  bitmapopenandsave.zip (61.0 KiB)

(weiterlesen…)

Show Dialog on Second Screen...

The following Code maximises a dialog on the second screen.

The code is available for download:

  DrawOnSecondScreen.zip (43.9 KiB)

(weiterlesen…)

Flicker Free example with CStatic Control...

The following code shows how to paint into a CStatic Control and make sure this painting is flicker-free.

  1. Overloading of CStatic
  2. CGraphCtrl
  3. Flicker Free drawing
  4. Resizing of Images
The example code for download:

  FlickerFreeDemoStatic.zip (61.6 KiB)

(weiterlesen…)

Flicker Free example with dialog...

One can find several examples for flicker free drawing in MFC. (see for example Flicker Free Drawing In MFC)

Here is an example done by myself. I used the CMemDC Class posted in Enhanced CMemDC.

The example code for download:

  FlickerFreeDemoBackground.zip (27.7 KiB)

(weiterlesen…)

Enhanced CMemDC...

Flicker Free drawing onto a dc can be realised by using the class CMemDC by Keith Rule (Flicker free drawing using memory DC)

I changed the Class in such a way that it supports the automatic resizing of images that have higher or lower size than the dc that it is painted onto. The change is thus from using BitBlt to StretchBlt.

(weiterlesen…)
Page 1 of 3123»