Click here to Skip to main content
15,883,955 members
Articles / Desktop Programming / MFC

UMLEditor - revisiting the vector editor

Rate me:
Please Sign up or sign in to vote.
4.99/5 (156 votes)
5 Jul 2006Public Domain8 min read 375.9K   37.1K   326  
An UML editor with code-generation capabilities derived from CDiagramEditor.
<html>
<head>
<style>
body{font-size: 10pt;color: black;font-family: Verdana, Helvetica, Arial, sans-serif;background-color: #ffffff}
p{font-size: 10pt;color: black;font-family: Verdana, Helvetica, Arial, sans-serif;}
h2{font-size: 13pt;color: #ff9900;font-family: Verdana, Helvetica, Arial, sans-serif;font-weight: bold;}
h3{color: #ff9900;font-weight: bold;font-size: 11pt;font-family: Arial, sans-serif;}
table{background-color:#f0f0ff;}
td{font-size: 10pt;color: black;font-family: Verdana, Helvetica, Arial, sans-serif;padding:4px;}
pre{padding-right: 7pt;padding-left: 7pt;padding-bottom: 7pt;font: 9pt 'Courier New', Courier, mono;width: 100%;padding-top: 7pt;white-space: pre;background-color: #fbedbb}
code{color: #990000;font-family: 'Courier New', Courier, mono;}
A:link{text-decoration: none}
A:visited{text-decoration: none}
A:active{text-decoration: underline}
A:hover{text-decoration: underline}
A.top:link{font-size:8pt;color:red;font-family:Verdana,Helvetica,Arial,sans-serif;}
A.top:visited{font-size:8pt;color:red;font-family:Verdana,Helvetica,Arial,sans-serif;}
A.top:active{font-size:8pt;color:red;font-family:Verdana,Helvetica,Arial,sans-serif;}
A.top:hoover{font-size:8pt;color:red;font-family:Verdana,Helvetica,Arial,sans-serif;}
</style>
</head>
<body>
<h2>CGeneratorDlg</h2><h3>Overview</h3>
<blockquote>
<b>Purpose</b><br>
<code>CGeneratorDlg</code>, derived from <code>CDialog</code>, wraps the dialog used when the application is started from the command line.<br>
<p><b>Description</b><br>
A standard Wizard-generated class.<br>
<p><b>Usage</b><br>
Set up <code>m_input</code> and <code>m_output</code> with the in- and output directories respectively. Start with <code>DoModal</code>. For most generations, the dialog will probably not be displayed.
<p><a class='top' href='index.html'>[back to the index page]</a>
</blockquote>
<a name='contents'></a><h3>Contents</h3>
<b>- D -</b><br>
<a href='#DoDataExchangeCDataExchangepDX'>DoDataExchange(CDataExchange* pDX)</a><br>
<p>
<b>- O -</b><br>
<a href='#OnInitDialog'>OnInitDialog()</a><br>
<a href='#OnStartGenerationWPARAMLPARAM'>OnStartGeneration( WPARAM, LPARAM )</a><br>
<p>
<b>- R -</b><br>
<a href='#RegisterWindowMessage_TUDM_START_GENERATION'>RegisterWindowMessage( _T( "UDM_START_GENERATION" ) );</a><br>
<p><h3>Functions</h3><hr>
<code><b><a name='DoDataExchangeCDataExchangepDX'></a>void DoDataExchange(CDataExchange* pDX)</b></code>
<blockquote>
<b>Description</b><br>
Data-exchange handler for the dialog.
<br><b>Access</b><br>
Protected
<br><br><b>Parameters</b><br>
<code>CDataExchange* pDX </code> - <br>
<b>Returns</b><br>
void
<br><br><b>Usage</b><br>
Called from MFC<p>
<a class='top' href='#contents'>[back to the contents]</a>&nbsp;<a class='top' href='index.html'>[back to the index page]</a></p>
</blockquote>
<hr>
<code><b><a name='OnInitDialog'></a>BOOL OnInitDialog()</b></code>
<blockquote>
<b>Description</b><br>
Handler for the <code>WM_INITDIALOG</code>-message.
<br><b>Access</b><br>
Protected
<br><br><b>Parameters</b><br>
none<br>
<b>Returns</b><br>
<code>BOOL </code> -  Always TRUE
<br><br><b>Usage</b><br>
Will post the registered message <code>UDM_START_GENERATION</code> to start the generation.<p>
<a class='top' href='#contents'>[back to the contents]</a>&nbsp;<a class='top' href='index.html'>[back to the index page]</a></p>
</blockquote>
<hr>
<code><b><a name='OnStartGenerationWPARAMLPARAM'></a>LRESULT OnStartGeneration( WPARAM, LPARAM )</b></code>
<blockquote>
<b>Description</b><br>
Handler for the registered message <code>UDM_START_GENERATION</code>. Starts the generation and closes the dialog when finished.
<br><b>Access</b><br>
Protected
<br><br><b>Parameters</b><br>
<code>WPARAM </code> -  Not used<br><code>LPARAM </code> -  Not used<br>
<b>Returns</b><br>
<code>LRESULT </code> -  Always 0
<br><br><b>Usage</b><br>
The message is posted from <code>OnInitDialog</code>.<p>
<a class='top' href='#contents'>[back to the contents]</a>&nbsp;<a class='top' href='index.html'>[back to the index page]</a></p>
</blockquote>
<hr>
<code><b><a name='RegisterWindowMessage_TUDM_START_GENERATION'></a>UINT UDM_START_GENERATION = RegisterWindowMessage( _T( "UDM_START_GENERATION" ) );</b></code>
<blockquote>
<b>Description</b><br>
Constructor
<br><b>Access</b><br>
Public
<br><br><b>Parameters</b><br>
<code>CWnd* pParent </code> -  Parent of the dialog<br>
<b>Returns</b><br>
void
<br><br><b>Usage</b><br>
Created by the application<p>
<a class='top' href='#contents'>[back to the contents]</a>&nbsp;<a class='top' href='index.html'>[back to the index page]</a></p>
</blockquote>
<hr>
<b><small>Copyright 2004 Johan Rosengren Abstrakt Mekanik AB</small></b>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under A Public Domain dedication


Written By
Software Developer (Senior) Abstrakt Mekanik AB
Sweden Sweden
45 years old, married, three kids.

Started with computers more than 20 years ago on a CBM-64.

Read Theoretical Philosophy at the University of Lund.

Working as a C++ consultant developer.

Science-fiction freak. Enjoy vintage punkrock.

Comments and Discussions