Serialization of control...
Pyo Soon-Kyu -- black@hyundai.net
Wednesday, September 18, 1996
Enviroment: x86,Win 95,VC4.0
I'm tring to send my CTreeView( actually, CTreeCtrl )'s structure( hierarchy
) to another program in another machine using sockets.
I want to know if there is a SERIALIZATION of contorl which can be used as I
said. Also, where can I find the soruce of common controls?
If there is not, What could be the good data structure of tree so that I can
send it to others and they can easily re-draw the tree with it ?
Thanks in advance.
;-> ------------------------------------------------
Pyo Soon-Kyu
Tel : 82-2-561-5097 E-mail : black@hyundai.net
Fax : 82-2-554-7690 black@terius.hit.co.kr
Institute of Applied Information Technology
Hyundai Information Technology Inc.
------------------- Independence through knowledge -
Mike Blaszczak -- mikeblas@nwlink.com
Friday, September 20, 1996
At 08:52 AM 9/18/97 +0900, Pyo Soon-Kyu wrote:
>Enviroment: x86,Win 95,VC4.0
>I'm tring to send my CTreeView( actually, CTreeCtrl )'s structure( hierarchy
>) to another program in another machine using sockets.
You'll have to traverse the content of the control yourself and send a data
structure to the other machine yourself.
>I want to know if there is a SERIALIZATION of contorl which can be used as I
>said.
MFC doesn't provide any implementation for this.
>Also, where can I find the soruce of common controls?
The source for the Windows common controls, like almost all other parts of
the Windows operating systems, is Microsoft Confidential and not available
outside of the company, period.
>If there is not, What could be the good data structure of tree so
>that I can send it to others and they can easily re-draw the tree with it?
Where did the data come from to begin with? Why can't you use the same data
storage mechanism that you used to get the data into the application in the
first place?
Getting information into and out of the control is expensive, but you can
just use CTreeCtrl::GetNextItem() to do an in-place traversal of the content
of the control. You should concentrate on making sure that your algorithm
ends up working in-order because that would make it fast and easy to use
the previously touched item's handle to make sure you get the parent item
or insert-after handle for the new item correct.
>Thanks in advance.
Please buy me a hockey team. Thanks in advance.
.B ekiM
http://www.nwlink.com/~mikeblas/
Don't look at my hands: look at my _shoulders_!
These words are my own. I do not speak on behalf of Microsoft.
Mario Contestabile -- Mario_Contestabile.UOS__MTL@UOSMTL2.universal.com
Monday, September 23, 1996
>I'm tring to send my CTreeView( actually, CTreeCtrl )'s structure( hierarchy
>) to another program in another machine using sockets.
>I want to know if there is a SERIALIZATION of contorl which can be used as I
>said.
CTreeView is derived from CObject, thus inherits serialization.
void xx::Serialize( CArchive& ar )
{
CObject::Serialize( ar );
if( ar.IsStoring() ){
// For the _entire_ tree control,
// fill a TV_INSERTSTRUCT
ar << tvStruct;
}
}
>Also, where can I find the soruce of common controls?
\mfc\include\afxcmn.inl
would be a start.
>If there is not, What could be the good data structure of tree so that I can
>send it to others and they can easily re-draw the tree with it ?
TV_INSERTSTRUCT
>Thanks in advance.
Get me infinity speakers and a Carver amp, we'll call it even.
mcontest@universal.com
| Вернуться в корень Архива
|