DLLPostMessage()

DLLPostMessage()
  • SYNOPSIS:
    succ = DLLPostMessage(hwndHandle,iMsg,[iFlags1],[iFlags2])
  • DESCRIPTION:
    Posts a message to any window or child window on the desktop! This command is so versatile that I cannot go into full depth here. Check the win32 API docs @ MSDN.
  • PARAMETERS:
    hwndHandle A hWnd handle to the window you want to post a message to.
    iMsg

    The message you want to post. There are so many of these they can't really be placed here. And a lot of them are as yet, unassigned in the include. But as a start, you can use the following message:

    WM_SYSCOMMAND - Sends a system message to the window as though the user had done it.

    iFlags1 (optional)

    Each individual message has different flags. Here are the flags for WM_SYSCOMMAND:

    SC_CLOSE - Closes the window.
    SC_CONTEXTHELP - Changes the cursor to a question mark with a pointer. If the user then clicks a control in the dialog box, the control receives a WM_HELP message.
    SC_DEFAULT - Selects the default item; the user double-clicked the window menu.
    SC_HOTKEY - Activates the window associated with the application-specified hot key. The low-order word of lParam identifies the window to activate.
    SC_HSCROLL - Scrolls horizontally.
    SC_KEYMENU - Retrieves the window menu as a result of a keystroke.
    SC_MAXIMIZE - (or SC_ZOOM) Maximizes the window.
    SC_MINIMIZE - (or SC_ICON) Minimizes the window.
    SC_MONITORPOWER - Windows 95 only: Sets the state of the display. This command supports devices that have power-saving features, such as a battery-powered personal computer.
    SC_MOUSEMENU - Retrieves the window menu as a result of a mouse click.
    SC_MOVE - Moves the window.
    SC_NEXTWINDOW - Moves to the next window.
    SC_PREVWINDOW - Moves to the previous window.
    SC_RESTORE - Restores the window to its normal position and size.
    SC_SCREENSAVE - Executes the screen saver application specified in the [boot] section of the SYSTEM.INI file.
    SC_SIZE - Sizes the window.
    SC_TASKLIST - Executes or activates Windows Task Manager.
    SC_VSCROLL - Scrolls vertically.

    iFlags2 (optional) More message specific flags. For example, the SC_MOVE flag, takes a packed long integer as flag2 which holds the X and Y of the new window coords. See win32 API docs for more info.
  • RETURNS:
    True or False.
  • EXAMPLE:
    See example008.bb.
  • BUGS:
    None Known.

Return To Index
Problems with this command or bugs? EMail me at: mailto:loki.sd@blueyonder.co.uk

Section Last Updated: Saturday, February 2, 2002 2:06 PM GMT

All materials used in this help, related sources and binaries are (C)opyright Rob Hutchinson, Joseph Cox and Tarropithium Software 2002. All rights reserved. All software is provided without warranty unless otherwise stated.
Tarropithium Software or the authors will not be held liable for any damage or data loss that may occur during the application of this software. Use it at your own risk!