|
profree
中级用户
  
积分 478
发帖 132
注册 2003-7-2
状态 离线
|
『第 121 楼』:
使用 LLM 解释/回答一下
确实,现在显示的BMP图片好看多不了,不会变色了
1、增加设置默认项,也就是按回车时执行的默认项
2、修改现在的单选框/复选框 项-按热键为选中
3、显示BMP文件可改变大小,可有两种方式,剪辑或缩放
Indeed, the BMP pictures displayed now are much better and don't change colors.
1. Add the setting of the default item, that is, the default item executed when pressing Enter.
2. Modify the current radio box/check box item - press the hotkey to be selected.
3. The BMP file can be changed in size when displayed, and there can be two ways, clipping or zooming.
|
|
2006-9-28 21:43 |
|
|
firstsail
高级用户
   
积分 668
发帖 295
注册 2005-7-26 来自 广东深圳
状态 离线
|
『第 122 楼』:
使用 LLM 解释/回答一下
WinSail V2.0 已重新上传 --- 2006-09-28 15:30
增加了按钮控件的“默认”属性,函数为
CButton::SetDefaultFlags(BOOL bFlags);
WinSail V2.0 has been re-uploaded --- 2006-09-28 15:30
Added the "default" property of the button control. The function is
CButton::SetDefaultFlags(BOOL bFlags);
|
|
2006-9-29 03:15 |
|
|
profree
中级用户
  
积分 478
发帖 132
注册 2003-7-2
状态 离线
|
『第 123 楼』:
使用 LLM 解释/回答一下
老大,太感谢你了
以前我都是把要默认的项放在最前面,现在方便多了
1、能否讲讲滚动条控件怎样使用,比如用在列表框控件或多行编辑框控件
2、滑动条控件、增值控件、和编辑控件三者“绑定”后,怎样才能保证三者的一致,
3、滑动条控件的默认值和“步长”怎么设置
4、进度条怎样设置等时间
5、进度条的表现上能否增加平滑一项,现在的是块状
Last edited by profree on 2006-9-29 at 04:15 ]
Boss, thank you so much.
I used to put the items to be defaulted at the front before, now it's much more convenient.
1. Can you talk about how to use the scroll bar control, for example, in a list box control or a multi-line edit box control?
2. After the slide bar control, the increment control, and the edit control are "bound", how can we ensure the consistency of the three?
3. How to set the default value and "step size" of the slide bar control?
4. How to set the progress bar to be equal-time?
5. Can the smooth option be added to the performance of the progress bar? The current one is blocky.
Last edited by profree on 2006-9-29 at 04:15 ]
|
|
2006-9-29 04:11 |
|
|
firstsail
高级用户
   
积分 668
发帖 295
注册 2005-7-26 来自 广东深圳
状态 离线
|
『第 124 楼』:
使用 LLM 解释/回答一下
问:(1)滑动条控件的默认值和“步长”怎么设置
答:
//设置滑块的范围,相当于“步长”
CSliderCtrl::SetRange(DWORD dwMin ,DOWRD dwMax)
//获得滑块的范围
CSliderCtrl::GetRange(DWORD* pdwMin ,DOWRD* pdwMax)
//设置滑块的位置
CSliderCtrl::SetPos(int nPos)
//获得滑块的位置
CSliderCtrl::GetPos()
问:(2)进度条怎样设置等时间
答:
“进度条”没有所谓的时间间隔属性。
//设置进度条的范围,相当于“步长”
CSliderCtrl::SetRange(DWORD dwMin ,DOWRD dwMax)
//获得进度条滑块的范围
CSliderCtrl::GetRange(DWORD* pdwMin ,DOWRD* pdwMax)
//设置进度条的位置
CSliderCtrl::SetPos(int nPos)
//获得进度条的位置
CSliderCtrl::GetPos()
进度条单词应是“CProgressCtrl”,这里有误,以后改正!
Question: (1) How to set the default value and "step size" of the slider control
Answer:
//Set the range of the slider, which is equivalent to "step size"
CSliderCtrl::SetRange(DWORD dwMin, DOWRD dwMax)
//Get the range of the slider
CSliderCtrl::GetRange(DWORD* pdwMin, DOWRD* pdwMax)
//Set the position of the slider
CSliderCtrl::SetPos(int nPos)
//Get the position of the slider
CSliderCtrl::GetPos()
Question: (2) How to set equal time for the progress bar
Answer:
There is no so-called time interval attribute for the "progress bar".
//Set the range of the progress bar, which is equivalent to "step size"
CSliderCtrl::SetRange(DWORD dwMin, DOWRD dwMax)
//Get the range of the progress bar slider
CSliderCtrl::GetRange(DWORD* pdwMin, DOWRD* pdwMax)
//Set the position of the progress bar
CSliderCtrl::SetPos(int nPos)
//Get the position of the progress bar
CSliderCtrl::GetPos()
The word for progress bar should be "CProgressCtrl", there was a mistake here, it will be corrected later!
|
|
2006-9-29 06:37 |
|
|
firstsail
高级用户
   
