home *** CD-ROM | disk | FTP | other *** search
- 256 Colors in a Visual Basic Picture Box Control !!!!
- =====================================================
-
- The enclosed files (see below) show how to display a 256 bitmap in a Visual
- Basic picture box control. The technique uses a DLL to read the bitmap
- file into memory and create a palette which can then be selected into
- the picture box's device context and subsequently realized (I can't take
- any credit for the code within the DLL ... it was lifted with very
- little modification from a couple of SAMPLE programs supplied with the
- Microsoft Windows SDK.)
-
- Hopefully, the code will be easy to read (famous last words), but if you
- have difficulty following what's happening, feel free to holler a question
- and I'll do my best to help out.
-
- The demo (256PICBX) does have one "hidden" item which you may have trouble
- finding. The PicPreviewSource picture box can be found by sizing the
- form downwards while in design mode.
-
- Enjoy,
- rpb 70742,3332
-
- Files:
-
- 256picbx.bas ─┐
- 256picbx.frm │ Files for the demo VB application
- 256picbx.mak ─┘
- 256picbx.exe Precompiled version of demo application
-
- makefile ──┐
- errors.c │ Source code for the bitmap utility library
- errors.h │ the makefile is for MSC 6.0, but can be used with QCWin
- dib.c │ by changing the CC = cl line to read CC = cl -qc and
- dib.h │ changing the line CFLAGS_R_WDLL = /Ox /DNDEBUG to
- dibutil.c │ CFLAGS_R_WDLL = /O /DNDEBUG
- dibutil.def │
- dibutil.h ──┘
- dibutil.dll Precompiled bitmap utility library
-
-