Bitmap background

I feel not so clever…

I try to attach a png background. I use
pGraphics->AttachBackground(BACKGROUND_FN);
in my mLayoutFunc function.

The BACKGROUND_FN is defined in config.h as “o303-1130x840.png”.

The “o303-1130x840.png” I have placed in “D:\OneDrive\projekt\iPlug2\Examples\o303\resources\img” and o303 is my plugin directory.

My main.rc has the resource includes “BACKGROUND_FN PGN BACKGROUND_FN”

When I try to run the: line pGraphics->AttachBackground(BACKGROUND_FN); I get the exception division by zero at the line 122 in the IGraphicsStructs.h:

int FH() const { return (mFramesAreHorizontal ? mH : mH / mN); }

What I’m I supposed to do?

PGN? Looks wrong In the rc

1 Like

Ooh. Nice spotted! Thank you so much. Now it works :blush: