Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

如何找到mbg文件

From Wiki
Jump to: navigation, search
Article Metadata

兼容于
平台:
Symbian

文章
huwell 在 30 Jun 2007 创建
最后由 hamishwillee 在 06 May 2013 编辑

准备编译这个例子: (Symbian\6.1\Series60\Epoc32Ex\Graphics\WS\BitmapSprite ), 可是却无法找到BitmapSprite.mbg,这个文件去哪里了?


  • 说明:

这个.mbg文件时被bmconv工具(命令行程序)加了/h命令后,自动 生成的头文件。 例如:

bmconv /hBitmapSprite.mbg Mil1mask.bmp Mil2mask.bmp Windml1a.bmp
Windml1b.bmp Windml1c.bmp Windml1d.bmp Windml2a.bmp Windml2b.bmp
Windml2c.bmp Windml2d.bmp

这样的命令行程序会从Windows位图文件中生成EPOC(译者注: Symbian)的多位图文件(multi-bitmap)和所需要用的头文件。 注意:如果环境变量PATH设置不正确的话,会产生bad command or filename 错误。 如果使用下面的工具程序的话:

bldmake bldfiles
 
abld build wins urel


而且MMP文件包含了下面的BITMAP定义(在此例子中):

START BITMAP BitmapSprite.mbm
 
header
 
sourcepath .
 
source 2 Windml1a.bmp Windml2a.bmp Windml1b.bmp Windml2b.bmp
 
source 2 Windml1c.bmp Windml2c.bmp Windml1d.bmp Windml2d.bmp
 
source 2 Mil1mask.bmp Mil2mask.bmp
 
end


.mbg头文件就会被自动生成。 其实位图头文件的内容很简单:

// BitmapSprite.mbg
 
// Generated by BitmapCompiler
 
// Copyright (c) 1998-2000 Symbian Ltd. All rights
 
// reserved.
 
enum TMbmBitmapsprite
{
EMbmBitmapspriteMil2mask,
EMbmBitmapspriteWindml1a,
EMbmBitmapspriteWindml1b,
EMbmBitmapspriteWindml1c,
EMbmBitmapspriteWindml1d,
EMbmBitmapspriteWindml2a,
EMbmBitmapspriteWindml2b,
EMbmBitmapspriteWindml2c,
EMbmBitmapspriteWindml2d
};
This page was last modified on 6 May 2013, at 06:29.
46 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×