积分 668
发帖 295
注册 2005-7-26 来自 广东深圳
状态 离线
|
『第 125 楼』:
使用 LLM 解释/回答一下
上面贴子应该如下所示:
问:(1)滑动条控件的默认值和“步长”怎么设置
答:
//设置滑块的范围,相当于“步长”
CSliderCtrl::SetRange(DWORD dwMin ,DOWRD dwMax)
//获得滑块的范围
CSliderCtrl::GetRange(DWORD* pdwMin ,DOWRD* pdwMax)
//设置滑块的位置
CSliderCtrl::SetPos(int nPos)
//获得滑块的位置
CSliderCtrl::GetPos()
问:(2)进度条怎样设置等时间
答:
“进度条”没有所谓的时间间隔属性。
//设置进度条的范围,相当于“步长”
CProcessCtrl::SetRange(DWORD dwMin ,DOWRD dwMax)
//获得进度条滑块的范围
CProcessCtrl::GetRange(DWORD* pdwMin ,DOWRD* pdwMax)
//设置进度条的位置
CProcessCtrl::SetPos(int nPos)
//获得进度条的位置
CProcessCtrl::GetPos()
进度条单词应是“CProgressCtrl”,这里有误,以后改正!
The above post should be as follows:
Question: (1) How to set the default value and "step size" of the slider control
Answer:
//Set the range of the slider, equivalent to "step size"
CSliderCtrl::SetRange(DWORD dwMin, DOWRD dwMax)
//Get the range of the slider
CSliderCtrl::GetRange(DWORD* pdwMin, DOWRD* pdwMax)
//Set the position of the slider
CSliderCtrl::SetPos(int nPos)
//Get the position of the slider
CSliderCtrl::GetPos()
Question: (2) How to set an equal-time progress bar
Answer:
There is no so-called time interval attribute for the "progress bar".
//Set the range of the progress bar, equivalent to "step size"
CProcessCtrl::SetRange(DWORD dwMin, DOWRD dwMax)
//Get the range of the progress bar slider
CProcessCtrl::GetRange(DWORD* pdwMin, DOWRD* pdwMax)
//Set the position of the progress bar
CProcessCtrl::SetPos(int nPos)
//Get the position of the progress bar
CProcessCtrl::GetPos()
The word "progress bar" should be "CProgressCtrl", there is an error here, it will be corrected later!
|
|
2006-9-29 06:39 |
|
|
firstsail
高级用户
   
