[Question]API sendmsg

Discuss PocketC for CE (including Desktop Edition)

Postby David on Wed Jun 20, 2001 1:14 am

According to the API Document:

sendmsg(int nID, int nMsg, anytype wparam, anytype lparam)
[int nID] window control ID [int nMsg] window control message [anytype wparam] message dependent value [anytype lparam] message dependent value
sendmsg sends a specific message to a window control, and it will not return until the message has been processed.
return value is depend on the specific message is sent

Can anyone explain how to use this GUI function?Thanks.

Posts: 26
Joined: Sat Jun 02, 2001 1:14 pm

Postby Justinespinosa on Wed Jun 20, 2001 7:07 am

Well, it's easy. just find a message in windefs.h i.e. EM_COPY which means EditMessage_COPY. send it to the edit control you have created with sendmsg(ID,EM_COPY,1,1) (the parameters are useless here) and then the control will execute your message so here it will copy the selected text into the clipboard.
Some message are already in built-in PocketC functions i.e. editset() can be used with sendmsg and the appropriate windows message.


OUTS Softwares

OUTS Softwares
Posts: 156
Joined: Wed Dec 06, 2000 2:30 pm
Location: Switzerland

Postby guy on Wed Jun 20, 2001 8:18 am

I recommend that you look at the documentation for the underlying Windows CE API call SendMessage(). You can read the Microsoft documentation at:


To see which messages each control supports, use the table of contents on the left of the page to select:

Platform SDK documentation
- User interface services
-- Windows user interface
--- Controls
---- The control of your choice

Or, for the common controls (status bars etc):

Platform SDK documentation
- User interface services
-- Windows Common Controls
--- The common control of your choice

You should note that not all messages can be sent from PocketC, anything that requires a pointer to an array or structure in the <i>lparam</i> won't work.

What PocketC calls <i>controls</i>, Microsoft often calls <i>Windows</i>.


Edited by - guy on 06/20/2001 03:21:55

Edited by - guy on 06/20/2001 03:30:30
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum
Posts: 879
Joined: Thu Dec 07, 2000 8:58 am
Location: United Kingdom

Postby David on Sat Jun 23, 2001 8:45 am

This is a useful function and it would be nice if PocketC support using the "sendmsg" to handle the MDI child windows.

Posts: 26
Joined: Sat Jun 02, 2001 1:14 pm

Return to PocketC for CE

Who is online

Users browsing this forum: No registered users and 1 guest