Custom Query (518 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (49 - 51 of 518)

Ticket Resolution Summary Owner Reporter
#63 fixed User bitmaps with more than 16 colors in their palette fail to load in toolbar StevenHL Gregg Young
Description

I tried to load David's new unlock.bmp by defining a new button on the toolbar and installing the bitmap as a "user-defined bitmap". The button always comes up as a text button. If I change the color palette to 16 colors the bitmap works. If I compile it into the resources with the original palette it works. the code that is failing is below. I don't see what is going wrong.

/* We now position the stream on the color table information...............*/ rc = fseek(File,ulOffset,SEEK_SET); if(rc)

{

Runtime_Error(pszSrcFile, LINE, "LoadBitmapFromFile?"); goto ExitLoadBMP;

ulOffset is coming from one of the following. In this case it is from case 1.

(case 1 only one sub format in file)

f2 = pbih2->cbFix > sizeof(*pbih); 1.x or 2.x bitmap /* We will need to read the color table. Thus we position the stream...*/ /* so that the next read will read IT. This, of course, depends on the.*/ /* type of the bitmap (old vs new), note that in the NEW case, we can..*/ /* not be certain of the size of the bitmap header.....................*/ ulOffset = (f2) ? sizeof(*pbfh2) + pbih->cbFix - sizeof(*pbih2) :

sizeof(*pbfh);

(case 2 multiple sub formats)

f2 = pbih2->cbFix > sizeof(*pbih); /* as before, we calculate where to position the stream in order to ...*/ /* read the color table information....................................*/ ulOffset = ulOffsetTemp; ulOffset+= (f2) ? sizeof(*pbafh2) + pbih2->cbFix - sizeof(*pbih2):

sizeof(*pbafh);

I know this because I filled the file with doserror checks see attached loadbitmap.c and this is where it fails. The next higher doserror call is immediately before the call to calculate the stream position.

When I load fm2 I get the error at line 222 and then 2 errors at line 66. The second 2 errors are caused by trying to load a bitmap that could not be processed. One in the toolbar and one in the button edit dialog.

code that fails on line 66

--- open the file File = _fsopen(pszFileName,"r",SH_DENYWR); if(!File)

#64 fixed Replace command should leave the commands at the same position in the command list Gregg Young Gregg Young
Description

If the command gets moved it will break the command on the toolbar if it exists. This should happen on replace.

#65 fixed Split user added commands association, toolbar entries from FM2 base entries Gregg Young Gregg Young
Description

Move the base entries to code or ini file with their own assignment space (eg 4000-4100 are fm2 designated commands). Need an install process that can parse and split existing files. Should be able to edit parameters etc on FM2 commands. This would facilitate our updating of commands associations and toolboxes without effecting user modifications. Perhaps we should assign # at creation so that moving stuff around doesn't effect toolbars. I am not clear why commands like bldlevel, pstat and rmview aren't base commands

Note: See TracQuery for help on using queries.