Re: CxImage User Input

new topic     » goto parent     » topic index » view thread      » older message » newer message

OK, However whenever I try to load a image, my program freezes, here's my code.

 
Hero_WalkGfx_Win = createEx(Window,"",Tab_Hero,460,50,64,64,{WS_CHILD,WS_CLIPSIBLINGS},0) 
 
object HeroWalk_Gfx 
HeroWalk_Gfx = 0 
 
procedure Load_HeroWalk_Gfx(integer self, integer event, sequence parm) 
	fName = getOpenFileName(Hero_WalkGfx_Win,file,GraphicType) 
	 
	if length(fName) = 0 then 
		return 
	end if 
	 
	HeroWalk_Gfx = CXI_LoadImage(fName,CXI_FORMAT_UNKNOWN,0) 
	 
end procedure 
setHandler(Hero_WalkGfx_Load,w32HClick,routine_id("Load_HeroWalk_Gfx")) 
 
procedure Paint_HeroWalk_Gfx(integer self, integer event, sequence parm) 
	transBlt(Hero_WalkGfx_Win,0,0,HeroWalk_Gfx) 
end procedure 
setHandler(Hero_WalkGfx_Win,w32HPaint,routine_id("Paint_HeroWalk_Gfx")) 

There's more code to obviously, but this is the part that counts, I'm pretty sure. I remember they're being some kinda of code Greg wrote so that user input images would work. What I want is for the user to load a image and then have it displayed in the window. However, when I tried loading an image, my program froze.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu