关于自定义消息:If your application is marked version 4.0, you can use range 0x8000 (WM_APP) through 0xBFFF for private message

fayeflash 2006-08-12 04:20:08
请问If your application is marked version 4.0这里的version是什么意思?有有什么说道?谢谢!
...全文
159 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
HsWong 2006-08-12
  • 打赏
  • 举报
回复
Windows defines WM_APP like so:

#if (WINVER >= 0x0400)
#define WM_APP 0x8000
#endif

As every Windows geek knows, WINVER 0x0400 is Windows 95, Windows 98, and Windows NT®

Mircrosoft里一段自动翻译:

在 MicrosoftWindows 环境, 应用程序不调用 RegisterWindowMessage API 定义供自己使用专用消息。 0 x 8000 和 0xBFFF 之间消息数字被保留用于此目的。

对于 WindowsNT 和 Windows 95, 系统定义新邮件 WM_APP (值 0 x 8000)。 可以使应用程序的 WM_APP 通过 0xBFFF 范围用于专用消息不冲突。 唯一要求是 .EXE 文件, 必须标记 (使用链接器开关 /subsystem:windows, 4.0 版本 4.0。 Windows NT 3.5 和 3.51 和 Windows 95 将运行标记 4.0 应用程序




GARNETT2183 2006-08-12
  • 打赏
  • 举报
回复
没见过这个,关注.. .
fayeflash 2006-08-12
  • 打赏
  • 举报
回复
谢谢楼上的解答,不过我还是没有怎么明白。我当时看见这句话的时候是这么说的
Platform SDK: Windows User Interface


Application-Defined MessagesAn application can create messages to be used by its own windows or to communicate with windows in other processes. If an application creates its own messages, the window procedure that receives them must interpret the messages and provide appropriate processing.

Message-identifier values are used as follows:

The system reserves message-identifier values in the range 0x0000 through 0x03FF (the value of WM_USER - 1) for system-defined messages. Applications cannot use these values for private messages.
Values in the range 0x0400 (the value of WM_USER) through 0x7FFF are available for message identifiers for private window classes.
If your application is marked version 4.0, you can use message-identifier values in the range 0x8000 (WM_APP) through 0xBFFF for private messages.
The system returns a message identifier in the range 0xC000 through 0xFFFF when an application calls the RegisterWindowMessage function to register a message. The message identifier returned by this function is guaranteed to be unique throughout the system. Use of this function prevents conflicts that can arise if other applications use the same message identifier for different purposes

而你说的:
在 MicrosoftWindows 环境, 应用程序不调用 RegisterWindowMessage API 定义供自己使用专用消息。 0 x 8000 和 0xBFFF 之间消息数字被保留用于此目的。

我有点不明白。


对于 WindowsNT 和 Windows 95, 系统定义新邮件 WM_APP (值 0 x 8000)。 可以使应用程序的 WM_APP 通过 0xBFFF 范围用于专用消息不冲突。 唯一要求是 .EXE 文件, 必须标记 (使用链接器开关 /subsystem:windows, 4.0 版本 4.0。 Windows NT 3.5 和 3.51 和 Windows 95 将运行标记 4.0 应用程序

这句话我也不是很明白,能不能说的简单点,或者把e文搞出来看看,谢谢先。

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