11.04.2014 Views

Advanced MFC Programming

Advanced MFC Programming

Advanced MFC Programming

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 16. Context Sensitive Help<br />

);<br />

We need to pass different types of data to parameters pData, cbData, wFmt and wType for different<br />

types of transactions. If the transaction requires the client to pass data to the server (Besides data request<br />

transaction, there exist other transactions that can be used by the client to send data to server), we need to<br />

use parameters pData and cbData to pass the data, and use parameter wFmt to specify the data format. If the<br />

client is requesting data from the server, it should specify the format of data by passing standard or userdefined<br />

format to parameter wFmt. In case the client is not sending data to the server, we can neglect<br />

parameters pData and cbData. Parameter wType can be used to specify the type of transaction the client is<br />

requesting from the server. In the case of data request transaction, this parameter must be set to<br />

XTYP_REQUEST. The meanings of the rest four parameters are the same for all types of transactions, which<br />

are listed in the following table:<br />

Parameter<br />

hConv<br />

hszItem<br />

dwTimeout<br />

pdwResult<br />

Meaning<br />

Conversation handle obtained from function ::DdeConnect()<br />

Handle of the item name which is obtained from function ::DdeCreateStringHandle(…)<br />

Specifies how long the client will wait before the function returns, specific for synchronous<br />

transmission<br />

A pointer that can be used to retrieve the result of the transaction<br />

466

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!