Page 1 of 1

PostPosted: Wed Jun 20, 2001 1:14 am
by David
According to the API Document:

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

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

-David

PostPosted: Wed Jun 20, 2001 7:07 am
by Justinespinosa
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.

J.Espinosa

OUTS Softwares

PostPosted: Wed Jun 20, 2001 8:18 am
by guy
I recommend that you look at the documentation for the underlying Windows CE API call SendMessage(). You can read the Microsoft documentation at:

http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/winui/messques_8ht1.htm

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>.


Guy


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

Edited by - guy on 06/20/2001 03:30:30

PostPosted: Sat Jun 23, 2001 8:45 am
by David
Thanks,Guy.
This is a useful function and it would be nice if PocketC support using the "sendmsg" to handle the MDI child windows.

-David