The bitmap included in a resource file is not displayed by the code. The first few line of the RC file are:
#include "c:\pbcc40\winapi\resource.h"
// Windows 95 does NOT display icons FOR CONSOLE applications IN Explorer.
RADTABS ICON MIRD.ICO
MESSAGE BITMAP PATIENT.BMP
.....
And the following code fragment fails to display the bitmap:
DESKTOP GET CLIENT TO ncWidth&, ncHeight&
BitName$ = "message"
nFile = FREEFILE
OPEN BitName$ FOR BINARY AS nFile
GET #nFile, 19, nWidth&
GET #nFile, 23, nHeight&
CLOSE nFile
GRAPHIC WINDOW "", 20, 20, nWidth&, nHeight& TO hGW1&
GRAPHIC ATTACH hGW1&, 0, REDRAW
GRAPHIC RENDER BitName$, (0, 0) - (nWidth&-1, nHeight&-1)
GRAPHIC SET LOC (ncWidth& - nWidth&)\2, (ncHeight& - nHeight&)\2
GRAPHIC REDRAW
GRAPHIC SET FOCUS
The bitmap is display if BitName$ = "patient.bmp". What am I doing wrong?
#include "c:\pbcc40\winapi\resource.h"
// Windows 95 does NOT display icons FOR CONSOLE applications IN Explorer.
RADTABS ICON MIRD.ICO
MESSAGE BITMAP PATIENT.BMP
.....
And the following code fragment fails to display the bitmap:
DESKTOP GET CLIENT TO ncWidth&, ncHeight&
BitName$ = "message"
nFile = FREEFILE
OPEN BitName$ FOR BINARY AS nFile
GET #nFile, 19, nWidth&
GET #nFile, 23, nHeight&
CLOSE nFile
GRAPHIC WINDOW "", 20, 20, nWidth&, nHeight& TO hGW1&
GRAPHIC ATTACH hGW1&, 0, REDRAW
GRAPHIC RENDER BitName$, (0, 0) - (nWidth&-1, nHeight&-1)
GRAPHIC SET LOC (ncWidth& - nWidth&)\2, (ncHeight& - nHeight&)\2
GRAPHIC REDRAW
GRAPHIC SET FOCUS
The bitmap is display if BitName$ = "patient.bmp". What am I doing wrong?
Comment