张洋 14 часов назад
Родитель
Сommit
9b7b29a24d

+ 1 - 1
bin/Win32/Debug/zhipuzi_pos_windows/skin/diandan_page.xml

@@ -101,7 +101,7 @@
 			
 			<VerticalLayout name="diandan_food_layout">
 				<VerticalLayout name="diandan_fenlei_layout_scrolllayout" vscrollbar="true">
-					<HorizontalLayout name="diandan_fenlei_layout" padding="0,0,0,0" bkcolor="#FFFFFFFF">
+					<HorizontalLayout name="diandan_fenlei_layout" padding="0,0,0,0" bkcolor="#FFFFFFFF" layout="AbsoluteLayout">
 
 					</HorizontalLayout>
 				</VerticalLayout>

+ 4 - 4
bin/Win32/Debug/zhipuzi_pos_windows/skin/main.xml

@@ -13,10 +13,10 @@
 	<Font id="34" name="微软雅黑" size="34" />
 	<Font id="36" name="微软雅黑" size="36" />
 	
-	<Default shared="true" name="VScrollBar" value="" width="8" showbutton1="false" showbutton2="false" thumbnormalimage="file='scrollbar_shu_line_zhengchang.png' corner='2,2,2,2'" thumbhotimage="file='scrollbar_shu_line_xuanfu.png' corner='2,2,2,2'" thumbpushedimage="file='scrollbar_shu_line_dianji.png' corner='2,2,2,2'" />
-    <Default shared="true" name="HScrollBar" value="" height="8" showbutton1="false" showbutton2="false" thumbnormalimage="file='scrollbar_heng_line_zhengchang.png' corner='2,2,2,2'" thumbhotimage="file='scrollbar_heng_line_xuanfu.png' corner='2,2,2,2'" thumbpushedimage="file='scrollbar_heng_line_dianji.png' corner='2,2,2,2'" />
+	<Default shared="true" name="VScrollBar" value="width=&quot;8&quot; showbutton1=&quot;false&quot; showbutton2=&quot;false&quot; thumbnormalimage=&quot;file='scrollbar_shu_line_zhengchang.png' corner='2,2,2,2'&quot; thumbhotimage=&quot;file='scrollbar_shu_line_xuanfu.png' corner='2,2,2,2'&quot; thumbpushedimage=&quot;file='scrollbar_shu_line_dianji.png' corner='2,2,2,2'&quot;" />
+    <Default shared="true" name="HScrollBar" value="height=&quot;8&quot; showbutton1=&quot;false&quot; showbutton2=&quot;false&quot; thumbnormalimage=&quot;file='scrollbar_heng_line_zhengchang.png' corner='2,2,2,2'&quot; thumbhotimage=&quot;file='scrollbar_heng_line_xuanfu.png' corner='2,2,2,2'&quot; thumbpushedimage=&quot;file='scrollbar_heng_line_dianji.png' corner='2,2,2,2'&quot;" />
 	
-	<Default name="Button" normalimage="file='btn_green_zhengchang.png' corner='5,5,5,5'" hotimage="file='btn_green_xuanfu.png' corner='5,5,5,5'" pushedimage="file='btn_green_dianji.png' corner='5,5,5,5'"  />	
+	<Default name="Button" value="normalimage=&quot;file='btn_green_zhengchang.png' corner='5,5,5,5'&quot; hotimage=&quot;file='btn_green_xuanfu.png' corner='5,5,5,5'&quot; pushedimage=&quot;file='btn_green_dianji.png' corner='5,5,5,5'&quot; " />	
 
 	<VerticalLayout bkcolor="#FFF5F5F5">
 		<HorizontalLayout height="79" bkcolor="#FF3CB371">
@@ -32,7 +32,7 @@
 				<Button name="minbtn" width="36" height="36" normalimage="file='icon_shou_n.png'" hotimage="file='icon_shou_xuanfu.png'" pushedimage="file='icon_shou_dianji.png'"/>
 				<Button name="maxbtn" visible="false" width="36" height="36" normalimage="file='icon_fangda_n.png'" hotimage="file='icon_fangda_xuanfu.png'" pushedimage="file='icon_fangda_dianji.png'"/>
 				<Button name="restorebtn" width="36" height="36" normalimage="file='icon_suoxiao_n.png'" hotimage="file='icon_suoxiao_xuanfu.png'" pushedimage="file='icon_suoxiao_dianji.png'"/>
-				<Button name="closebtn" width="36" height="36" normalimage="file='icon_close_n.png'" hotimage="file='icon_close_xuanfu.png'" pushedimage="file='icon_close_dianji.png'"/>
+				<Button name="closebtn" enabled="true" touchable="true" width="36" height="36" normalimage="file='icon_close_n.png'" hotimage="file='icon_close_xuanfu.png'" pushedimage="file='icon_close_dianji.png'"/>
 			</HorizontalLayout>
 		</HorizontalLayout>
 		

+ 3 - 0
zhipuzi_pos_windows/page/CDiandanPageUI.cpp

