在两个C ++程序之间交换消息 [英] Exchanging messages between two C++ programs

查看:105
本文介绍了在两个C ++程序之间交换消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是在C ++中创建Windows应用程序的新手。我的任务是写两个cpp文件,其中一个将发送一个数字(x)到另一个,另一个将评估f(x),并发送回第一个。我应该使用消息实现它。不能得到任何具体的在线,有人可以给我一个线索,从哪里开始?
Great thanx!

I am new to creating Windows applications in C++. My task is to write two cpp files, one of which will send a number (x) to the other one, the other one will evaluate f(x) and send it back to the first one. I should implement it using Messages. Couldn't get anything specific online, Could someone pls give me a clue, where to start? Great thanx!

推荐答案

你在谈论窗口消息吗?如果是,发送应用程序可以使用 SendMessage ,这将导致接收应用程序得到其窗口过程执行。当然,这意味着接收应用程序需要创建一个窗口,其窗口句柄以某种方式对发送应用程序可用。

Are you talking about window messages? If so, the sending app could use SendMessage, which would cause the receiving app to get its window procedure executed. Of course, this means that the receiving app needs to create a window whose window handle is somehow made available to the sending app.

这篇关于在两个C ++程序之间交换消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