当子控件超过32767宽度时,自动滚动不起作用

时间:2013-11-27 09:19:22

标签: c# .net visual-studio-2008 scrollbar panel

我正在使用面板和自动滚动来在位图编辑器中打印文本(位图编辑器 - 由我创建的用于以省略号打印文本的控件)。我的问题是当位图编辑器的宽度超过32767时,文本被忽略或者没有显示在位图编辑器中。

是否可以使用除面板之外的自动滚动,或者请任何人帮我解决此问题。

非常感谢帮助我......

1 个答案:

答案 0 :(得分:0)

在最后,我得到了上述错误的原因。

LPARAM - 用于将消息参数传递给Windows过程的Windows数据类型。           它是一个32位指针,它将消息作为两部分传递           即高位(32位的前16位)和                  低阶(32位的第二个16位)。

      Where 
           High order is used to pass the height of the control and
           Low order is used to pass the width of the control

因此,如果控件的高度或宽度超过32762size,则显示错误 因为

32767 is the highest number that can be represented in a signed 16bit integer.