积分 668
发帖 295
注册 2005-7-26 来自 广东深圳
状态 离线
|
『第 126 楼』:
关于滚动条的使用
使用 LLM 解释/回答一下
(1) 横向滚动条CHScrollBar的使用(),一般是
<1>分配实例
<2>建立滚动条
<3>设置滚动条的范围
<4>设置滚动条的默认值
<5>注册单击“滚动条左边按钮”事件
<6>注册单击“滚动条拖动中间按钮”事件
<7>注册拖动“滚动条左边按钮”事件
<7>给滚动条分配一个不与其它控件冲突的ID号
void far ClickScroll_Left(CHScrollBar* pScroll)
{
CDialog* pDialog = (CDialog *)pScroll->GetParent();
//....
}
void far ClickScroll_Pos(CHScrollBar* pScroll)
{
CDialog* pDialog = (CDialog *)pScroll->GetParent();
//....
}
void far ClickScroll_Right(CHScrollBar* pScroll)
{
CDialog* pDialog = (CDialog *)pScroll->GetParent();
//....
}
//...
CHScrollBar *pScrollBarH1 = new CHScrollBar(pDialog); //分配实例
pScrollBarH1->CreateScrollBar(100, 100, //建立滚动条
180, SCROLL_BAR_WIDTH, NULL);
pScrollBarH1->SetRange(0, 10); //设置范围
pScrollBarH1->SetPos(5); //设置默认值
pScrollBarH1->SetScrollLeftRc(); //注册“单击左边按钮”事件
pScrollBarH1->SetScrollPosRc();//注册“拖动中间按钮”事件
pScrollBarH1->SetScrollRightRc();//注册“单击右边按钮”事件
pScrollBarH1->SetID(HSCROLLBASE + 1 - 1); //设置ID号
(1) Usage of Horizontal Scroll Bar CHScrollBar()
<1> Allocate instance
<2> Create scroll bar
<3> Set the range of the scroll bar
<4> Set the default value of the scroll bar
<5> Register the event of clicking "left button of the scroll bar"
<6> Register the event of clicking "middle button of the scroll bar for dragging"
<7> Register the event of dragging "left button of the scroll bar"
<7> Assign an ID number to the scroll bar that does not conflict with other controls
void far ClickScroll_Left(CHScrollBar* pScroll)
{
CDialog* pDialog = (CDialog *)pScroll->GetParent();
//....
}
void far ClickScroll_Pos(CHScrollBar* pScroll)
{
CDialog* pDialog = (CDialog *)pScroll->GetParent();
//....
}
void far ClickScroll_Right(CHScrollBar* pScroll)
{
CDialog* pDialog = (CDialog *)pScroll->GetParent();
//....
}
//...
CHScrollBar *pScrollBarH1 = new CHScrollBar(pDialog); // Allocate instance
pScrollBarH1->CreateScrollBar(100, 100, // Create scroll bar
180, SCROLL_BAR_WIDTH, NULL);
pScrollBarH1->SetRange(0, 10); // Set range
pScrollBarH1->SetPos(5); // Set default value
pScrollBarH1->SetScrollLeftRc(); // Register "click left button" event
pScrollBarH1->SetScrollPosRc();// Register "drag middle button" event
pScrollBarH1->SetScrollRightRc();// Register "click right button" event
pScrollBarH1->SetID(HSCROLLBASE + 1 - 1); // Set ID number
|
|
2006-9-29 06:57 |
|
|
firstsail
高级用户
   
积分 668
发帖 295
注册 2005-7-26 来自 广东深圳
状态 离线
|
『第 127 楼』:
使用 LLM 解释/回答一下
CHScrollBar *pScrollBarH1 = new CHScrollBar(pDialog); //分配实例
pScrollBarH1->CreateScrollBar(100, 100, //建立滚动条
180, SCROLL_BAR_WIDTH, NULL);
pScrollBarH1->SetRange(0, 10); //设置范围
pScrollBarH1->SetPos(5); //设置默认值
pScrollBarH1->SetScrollLeftRc(::ClickScroll_Left); //注册“单击左边按钮”事件
pScrollBarH1->SetScrollPosRc(::ClickScroll_Pos);//注册“拖动中间按钮”事件
pScrollBarH1->SetScrollRightRc(::ClickScroll_Right);//注册“单击右边按钮”事件
pScrollBarH1->SetID(HSCROLLBASE + 1 - 1); //设置ID号
CHScrollBar *pScrollBarH1 = new CHScrollBar(pDialog); // Allocate instance
pScrollBarH1->CreateScrollBar(100, 100, // Create scroll bar
180, SCROLL_BAR_WIDTH, NULL);
pScrollBarH1->SetRange(0, 10); // Set range
pScrollBarH1->SetPos(5); // Set default value
pScrollBarH1->SetScrollLeftRc(::ClickScroll_Left); // Register "click left button" event
pScrollBarH1->SetScrollPosRc(::ClickScroll_Pos); // Register "drag middle button" event
pScrollBarH1->SetScrollRightRc(::ClickScroll_Right); // Register "click right button" event
pScrollBarH1->SetID(HSCROLLBASE + 1 - 1); // Set ID number
|
|
2006-9-29 06:58 |
|
|
firstsail
高级用户
   
