Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

SendMessage constants

Posted on 1999-01-18
8
1,021 Views
Last Modified: 2012-08-13
Please could someone tell me of a resource on the Internet which explains the API function SendMessage including the definitions of all/ most of the constants (e.g. WM_CLOSE, WM_SETREDRAW)
0
Comment
Question by:YourMajesty
  • 3
  • 3
  • 2
8 Comments
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1469152
support.microsoft.com
0
 

Author Comment

by:YourMajesty
ID: 1469153
Please can you elaborate as I have tried the search facility with no success.
0
 

Accepted Solution

by:
Eyalt earned 50 total points
ID: 1469154
I hope this will hep U :
for any other information, just ask...

SendMessage
------------------------------

The SendMessage function sends the specified message to a window or windows. The function calls the window procedure for the specified window and does not return until the window procedure has processed the message. The PostMessage function, in contrast, posts a message to a thread's message queue and returns immediately.

LRESULT SendMessage(

    HWND hWnd,      // handle of destination window
    UINT Msg,      // message to send
    WPARAM wParam,      // first message parameter
    LPARAM lParam       // second message parameter
   );      
 

Parameters

hWnd

Identifies the window whose window procedure will receive the message. If this parameter is HWND_BROADCAST, the message is sent to all top-level windows in the system, including disabled or invisible unowned windows, overlapped windows, and pop-up windows; but the message is not sent to child windows.

Msg

Specifies the message to be sent.

wParam

Specifies additional message-specific information.

lParam

Specifies additional message-specific information.

 

Return Values

The return value specifies the result of the message processing and depends on the message sent.

Remarks

Applications that need to communicate using HWND_BROADCAST should use the RegisterWindowMessage function to obtain a unique message for inter-application communication.
If the specified window was created by the calling thread, the window procedure is called immediately as a subroutine. If the specified window was created by a different thread, Windows switches to that thread and calls the appropriate window procedure. Messages sent between threads are processed only when the receiving thread executes message retrieval code. The sending thread is blocked until the receiving thread processes the message.

WM_CLOSE  
-------------------

The WM_CLOSE message is sent as a signal that a window or an application should terminate.

WM_CLOSE  
 

Parameters

This message has no parameters.

Return Values

If an application processes this message, it should return zero.

Default Action

The DefWindowProc function calls the DestroyWindow function to destroy the window.

Remarks

An application can prompt the user for confirmation, prior to destroying a window, by processing the WM_CLOSE message and calling the DestroyWindow function only if the user confirms the choice.


WM_SETREDRAW  
-------------------------------

An application sends the WM_SETREDRAW message to a window to allow changes in that window to be redrawn or to prevent changes in that window from being redrawn.

WM_SETREDRAW  
wParam = (WPARAM) fRedraw;  // state of redraw flag
lParam = 0;                 // not used; must be zero
 

Parameters

fRedraw

Value of wParam. Specifies the state of the redraw flag. If this parameter is TRUE, the redraw flag is set. If the parameter is FALSE, the flag is cleared.

 

Return Values

An application should return zero if it processes this message.

Remarks

This message sets or clears the redraw flag. If the redraw flag is cleared, the content of the given window is not updated after each change, and the window is not repainted until the redraw flag is set. For example, an application that must add several items to a list box can clear the redraw flag, add the items, and then set the redraw flag. Finally, the application can call the InvalidateRect function to cause the list box to be repainted.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:YourMajesty
ID: 1469155
Eyalt,

Brilliant stuff. Can you give the definitions of all constants if it's not too much trouble ?

Thanx
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1469156
You have the API text viewer, in there you can find the messages.
You can now go to support.microsoft.com and type the name of what you are looking for. e.g. WM_CLOSE or something you will find the information as Eyalt posted. That information was copied from the MSDN
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1469157
BTW: there are >1000 messages, nobody is going to post the entire information.
0
 

Expert Comment

by:Eyalt
ID: 1469158
I don't know about support.microsoft.co,  
I used the help file : win32.hlp (~12M)  (U can search for it
on the internet!)
0
 

Author Comment

by:YourMajesty
ID: 1469159
For anyone's information I was able to download the win32.hlp file from ftp://ftp.borland.com/pub/delphi/techpubs/delphi2/
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question