直接赋值就可以
typedef struct
{
BYTE bWB;
WORD wX;
WORD wY;
WORD wWidth;
WORD wHeight;
}
strucOsdPos;
static code strucOsdPos pwPosLayer1[OSD_POS_LAYER1_MAX] = {
{WB_NORMAL_HEAD2,
TIME_POS_X, TIME_POS_Y,
/* 00 OSD_POS_REMAIN_MSG
*/
PBC_POS_X - TIME_POS_X},
{WB_NORMAL_HEAD1,
INIT_POS_X, INIT_POS_Y,
/* 01 OSD_POS_INIT
*/
PBC_POS_X - INIT_POS_X},
{WB_NORMAL_HEAD1,
PBC_POS_X, HEAD_POS_Y,
/* 02 OSD_POS_PBC
*/
PLAY_STATUS_POS_X - PBC_POS_X},
{WB_NORMAL_HEAD1,
PLAY_STATUS_POS_X+100, HEAD_POS_Y,
/* 03 OSD_POS_PLAY_STATUS
*/
DISP_WIDTH - PLAY_STATUS_POS_X + 10},
{WB_NORMAL_HEAD2,
TIME_POS_X + 170, TIME_POS_Y,
/* 04 OSD_POS_TIME_LEFT
*/
TIME_WIDTH},
{WB_NORMAL_HEAD1,
TIME_POS_X2, TIME_POS_Y,
/* 05 OSD_POS_TIME_RIGHT
*/
T_TIME_WIDTH},
{WB_NORMAL_HEAD1,
REPEAT_POS_X + 100, PBC_POS_Y,
/* 06 OSD_POS_REPEAT
*/
ZOOM_POS_X - REPEAT_POS_X},
{WB_NORMAL_HEAD1,
REPEAT_LEFT_POS_X, PBC_POS_Y,
/* 07 OSD_POS_REPEAT_LEFT
*/
ZOOM_POS_X - REPEAT_LEFT_POS_X},
{WB_NORMAL_HEAD1,
ZOOM_POS_X + 90, PBC_POS_Y,
/* 08 OSD_POS_ZOOM
*/
ANGLE_POS_X - ZOOM_POS_X},
{WB_NORMAL_HEAD1,
ANGLE_POS_X + 90, PBC_POS_Y,
/* 09 OSD_POS_ANGLE
*/
DISP_WIDTH - ANGLE_POS_X},
{WB_NORMAL_HEAD1,
HEAD_POS_X, HEAD_POS_Y,
/* 10 OSD_POS_PLAY_INFO
*/
193},
{WB_NORMAL_HEAD2,
HEAD_POS_X+240, PBC_POS_Y,
/* 11 OSD_POS_SUBTITLE
*/
LAYER2_WIDTH},
{WB_NORMAL_HEAD2,
HEAD_POS_X+240, PBC_POS_Y,
/* 12 OSD_POS_AUDIO
*/
DISP_WIDTH - HEAD_POS_X},
{WB_NORMAL_VOL,
VOL_POS_X, VOL_POS_Y,
/* 13 OSD_POS_AUD_CTRL
*/
DISP_WIDTH - VOL_POS_X},
{WB_NORMAL_VOL,
VOL_POS_X1, VOL_POS_Y,
/* 14 OSD_POS_AUD_CTRL1
*/
DISP_WIDTH - VOL_POS_X1},
{WB_NORMAL_VOL,
SHIFT_MARK_POS_X, VOL_POS_Y,
/* 15 OSD_POS_SHIFT_MARK
*/
2*EFONT_WIDTH},
{WB_NORMAL_HEAD2,
VOL_POS_X, VOL_POS_Y,
/* 16 OSD_POS_PCD_AUD_CTRL
*/
DISP_WIDTH - VOL_POS_X},
{WB_NORMAL_HEAD2,
TIME_POS_X, TIME_POS_Y,
/* 17 OSD_POS_ISO_TIME_LEFT
*/
TIME_WIDTH},
{WB_NORMAL_PBC1,
TIME_POS_X2, TIME_POS_Y,
/* 18 OSD_POS_ISO_TIME_RIGHT
*/
T_TIME_WIDTH},
{WB_NORMAL_HEAD2,
REPEAT_POS_X, PBC_POS_Y,
/* 19 OSD_POS_ISO_REPEAT
*/
ZOOM_POS_X - REPEAT_POS_X},
{WB_NORMAL_HEAD2,
REPEAT_LEFT_POS_X, PBC_POS_Y,
/* 20 OSD_POS_ISO_REPEAT_LEFT */
ZOOM_POS_X - REPEAT_LEFT_POS_X},
{WB_NORMAL_HEAD2,
ZOOM_POS_X, PBC_POS_Y,
/* 21 OSD_POS_ISO_ZOOM
*/
ANGLE_POS_X - ZOOM_POS_X},
{WB_NORMAL_HEAD1,
KSCORE_POS_X, INIT_POS_Y,
/* 22 OSD_POS_KSCORE
*/
DISP_WIDTH - KSCORE_POS_X},
{WB_NORMAL_HEAD1,
KSINFO_POS_X, INIT_POS_Y,
/* 23 OSD_POS_KSINFO
*/
DISP_WIDTH - KSINFO_POS_X},
{WB_NORMAL_HEAD1,
0, 0,
/* 24 OSD_POS_STOP_MSG1
*/
280}
};