In the Ctx image demo, a Cwindow class named pWindow was created.
So if Form1 is a CWindow, can this control be added to a form at runtime?
Application.Run(Form1)
#INCLUDE ONCE "Afx/CImageCtx.inc"
'Add an image control
'DIM pImageCtx AS CImageCtx = CImageCtx(@pWindow, IDC_IMAGECTX, "", 0, 0, pWindow.ClientWidth, pWindow.ClientHeight)
DIM pImageCtx AS CImageCtx = CImageCtx(@Form1, IDC_IMAGECTX, "", 0, 0, Form1.Width, Form1.Height)
C:\Decoy\Software\fb\WinFBE_VD_MAIN.bas(61) warning 3(1): Passing different pointer types, at parameter 1 (pWindow) of AFX.CIMAGECTX.constructor(as AFX.CWINDOW ptr, as long, as wstring, as long, as long, as long, as long, as ulong, as ulong, as long)
C:\Decoy\Software\fb\WinFBE_VD_MAIN.bas(61) error 24: Invalid data types, at parameter 1 (pWindow) of AFX.CIMAGECTX.constructor(as AFX.CWINDOW ptr, as long, as wstring, as long, as long, as long, as long, as ulong, as ulong, as long)
Original constructor as per the help file:
CONSTRUCTOR CImageCtx (BYVAL pWindow AS CWindow PTR, BYVAL cID AS INTEGER, _
BYREF wszTitle AS CONST WSTRING = "", BYVAL x AS LONG = 0, BYVAL y AS LONG = 0, _
BYVAL nWidth AS LONG = 0, BYVAL nHeight AS LONG = 0, BYVAL dwStyle AS DWORD = 0, _
BYVAL dwExStyle AS DWORD = 0, BYVAL lpParam AS LONG_PTR = 0)