@@ -90,9 +90,11 @@
<Control width="1" bkcolor="#FFEBE8E8"></Control>
<VerticalLayout name="diandan_food_layout">
- <HorizontalLayout name="diandan_fenlei_layout" height="80" hscrollbar="true" padding="0,0,0,0" bkcolor="#FFFFFFFF">
+ <VerticalLayout name="diandan_fenlei_layout_scrolllayout" vscrollbar="true">
+ <HorizontalLayout name="diandan_fenlei_layout" padding="0,0,0,0" bkcolor="#FFFFFFFF">
- </HorizontalLayout>
+ </HorizontalLayout>
+ </VerticalLayout>
<TileLayout name="diandan_foodlist" padding="0,0,0,0" inset="15,15,15,15" childpadding="1" itemsize="160,250" vscrollbar="true" hscrollbar="false">
@@ -211,6 +211,20 @@ void CDiandanPageUI::UpdateFoodtypePos()
//调整区域高度
int lastRow = (num - 1) / nMeihangNum + 1;
pFenleiLayout->SetFixedHeight(lastRow * 61 + 19);
+
+ //处理滚动条问题
+ CVerticalLayoutUI* pFenleiScrollLayout = static_cast<CVerticalLayoutUI*>(this->FindSubControl(_T("diandan_fenlei_layout_scrolllayout")));
+ if (lastRow > 2)
+ {
+ lastRow = 2;
+ }
+ pFenleiScrollLayout->SetFixedHeight(lastRow * 61 + 19);
+ SIZE size;
+ size.cx = 0;
+ size.cy = 0;
+ pFenleiScrollLayout->SetScrollPos(size);
}
void CDiandanPageUI::InitFoodShow()
@@ -169,7 +169,7 @@ copy $(SolutionDir)res\icon\ $(SolutionDir)bin\$(Platform)\$(Configuration)\$(Pr
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(SolutionDir)include;$(ProjectDir)pch</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <DisableSpecificWarnings>4099;4091</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4099;4091;4838</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>