With The Case Of  Release The Power OF  Visual C++ !   HomeProducts | PurchaseSupport | Downloads  
Download Evaluation
Pricing & Purchase?
E-XD++Visual C++/ MFC Products
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
ActiveX COM Products
Technical Support
  General Q & A
Discussion Board
Contact Us


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!"

VC++ Game Sample Source Code, Wave File Play, Midi file play, DirectX

 Jörg König

Environment: VC++ 6

The Tetris Clone CGTetris

Sound & Music
Building the game
Changes in version 1.1

This game was born by a wish of my wife, an ultimate Tetris fan, to play a "nice" Tetris on the PC. Many clones of Tetris in the net were all not good enough (not nice :-),  boring or simply unplayable ...). Buying such a (comparatively trivial) game was not an option. So I developed a new clone of this great game.

The game includes a lot of code not developed by me. All these "stolen" codes came from the internet pages, and I think it's alright to use it. I will not mention all the developers, whose code is inside the game (I fear I will forget somebody). If you're interested, you might look into the sources to retrieve this information. Some parts of the "stolen" code were modified, so please refer to the related original article in the codeguru's pages rather than extracting it from the game's source!


To have a little bit of fun, your screen settings should support at least 256 colors. Hi- or true color would be much nicer.

Sound & Music

CGTetris makes a difference between sound and music. Sounds are implemented by using wave files (*.wav), while music is implemented by using MIDI files (*.mid) (You can see these files only in the source code distribution. In the game distribution they are built into the game.)
You need a soundcard to hear both, sounds and music.
Furthermore you need an installation of DirectX (at least version 3). Sounds are played via DirectSound. The advantages of DirectSound over the win32 API function PlaySound(), are its lower latency and the ability to mix sounds on the fly.
CGTetris does not install DirectX, because it is already installed on many hosts. If you don't have it right now, you might download it from microsofts home page.


In the current version (1.1) CGTetris is able to "speak" 3 languages. The default language is the one of the internet: English. The game is able to detect which is the current users default language. You only need a proper language DLL to make the game speak the right language.
Language Needed Language DLL
English none (default)
German German.lng
French   (since version 1.1) French.lng   (done by
list of currently available languages

The sources of the language DLLs are inside the source distribution. The DLLs are inside the setup procedure.

If you are interested in creating a language DLL for others than the supported languages, please let me know.

Building the game

Since the first publication of this game, I've got a lot of messages from people ucancode.neting me, why the sources won't compile. Well, you need service pack 3 for the developer studio (VC++ 6). This SP contains some bug-fixes the compiler has with STL and templates.

Changes in version 1.1

  • added french DLL (thanks to
  • some minor modifications in handling language DLLs


Now for the interesting part: the download. If you want to build the game by yourself (MS-VC++ 6 project), you might select the source code distribution (a ZIP file). Otherwise you can download the game's setup procedure. For all you cautious net surfers: The game is checked against bugs and viruses as good as one can check such things. The setup routine does not modify your system directories. An uninstall procedure will be installed, too. The installation routine was built with the publicly available setup toolkit GkSetup 1.60 (it took me just 5 minutes to build it!)

CGTetris is free software. You can redistribute it as long as it is not sold for profit without the authors written consent. The software does not include any warranty. Any damage (of what kind ever) resulting from the use of this software, rests entirely to the user.
Installable Game Source Project
CGTetris11.exe 738 KB CGTetris11src.zip340 KB



Copyright ?1998-2022 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