|
-
August 21st, 2001, 03:03 PM
#1
Send A Window Message
I am trying to send a message from a MDI child window to the main window -- How do I do that? Is there a way with out using the API?
the reason is I have several MDI-Childs that represent an instrutment on a serial buss. All instrument must communicate via the same comport to my application (of several MDI-Childs windows). But I need to synronize the data going through the serial port.
(I'm somewhat new to Vb but worked in Visual C++ for a while. and I know too do it C++ but I must use vb)
Please help!
-
August 21st, 2001, 11:46 PM
#2
Re: Send A Window Message
In some cases, API is the best solution, why don't you use it ?.
Or you can create a public procedure in main form, so you ca call it from MDI child.
Please tell me how you do it in C++.
-
August 23rd, 2001, 03:29 PM
#3
Re: Send A Window Message
Thanks.. That was the sinple answer I was looking for.
I know I could use the API in basic -- But If I do that I might as well write the code in C. And I have to write this application in VB.
In C (MS Visual C++) I would define a user message, something like:
#define MSG_MY_MDI_MESSAGE WM_USER + 100
and define a function in the main window thread that is Mapped to this message.
Then send this message to the main window using the MFC call ::SendMessage
-
October 10th, 2001, 01:20 PM
#4
Re: Send A Window Message
You yourself said how to do it. thenwhy don't you use SendMessage or PostMessage in VB. or you don't know how to call APIs in VB???
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|