Re: VB: DX: drawing text...
is there a faster way to draw text?
Re: VB: DX: drawing text...
nvm i will do it difrent.. when you hover a tile i will make it so it shows in the sbar if its blocked or not...
Re: VB: DX: drawing text...
Incase it still helps a faster way would be to have an image with the alphabet on and then you change the SrcRect to choose dirrefent letters. This would be quicker I guess cos its missing out the font stuff and basically just rendering a graphic :).
Re: VB: DX: drawing text...
i dint set the font... is that why its so slow?
Re: VB: DX: drawing text...
If you don't set the font then it would just use the default one but I would think its the process of it needing to use the font to work out what the text looks like first and then it still has to draw the thing after that. So if you've already made a FontList Image then your just drawing simple graphics and it dkips out that stage and instead it just takes a little of your time at design time to generate the FontList Image :).
Re: VB: DX: drawing text...
cant i just set the font..... or something...
Re: VB: DX: drawing text...
Yea you can set the font but I can't see that speeding things up ;).
Re: VB: DX: drawing text...
arf.....!!!!! well i just made a block image that will do it....
Re: VB: DX: drawing text...
Set ddSurface = DD.CreateSurfaceFromResource(File, Name, DDSD)
automation error... File is "Map Editor.Res" name is "102"
why ???
Re: VB: DX: drawing text...
For the -2147467259 error the SDK says:
HRESULT: 0x80004005 (2147500037)
Name: E_FAIL
Description: An undetermined error occurred
Severity code: Failed
Facility Code: FACILITY_NULL (0)
Error Code: 0x4005 (16389)
Personally I've never used CreateSurfaceFromResource() I only ever use CreateSurfaceFromFile().
Re: VB: DX: drawing text...
i tried it like here
http://216.5.163.53/DirectX4VB/Tutor...D_ResFiles.asp
on this line it says
Let DDSD.lWidth = LoadResPicture(Name, vbPicTypeBitmap).Width
it cant find the resource???????????!!!!!!!11
its there!!!
Re: VB: DX: drawing text...
Try CreateSurfaceFromFile.
Sorry I haven't posted in here for awhile. Girl problems.