积分 668
发帖 295
注册 2005-7-26 来自 广东深圳
状态 离线
|
『第 128 楼』:
使用 LLM 解释/回答一下
单击了横向滚动条“左按钮”时 , 滚动条会向上层控件返回“VK_SCROLL_LEFT”消息宏
拖动了横向滚动条“中间按钮”时,滚动条会向上层控件返回“VK_SCROLL_HORZ_POS”消息宏
单击了横向滚动条“左按钮”时, 滚动条会向上层控件返回“VK_SCROLL_RIGHT”消息宏
单击了竖向向滚动条“上按钮”时 , 滚动条会向上层控件返回“VK_SCROLL_UP”消息宏
拖动了竖向滚动条“中间按钮”时,滚动条会向上层控件返回“VK_SCROLL_VERT_POS”消息宏
单击了竖向滚动条“下按钮”时, 滚动条会向上层控件返回“VK_SCROLL_DOWN”消息宏
When the "left button" of the horizontal scroll bar is clicked, the scroll bar will return the message macro "VK_SCROLL_LEFT" to the upper-level control.
When the "middle button" of the horizontal scroll bar is dragged, the scroll bar will return the message macro "VK_SCROLL_HORZ_POS" to the upper-level control.
When the "left button" of the horizontal scroll bar is clicked, the scroll bar will return the message macro "VK_SCROLL_RIGHT" to the upper-level control.
When the "up button" of the vertical scroll bar is clicked, the scroll bar will return the message macro "VK_SCROLL_UP" to the upper-level control.
When the "middle button" of the vertical scroll bar is dragged, the scroll bar will return the message macro "VK_SCROLL_VERT_POS" to the upper-level control.
When the "down button" of the vertical scroll bar is clicked, the scroll bar will return the message macro "VK_SCROLL_DOWN" to the upper-level control.
|
|
2006-9-29 07:11 |
|
|
firstsail
高级用户
   
积分 668
发帖 295
注册 2005-7-26 来自 广东深圳
状态 离线
|
『第 129 楼』:
使用 LLM 解释/回答一下
(1)int CObject::SWapping()虚函数是所有控件的消息循环泵。
(2)窗口消息循环,就是不断地调用焦点控件的Swapping()函数。
(1) The virtual function int CObject::SWapping() is the message loop pump for all controls.
(2) The window message loop is to continuously call the Swapping() function of the focused control.
|
|
2006-9-29 07:15 |
|
|
firstsail
高级用户
   
积分 668
发帖 295
注册 2005-7-26 来自 广东深圳
状态 离线
|
『第 130 楼』:
关于“控件基类的消息泵”
使用 LLM 解释/回答一下
控件基类CObject的消息泵Swapping()函数源代码如下
int CObject::DefaultSwapping()
{
int nKey = 0;
int nX , nY;
if (AfxKbhit())
{
nKey = ::bioskey(0);
}
if (nKey != 0)
{
return (nKey);
}
::IsMouseDown(MOUSE_LEFT);
nX = ::GetMouseX();
nY = ::GetMouseY();
if ((SystemMouse.statue & MOUSE_LEFT) == MOUSE_LEFT)
{
if (this->IsClientRect(nX, nY))
{
nKey = VK_MOUSE_DOWN_LEFT;
}
else if (this->IsScreenRect(nX, nY))
{
nKey = VK_MOUSE_CLIENT_OUT;
if ((m_dwSort & WINDOW_SORT) != WINDOW_SORT)
{
nKey = 0;
}
}
else
{
nKey = VK_MOUSE_SCREEN_OUT;
}
}
else if ((SystemMouse.statue & MOUSE_RIGHT) == MOUSE_RIGHT)
{
if (this->IsClientRect(nX, nY))
{
nKey = VK_MOUSE_DOWN_RIGHT;
}
else if (this->IsScreenRect(nX, nY))
{
nKey = VK_MOUSE_CLIENT_OUT;
if ((m_dwSort & WINDOW_SORT) != WINDOW_SORT)
{
nKey = 0;
}
}
else
{
nKey = VK_MOUSE_SCREEN_OUT;
}
}
if (nKey != 0)
{
return (nKey);
}
nKey = this->VirtualKeyboard();
return(nKey);
}
int CObject::Swapping()
{
return(this->DefaultSwapping());
}
The source code of the message pump Swapping() function of the control base class CObject is as follows
int CObject::DefaultSwapping()
{
int nKey = 0;
int nX , nY;
if (AfxKbhit())
{
nKey = ::bioskey(0);
}
if (nKey != 0)
{
return (nKey);
}
::IsMouseDown(MOUSE_LEFT);
nX = ::GetMouseX();
nY = ::GetMouseY();
if ((SystemMouse.statue & MOUSE_LEFT) == MOUSE_LEFT)
{
if (this->IsClientRect(nX, nY))
{
nKey = VK_MOUSE_DOWN_LEFT;
}
else if (this->IsScreenRect(nX, nY))
{
nKey = VK_MOUSE_CLIENT_OUT;
if ((m_dwSort & WINDOW_SORT) != WINDOW_SORT)
{
nKey = 0;
}
}
else
{
nKey = VK_MOUSE_SCREEN_OUT;
}
}
else if ((SystemMouse.statue & MOUSE_RIGHT) == MOUSE_RIGHT)
{
if (this->IsClientRect(nX, nY))
{
nKey = VK_MOUSE_DOWN_RIGHT;
}
else if (this->IsScreenRect(nX, nY))
{
nKey = VK_MOUSE_CLIENT_OUT;
if ((m_dwSort & WINDOW_SORT) != WINDOW_SORT)
{
nKey = 0;
}
}
else
{
nKey = VK_MOUSE_SCREEN_OUT;
}
}
if (nKey != 0)
{
return (nKey);
}
nKey = this->VirtualKeyboard();
return(nKey);
}
int CObject::Swapping()
{
return(this->DefaultSwapping());
}
|
|
2006-9-29 07:24 |
|
|
profree
中级用户
  