@@ -256,6 +256,9 @@ void CDiandanPageUI::UpdateFoodtypePos()
 		curItem->SetFloat(true);
 		curItem->SetPos(rect);
 
+		//CRect rc = curItem->GetPos();
+		//OutputDebugStringA(("控件位置:" + std::to_string(rc.left) + "," + std::to_string(rc.top) + "\n").c_str());
+
 		num++;
 	}
 

+ 56 - 56
zhipuzi_pos_windows/wnd/CMainWnd.cpp

@@ -603,73 +603,73 @@ LRESULT CMainWnd::OnNcPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHand
 
 LRESULT CMainWnd::OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
 {
-    POINT pt;
-    pt.x = GET_X_LPARAM(lParam);
-    pt.y = GET_Y_LPARAM(lParam);
-    ::ScreenToClient(*this, &pt);
-    RECT rcClient;
-    ::GetClientRect(*this, &rcClient);
-
-    if(!::IsZoomed(*this))
-    {
-        RECT rcSizeBox = m_pm.GetSizeBox();
+	POINT pt;
+	pt.x = GET_X_LPARAM(lParam);
+	pt.y = GET_Y_LPARAM(lParam);
+	::ScreenToClient(*this, &pt);
+	RECT rcClient;
+	::GetClientRect(*this, &rcClient);
 
-        if(pt.y < rcClient.top + rcSizeBox.top)
-        {
-            if(pt.x < rcClient.left + rcSizeBox.left)
-            {
-                return HTTOPLEFT;
-            }
+	if (!::IsZoomed(*this))
+	{
+		RECT rcSizeBox = m_pm.GetSizeBox();
 
-            if(pt.x > rcClient.right - rcSizeBox.right)
-            {
-                return HTTOPRIGHT;
-            }
+		if (pt.y < rcClient.top + rcSizeBox.top)
+		{
+			if (pt.x < rcClient.left + rcSizeBox.left)
+			{
+				return HTTOPLEFT;
+			}
 
-            return HTTOP;
-        }
-        else if(pt.y > rcClient.bottom - rcSizeBox.bottom)
-        {
-            if(pt.x < rcClient.left + rcSizeBox.left)
-            {
-                return HTBOTTOMLEFT;
-            }
+			if (pt.x > rcClient.right - rcSizeBox.right)
+			{
+				return HTTOPRIGHT;
+			}
 
-            if(pt.x > rcClient.right - rcSizeBox.right)
-            {
-                return HTBOTTOMRIGHT;
-            }
+			return HTTOP;
+		}
+		else if (pt.y > rcClient.bottom - rcSizeBox.bottom)
+		{
+			if (pt.x < rcClient.left + rcSizeBox.left)
+			{
+				return HTBOTTOMLEFT;
+			}
 
-            return HTBOTTOM;
-        }
+			if (pt.x > rcClient.right - rcSizeBox.right)
+			{
+				return HTBOTTOMRIGHT;
+			}
 
-        if(pt.x < rcClient.left + rcSizeBox.left)
-        {
-            return HTLEFT;
-        }
+			return HTBOTTOM;
+		}
 
-        if(pt.x > rcClient.right - rcSizeBox.right)
-        {
-            return HTRIGHT;
-        }
-    }
+		if (pt.x < rcClient.left + rcSizeBox.left)
+		{
+			return HTLEFT;
+		}
+
+		if (pt.x > rcClient.right - rcSizeBox.right)
+		{
+			return HTRIGHT;
+		}
+	}
 
-    RECT rcCaption = m_pm.GetCaptionRect();
+	RECT rcCaption = m_pm.GetCaptionRect();
 
-    if(pt.x >= rcClient.left + rcCaption.left && pt.x < rcClient.right - rcCaption.right \
-            && pt.y >= rcCaption.top && pt.y < rcCaption.bottom)
-    {
-        CControlUI* pControl = static_cast<CControlUI*>(m_pm.FindControl(pt));
+	if (pt.x >= rcClient.left + rcCaption.left && pt.x < rcClient.right - rcCaption.right \
+		&& pt.y >= rcCaption.top && pt.y < rcCaption.bottom)
+	{
+		CControlUI* pControl = static_cast<CControlUI*>(m_pm.FindControl(pt));
 
-        if(pControl && _tcscmp(pControl->GetClass(), DUI_CTR_BUTTON) != 0 &&
-                _tcscmp(pControl->GetClass(), DUI_CTR_OPTION) != 0 &&
-                _tcscmp(pControl->GetClass(), DUI_CTR_TEXT) != 0)
-        {
-            return HTCAPTION;
-        }
-    }
+		if (pControl && _tcscmp(pControl->GetClass(), L"ButtonUI") != 0 &&
+			_tcscmp(pControl->GetClass(), L"OptionUI") != 0 &&
+			_tcscmp(pControl->GetClass(), L"TextUI") != 0)
+		{
+			return HTCAPTION;
+		}
+	}
 
-    return HTCLIENT;
+	return HTCLIENT;
 }
 
 LRESULT CMainWnd::OnInput(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)