F
flyerer1
Unregistered / Unconfirmed
GUEST, unregistred user!
我在编译cxScrollBar.pas组件的时候,出现[Error] cxScrollBar.pas(883):
Incompatibletype:'Integer' and 'PRect' 错误1
Incompatibletype:'Integer' and 'tagSIZE' 错误2
Incompatibletype:'Integer' and 'PRect' 错误3
Incompatibletype:'Integer' and 'tagSIZE' 错误4
procedure TcxScrollBar.CalcMinThumnailSize;
{$IFDEF VCL}
const
ThumbnailGripKind: array[Boolean] of Integer = (SBP_GRIPPERVERT, SBP_GRIPPERHORZ);
ThumbnailKind: array[Boolean] of Integer = (SBP_THUMBBTNVERT, SBP_THUMBBTNHORZ);
var
ATheme: TTheme;
AThumbSize, AGripSize: TSize;
{$ENDIF}
begin
{$IFDEF VCL}
if Painter = TcxWinXPLookAndFeelPainter then
begin
ATheme := OpenTheme(totScrollBar);
if (ATheme <> 0) and (GetThemePartSize(ATheme, 0, ThumbnailGripKind[FKind = sbVertical],
SCRBS_NORMAL, TS_MIN(错误1), AGripSize)(错误2) = S_OK) then
begin
if (GetThemePartSize(ATheme, 0, ThumbnailGripKind[FKind = sbVertical],
SCRBS_NORMAL, TS_TRUE(错误3), AThumbSize)(错误4) = S_OK) then
begin
if FKind = sbVertical then
FThumbnailSize := MaxInt(AGripSize.cy, AThumbSize.cy + 4)
else
FThumbnailSize := MaxInt(AGripSize.cx, AThumbSize.cx + 4);
end
else
if FKind = sbVertical then
FThumbnailSize := AGripSize.cy
else
FThumbnailSize := AGripSize.cx;
if FThumbnailSize < cxMinStdThumbnailSize then
FThumbnailSize := cxMinStdThumbnailSize
end
else
FThumbnailSize := cxMinStdThumbnailSize;
end
else
{$ENDIF}
FThumbnailSize := cxMinStdThumbnailSize;
end;
下面是function GetThemePartSize函数的实现:
function GetThemePartSize(hTheme: HTHEME; DC: HDC; iPartId, iStateId: Integer;
{$IFNDEF CLR}prc: PRect{$ELSE}const prc: TRect{$ENDIF}; eSize: THEMESIZE;
{$IFNDEF CLR}psz: PSize{$ELSE}out psz: TSize{$ENDIF}): HRESULT;
begin
{$IFNDEF CLR}
Result := FThemeLibraryMethodPointersKeeper.FGetThemePartSize(hTheme, DC, iPartId,
iStateId, prc, eSize, psz);
{$ELSE}
Result := _GetThemePartSize(hTheme, DC, iPartId,
iStateId, prc, eSize, psz);
{$ENDIF}
end;
分不是问题.可以加.
我的QQ:313527609 如有兴趣可以加我的QQ.
Incompatibletype:'Integer' and 'PRect' 错误1
Incompatibletype:'Integer' and 'tagSIZE' 错误2
Incompatibletype:'Integer' and 'PRect' 错误3
Incompatibletype:'Integer' and 'tagSIZE' 错误4
procedure TcxScrollBar.CalcMinThumnailSize;
{$IFDEF VCL}
const
ThumbnailGripKind: array[Boolean] of Integer = (SBP_GRIPPERVERT, SBP_GRIPPERHORZ);
ThumbnailKind: array[Boolean] of Integer = (SBP_THUMBBTNVERT, SBP_THUMBBTNHORZ);
var
ATheme: TTheme;
AThumbSize, AGripSize: TSize;
{$ENDIF}
begin
{$IFDEF VCL}
if Painter = TcxWinXPLookAndFeelPainter then
begin
ATheme := OpenTheme(totScrollBar);
if (ATheme <> 0) and (GetThemePartSize(ATheme, 0, ThumbnailGripKind[FKind = sbVertical],
SCRBS_NORMAL, TS_MIN(错误1), AGripSize)(错误2) = S_OK) then
begin
if (GetThemePartSize(ATheme, 0, ThumbnailGripKind[FKind = sbVertical],
SCRBS_NORMAL, TS_TRUE(错误3), AThumbSize)(错误4) = S_OK) then
begin
if FKind = sbVertical then
FThumbnailSize := MaxInt(AGripSize.cy, AThumbSize.cy + 4)
else
FThumbnailSize := MaxInt(AGripSize.cx, AThumbSize.cx + 4);
end
else
if FKind = sbVertical then
FThumbnailSize := AGripSize.cy
else
FThumbnailSize := AGripSize.cx;
if FThumbnailSize < cxMinStdThumbnailSize then
FThumbnailSize := cxMinStdThumbnailSize
end
else
FThumbnailSize := cxMinStdThumbnailSize;
end
else
{$ENDIF}
FThumbnailSize := cxMinStdThumbnailSize;
end;
下面是function GetThemePartSize函数的实现:
function GetThemePartSize(hTheme: HTHEME; DC: HDC; iPartId, iStateId: Integer;
{$IFNDEF CLR}prc: PRect{$ELSE}const prc: TRect{$ENDIF}; eSize: THEMESIZE;
{$IFNDEF CLR}psz: PSize{$ELSE}out psz: TSize{$ENDIF}): HRESULT;
begin
{$IFNDEF CLR}
Result := FThemeLibraryMethodPointersKeeper.FGetThemePartSize(hTheme, DC, iPartId,
iStateId, prc, eSize, psz);
{$ELSE}
Result := _GetThemePartSize(hTheme, DC, iPartId,
iStateId, prc, eSize, psz);
{$ENDIF}
end;
分不是问题.可以加.
我的QQ:313527609 如有兴趣可以加我的QQ.