积分 478
发帖 132
注册 2003-7-2
状态 离线
|
『第 131 楼』:
使用 LLM 解释/回答一下
一、SetDefaultFlags函数有问题,当把某一项设为默认后,按Tab键把焦点移到另外一项,再按回车,执行的并不是焦点所在项,而是设置的默认项,在跟我们现在使用的Windows对话框的操作是不一致的
二、关于鼠标动作的响应问题,应该是鼠标按下直到释放才执行(应该是release吧,现在的是press),比如说在一个按钮上,应该是在按钮内按下鼠标左键,直到左键释放,当然范围也应是在按钮范围内,如果在按钮范围外释放,则操作无效
I. There is a problem with the SetDefaultFlags function. When a certain item is set as the default, and then you use the Tab key to move the focus to another item and then press Enter, the item that is executed is not the one with the focus but the default item set, which is inconsistent with the operation of the Windows dialog boxes we are currently using.
II. Regarding the response problem of mouse actions, it should be that the mouse is pressed until released (it should be "release" instead of the current "press"). For example, on a button, you should press the left mouse button inside the button and then release it. Of course, the range should also be within the button range. If it is released outside the button range, the operation is invalid.
|
|
2006-9-29 22:12 |
|
|
firstsail
高级用户
   
积分 668
发帖 295
注册 2005-7-26 来自 广东深圳
状态 离线
|
『第 132 楼』:
使用 LLM 解释/回答一下
WinSail 已经重新上传 2006-09-29 13:00
(1)SetDefaultFlags()已经重新“修正”
(2)“进度条”类的名称,已由“CProcessCtrl”更名为正确的“CProgressCtrl”
WinSail has been re-uploaded on 2006-09-29 13:00
(1) SetDefaultFlags() has been re-"fixed"
(2) The name of the "progress bar" class has been changed from "CProcessCtrl" to the correct "CProgressCtrl"
|
|
2006-9-30 01:20 |
|
|
profree
中级用户
  
积分 478
发帖 132
注册 2003-7-2
状态 离线
|
『第 133 楼』:
使用 LLM 解释/回答一下
随时和“官方”保持同步更新。
使用哪种字体在哪里设置?在config.sys文件里设置的显示属性起效,但设置的字体不起作用,我只能把字体改为默认的display.fon
Keep in sync with the "official" at any time.
Where is the font set? The display properties set in the config.sys file take effect, but the set font doesn't work. I can only change the font to the default display.fon
|
|
2006-9-30 04:25 |
|
|
firstsail
高级用户
   
积分 668
发帖 295
注册 2005-7-26 来自 广东深圳
状态 离线
|
『第 134 楼』:
使用 LLM 解释/回答一下
To Profree:
由于历史原因,Config.Sys文件的[Display]段的Font键是“布尔值”,需要升级为“字符串”类型才行,计划明天早上前更前WinSail
比如说:
[Display]
Font = "Font\DisplayX.Fon" ; 使用宋体
请告诉我
hzk16C、Hzk16F、HZK16H、HZK16K、HZK16L、HZK16S
HZK16V、HZK16X、HZK16Y的字库中文名称是什么
To Profree:
Due to historical reasons, the Font key in the section of the Config.Sys file is a "boolean value" and needs to be upgraded to a "string" type. It is planned to update WinSail before tomorrow morning.
For example:
Font = "Font\DisplayX.Fon" ; Use Songti
Please tell me what the Chinese names of the font libraries hzk16C, Hzk16F, HZK16H, HZK16K, HZK16L, HZK16S, HZK16V, HZK16X, HZK16Y are
|
|
2006-9-30 04:49 |
|
|
profree
中级用户
  
积分 478
发帖 132
注册 2003-7-2
状态 离线
|
|
2006-9-30 05:14 |
|