April 26, 2024, 11:13:53 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Getting a handle

Started by Brian, January 30, 2021, 05:19:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Brian

Hello,

This is not working code. It is just an example of something I am trying. Question is: How do I get the correct handle of the PBOX I am creating with CreateWindowEx so I can see the picture with SHOWIMAGE?


Const PBOX=100

WINDOW win
UINT hInst,image
INT pb
hInst=GetModuleHandleA(win.hWnd)
OPENWindow win,0,0,1024,768,@SIZE|@MINBOX|@MAXBOX|@SYSMENU|@BORDER,0,"PicBox",&main
   pb=CreateWindowEx(0x200,"PicBox","",0x56800000,104,144,465,433,win.hWnd,PBOX,hInst,0)
   SETWINDOWCOLOR(win,RGB(240,240,240))
image=LOADIMAGE(GETSTARTPATH+"rose2.jpg",@IMGSCALABLE)
SHOWIMAGE(pb,image,@IMGSCALABLE,0,0)

Many thanks,

Brian