window-messages

C++ Builder XE, Passing and handling user-defined messages

半城伤御伤魂 提交于 2019-12-01 01:13:21
I am trying to learn how to pass and handle messages in a VCL forms app. I've been digging the internet for some time and found this Suppose I have a progress bar I want to update using messages (btw if there's any other better way, I am eager to hear it) So I made a simple project to test the stuff and here's what I have (RECEIVER is a name of a form with progress bar, SENDER is a button used to send messages, updBar is a function to update progress bar, and 123456 is a message ID I want to use): Unit1.cpp: #include <vcl.h> #pragma hdrstop #include "Unit1.h" //--------------------------------

Looking for an alternative to windows messages used in inter-process communication

点点圈 提交于 2019-11-28 04:47:19
I a have a multithread application (MIDAS) that makes uses of windows messages to communicate with itself. MAIN FORM The main form receives windows messages sent by the RDM LogData(‘DataToLog’) Because windows messages are used they have the following attributes Received messages are Indivisible Received messages are Queued in the order they are sent QUESTION: Can you Suggest a better way doing this without using windows messages ? MAIN FORM CODE const UM_LOGDATA = WM_USER+1002; type TLogData = Record Msg : TMsgNum; Src : Integer; Data : String; end; PLogData = ^TLogData; TfrmMain = class

Looking for an alternative to windows messages used in inter-process communication

前提是你 提交于 2019-11-27 05:26:33
问题 I a have a multithread application (MIDAS) that makes uses of windows messages to communicate with itself. MAIN FORM The main form receives windows messages sent by the RDM LogData(‘DataToLog’) Because windows messages are used they have the following attributes Received messages are Indivisible Received messages are Queued in the order they are sent QUESTION: Can you Suggest a better way doing this without using windows messages ? MAIN FORM CODE const UM_LOGDATA = WM_USER+1002; type TLogData