YOU CAN CODE!

 

With The Case Of UCanCode.net  Release The Power OF  Visual C++ !   HomeProducts | PurchaseSupport | Downloads  
Download Evaluation
Pricing & Purchase?
E-XD++Visual C++/ MFC Products
Overview
Features Tour 
Electronic Form Solution
Visualization & HMI Solution
Power system HMI Solution
CAD Drawing and Printing Solution

Bar code labeling Solution
Workflow Solution

Coal industry HMI Solution
Instrumentation Gauge Solution

Report Printing Solution
Graphical modeling Solution
GIS mapping solution

Visio graphics solution
Industrial control SCADA &HMI Solution
BPM business process Solution

Industrial monitoring Solution
Flowchart and diagramming Solution
Organization Diagram Solution

Graphic editor Source Code
UML drawing editor Source Code
Map Diagramming Solution

Architectural Graphic Drawing Solution
Request Evaluation
Purchase
ActiveX COM Products
Overview
Download
Purchase
Technical Support
  General Q & A
Discussion Board
Contact Us

Links

Get Ready to Unleash the Power of UCanCode .NET


UCanCode Software focuses on general application software development. We provide complete solution for developers. No matter you want to develop a simple database workflow application, or an large flow/diagram based system, our product will provide a complete solution for you. Our product had been used by hundreds of top companies around the world!

"100% source code provided! Free you from not daring to use components because of unable to master the key technology of components!"


CTucancode.netDialog in MFC in Visual C++ 2010

 
 
Windows Vista introduced the concept of Tucancode.net Dialogs. Those are a powerful replacement for the standard message boxes. The following is a list of features supported by tucancode.net dialogs:
  • Custom icon.
  • A header text that can spread over multiple lines.
  • A contents text that can spread over multiple lines.
  • An option to show a progress bar.
  • Options to show a list of radio buttons.
  • Options to show a list of command buttons.
  • An option to display an expand/collapse button to display/hide additional information.
  • An option to show a checkbox.
  • A footer text that can spread over multiple lines.
  • Support for hyperlinks within almost any part.
  • Support for a timer.

Almost everything above is optional to allow you to customize the look exactly like you want it.

The MFC in Visual C++ 2010 has a new class called CTucancode.netDialog that is a wrapper around the tucancode.net dialog API. It makes it pretty easy to show a tucancode.net dialog. Using this new class requires a Unicode build of your project. Unfortunately, there is no fallback mechanism for older versions of Windows. If you run an application using the CTucancode.netDialog class on Windows XP, you will get an error at the time the dialog should appear. If your application needs to run on older versions of Windows, you can use the CTucancode.netDialog::IsSupported() static function to determine if tucancode.net dialogs are supported or not and provide your own fallback.

This new class can be used as follows in its most simple form:

CTucancode.netDialog dlg(_T("The header"), _T("The contents."), _T("The title."));
dlg.DoModal();

This will show the following simple tucancode.net dialog.

The demo application which you can download below enables all optional options and the result looks like the following screenshot.

In my example I’m displaying a progressbar. To update the progressbar based on a timer, I derived a CMyTucancode.netDialog from CTucancode.netDialog and implemented the following virtual OnTimer function:

HRESULT CMyTucancode.netDialog::OnTimer(_In_ long lTime)
{
    m_iProgressPos += 2;
    if (m_iProgressPos >= 100)
        m_iProgressPos = 0;
    SetProgressBarPosition(m_iProgressPos);
    return S_OK;
}

The OnTimer function will be called roughly every 200 milliseconds. In my OnTimer function I update the position of the progressbar. You could also update the look of the progressbar to the error state using the SetProgressBarState function.

See the MSDN page for more details about the CTucancode.netDialog class.

The Visual Studio 2010 project below is a demo application of using tucancode.net dialogs.

CTucancode.netDialogDemo.rar

 

 

 

Copyright ?1998-2024 UCanCode.Net Software , all rights reserved.
Other product and company names herein may be the trademarks of their respective owners.

Please direct your questions or comments to webmaster@ucancode.net