Solved

SendMessage constants

Posted on 1999-01-18
8
1,032 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
[X]
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
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

756 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