Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SendMessage constants

Posted on 1999-01-18
8
Medium Priority
?
1,083 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 200 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

Independent Software Vendors: 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!

Question has a verified solution.

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

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…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

972 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