早教吧作业答案频道 -->数学-->
mfc缩放图像却平移了GetWindowRect(mRect);\x09intx1=mRect.left;\x09inty1=mRect.top;\x09intx2=mRect.left+mRect.Width();\x09inty2=mRect.top+mRect.Height();\x09intn1=50;\x09if(mRect.Width()>mRect.Height())\x09{\x09\x09n1=
题目详情
mfc缩放图像却平移了
GetWindowRect(m_Rect);
\x09int x1 = m_Rect.left;
\x09int y1 = m_Rect.top;
\x09int x2 = m_Rect.left+m_Rect.Width();
\x09int y2 = m_Rect.top+m_Rect.Height();
\x09int n1 = 50;
\x09if(m_Rect.Width()>m_Rect.Height())
\x09{
\x09\x09n1 = n1*m_Rect.Width()/m_Rect.Height();
\x09}
\x09int n2 = n1*m_Rect.Height()/m_Rect.Width();
\x09if(zDelta
GetWindowRect(m_Rect);
\x09int x1 = m_Rect.left;
\x09int y1 = m_Rect.top;
\x09int x2 = m_Rect.left+m_Rect.Width();
\x09int y2 = m_Rect.top+m_Rect.Height();
\x09int n1 = 50;
\x09if(m_Rect.Width()>m_Rect.Height())
\x09{
\x09\x09n1 = n1*m_Rect.Width()/m_Rect.Height();
\x09}
\x09int n2 = n1*m_Rect.Height()/m_Rect.Width();
\x09if(zDelta
▼优质解答
答案和解析
你这里,只是更改了窗口的大小和位置,哪里关系到图像了?
如果OnPaint里面有图像显示,那么图像的坐标应该一样是通过窗口坐标计算的原点,而不应该是一个固定的原点BitBlt(100,100,.)这里的两个100要根据窗口坐标计算才可以随着窗口的变化而变化.
如果OnPaint里面有图像显示,那么图像的坐标应该一样是通过窗口坐标计算的原点,而不应该是一个固定的原点BitBlt(100,100,.)这里的两个100要根据窗口坐标计算才可以随着窗口的变化而变化.
看了mfc缩放图像却平移了GetW...的网友还看了以下:
css属性写法@mediascreenand(min-width:413px)@mediascre 2020-05-13 …
麻烦各位帮个忙!麻烦朋友们帮忙看一下这一段代码:#div1{width:150px; height 2020-05-16 …
英语翻译/*LOGO*/#logo{width:450px;height:114px;margin 2020-07-01 …
请教一个for循环的问题?div{margin:0px00300px;padding:30px000 2020-10-31 …
什么设置window.open新打开窗口高度和宽度站屏幕高度和宽度的100%呢?(在不同的浏览器上都 2020-11-01 …
mfc缩放图像却平移了GetWindowRect(mRect);\x09intx1=mRect.le 2020-11-01 …
我想知道在汽车配件里面的英文意思:APP/ENGINE/PART/HEIGHT/MATL/WIDTH 2020-11-01 …
英语翻译在表示倍数的比较级有如下几种句型1.Aisthree(four,etc.)timesthes 2020-11-01 …
请VB高手帮我解答一下代码如下:PrivateSubFormLoad()Form1.Height=F 2020-11-01 …
window.open("Sample.htm",null,*********)中的null是什么含 2020-11-01 …