四个WinAPI测试题

时间:2011-06-13 09:34:58

标签: winapi messages

以下是WinAPI测试测验的摘录。 我研究了很多,但没有找到答案:

    1. Which statement, regarding dynamic link libraries (DLL), is WRONG:
    a) DLLs can be used to exchange data between applications in Windows
    b) DLLs can call Windows modules
    c) DLLs can use DOS file functions
    d) DLLs can control a user dialog in Windows

    2. Which statement, regarding the messages in Windows, is WRONG:
    a) messages can be exchanged between the objects of an application
    b) messages can be generated when events happen
    c) messages can be exchanged between applications
    d) messages can be exchanged with the help of temporary queue storage

    3. Which statement, regarding the system message queue, is CORRECT:
    a) it serves for communication and exchange of messages between applications
    b) it serves for exchange of messages between common resources
    c) it serves for temporary storage of messages from the peripheral devices
    d) it serves for communication and exchange of messages between window objects

    4. In order to hide a window or a control, the following function is used:
    a) SetWindowHide
    b) HideWindow
    c) UnshowWindow
    d) DeleteWindow

我绝对肯定问题4是错的。 正确的答案是ShowWindow。

我几乎可以肯定,2根本没有正确答案。

我没有关于这些问题的其他细节或说明。

1 个答案:

答案 0 :(得分:1)

  • 1c上。 DLL主要用于共享公共代码,但存储在其中的对象只能在当前映射DLL实例的内存空间中本地使用。
  • 2a上。这个答案取决于你对这个问题的解释。严格来说,你可以。要发送消息,您只需要接收端有一个窗口,其中包含要发送的消息循环。例如,WM_COPYDATA是用于在对象之间交换数据的“种类”。如果您将接收窗口视为“对象”而发送者(不一定是一个窗口)也是一个“对象”,那么这就不成立了。
  • 3D。再次如上所述取决于您对“对象”的解释。可以从没有窗口的应用程序 发送消息。
  • 4 ..没有。您可以使用SetWindowPos()或更常用 ShowWindow()with SW_HIDE