Click here to Skip to main content
15,867,594 members
This competition has ended

Best C++/MFC article of August 2011

Contribute to CodeProject and you'll automatically be in the running for a monthly prize!

Each month at CodeProject we gather together the best of the articles submitted the previous month and ask our readers to choose the best of the best. Entry is automatic - just submit you articke and we'll do the rest.

Check out the submission guidelines for information on posting articles.

Current Entries

Articles that match the contest criteria are automatically entered.

Please Sign up or sign in to vote.
1 Aug 2011ThatsAlok 3 alternatives  
Describing various method to zeroing the buffer in memory
Please Sign up or sign in to vote.
17 Aug 2011Ger Hayden
This is a working example of a BLOB column on a DataGridView for a Windows Form using C++/CLI where data is drawn from an XML document.
Please Sign up or sign in to vote.
13 Aug 2011BWake
It is a bad idea to treat built-in types differently than programmer defined classes. If you delete a dynamically allocated array of a built-in type without the brackets the memory buffer may go away just fine. This is not guaranteed. The VS2008 runtime throws an exception. There is a...
Please Sign up or sign in to vote.
15 Aug 2011Caner Korkmaz 4 alternatives  
How to open the Internet browser from code.
Please Sign up or sign in to vote.
18 Aug 2011thatraja
Given below is code for opening the Internet browser programmatically in VB 6 and VB.NET.VB 6Private Declare Function ShellExecute Lib "shell32.dll" Alias _ "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _ ByVal lpFile As String, ByVal lpParameters As...
Please Sign up or sign in to vote.
9 Aug 2011YvesDaoust
What about this, using SSE2 assembly (32 bits):void Zero(void* Buffer, int Count){ char* Cur= (char*)Buffer; char* End= (char*)Buffer + Count; // Clear the initial unaligned bytes while (Cur
Please Sign up or sign in to vote.
8 Aug 2011Esteban Alvarez
Low cost design of useful utility classes
Please Sign up or sign in to vote.
15 Aug 2011Kevin Marois
You're incorrect. Explorer is Windows Explorer, not Internet Explorer. Try this:System.Diagnostics.Process.Start("explorer");then this:System.Diagnostics.Process.Start("iexplore.exe", "http://www.codeproject.com");and this:System.Diagnostics.Process.Start("winword.exe",...
Please Sign up or sign in to vote.
30 Aug 2011ILa @ work
This nice trick extends into://*/block 1/*/block 2; // commented out/*/block 3;/*/block 4; // commented out//*/and removing the first slash gives inverted alternation:/*/block 1; // commented out/*/block 2;/*/block 3; // commented out/*/block...
Please Sign up or sign in to vote.
21 Aug 2011murtaza dhari
A generic dropdown control using LINQ to SQL and Entities using Reflection
Please Sign up or sign in to vote.
4 Aug 2011deveck
How to include a scripting engine in your own application
Please Sign up or sign in to vote.
5 Aug 2011The_Mega_ZZTer
Version check is wrong. It happens to work correctly only because no minor versions of Windows 5 were released after 5.1 (AFAIK... are Windows Server 2003 and Embedded XP and Media Center XP still 5.1?). A theoretical version 5.2 would fail the check. I submit the following...
Please Sign up or sign in to vote.
17 Aug 2011Michael B. Hansen
If I remember correctly, then I had some issues with the above method some years ago. It would not always work on some systems.I personally use the following method to get the EXE path to the system's default browser:public static string GetDefaultBrowser(){ string browser =...
Please Sign up or sign in to vote.
8 Aug 2011Bojan Banko
Sudoku solver via a webcam: A nice computer vision application
Please Sign up or sign in to vote.
27 Oct 2013Bernhard Häussermann
A set of source files that extends the UITableView so that it has sections that can be collapsed and expanded.
Please Sign up or sign in to vote.
5 Jan 2014Christopher Camacho
A class derived from CListCtrl that allows edit controls, combo boxes, check boxes, date pickers, and color pickers to be inserted into or removed from particular cells extremely easily. The inserted 'controls' are not CWnd-derived.
Please Sign up or sign in to vote.
24 Sep 2011Calinyara
This article shows how to change the pitch and tempo of a sound.
Please Sign up or sign in to vote.
21 Sep 2011Santhosh G_
Implementation of different interpolations[Bi-Linear and Bi-Cubic] with OpenGL.
Please Sign up or sign in to vote.
24 Apr 2017Orjan Westin
Using template specialization to create code handling common base64 encoding varieties
Please Sign up or sign in to vote.
25 Aug 2011Caner Korkmaz 1 alternative  
C++ -> Drawing Rectangles to Console
Please Sign up or sign in to vote.
15 Nov 2011Caner Korkmaz
For debug use, you can do something like this:#ifdef DEBUG #define dprintf(...) printf(__VA_ARGS__)#else #define dprintf(...)#endif//Usage:dprintf("In debug mode.");//orchar *foo = "foo";dprintf("%d bar.",foo);// :)/*Edit reason :: *if you type...
Please Sign up or sign in to vote.
2 Aug 2011Charles Oppermann
How to check Windows 7 version in Visual C++
Please Sign up or sign in to vote.
16 Aug 2011matt_taws
Isn't it more easy to just do:return nStatus == NERR_Success
Please Sign up or sign in to vote.
25 Aug 2011Doc Lobster
An introduction to advanced template metaprogramming using an explanatory project
Please Sign up or sign in to vote.
2 Aug 2011trotwa
char szTest[128] = { 0 };;)
Please Sign up or sign in to vote.
25 Aug 2011Ger Hayden
This is a working example of of a DataGridView on a Windows Form where the dropdown list on a combobox coluum changes during execution, written using C++/CLI.
Please Sign up or sign in to vote.
15 Aug 2011kbo-mvs
I use this one in C++ (has the advantage that you can use your preferred browser ;-):ShellExecute (NULL, NULL, _T("http://www.codeproject.com"), NULL, NULL, SW_SHOWNORMAL);
Please Sign up or sign in to vote.
25 Aug 2011Mehdi Khalili
In this article, I will cover some of the basic features of Fiddler.
Please Sign up or sign in to vote.
7 Aug 2011forest.house
This article illustrates the application of ATL/WTL by building a simple text editor based on the WTL objects
Please Sign up or sign in to vote.
23 Aug 2011Jose David Pujo
I always use a home-made macro to zero my struct's and class's:#define ZEROMEMORY ZeroMemory (this, sizeof (*this))Sample1:struct S1 { double x; long i; char s[255+1]; S1 () { ZEROMEMORY; } };Sample2:class foo { private: double x[16]; char a,b,c; foo () {...
Please Sign up or sign in to vote.
13 Aug 2011AngusEm
A C++ class that can perform k-permutations of n on a set
Please Sign up or sign in to vote.
26 Aug 2011Ion_tichy
Xsd2Struct is a software for the creation and run-time processing of an external description data structure.
Please Sign up or sign in to vote.
15 Aug 2011Ștefan-Mihai MOGA
How to find a substring in a text, forward and backward, with Case Sensitive and Match Whole Word options.
Please Sign up or sign in to vote.
25 Aug 2011Jose David Pujo
Smaller code:void DrawRect(int x, int y, int width, int height, int curPosX=0, int curPosY=0){ setxy(x, y); cout

Current Participants

Those with articles that match the contest criteria are automatically entered.

Software Developer (Senior)
India India
He used to have biography here Smile | :) , but now he will hire someone (for free offcourse Big Grin | :-D ), Who writes his biography on his behalf Smile | :)

He is Great Fan of Mr. Johan Rosengren (his idol),Lim Bio Liong, Nishant S and DavidCrow and Believes that, he will EXCEL in his life by following there steps!!!

He started with Visual C++ then moved to C# then he become language agnostic, you give him task,tell him the language or platform, he we start immediately, if he knows the language otherwise he quickly learn it and start contributing productively

Last but not the least, For good 8 years he was Visual CPP MSMVP!
Software Developer (Senior)
Canada Canada
Angus March is a computer engineer in Ottawa.
Software Developer Digiata, Blue Owl Software
South Africa South Africa
Bernhard holds an Hons BSc in Computer Science and is a full-time C# .NET developer at Digiata.
After-hours he does iOS and Mac OS X development for Blue Owl Software. He also enjoys playing the piano.
Skilja
Croatia Croatia
Programmer since 1994.
Software Developer (Senior)
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
China China
E-mail:calinyara@gmail.com
Student
Turkey Turkey
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Program Manager
United States United States
Charles Oppermann is a 25-year veteran of software design. He is the original author of JAWS, the popular screen reader for people with visual impairments, and spent over a decade at Microsoft working on accessibility and user experience in the Windows, Internet Explorer and speech product groups.

Charles was a founding representative to the W3C and Web Accessibility Initiative (WAI), and the author of two technical books published by Microsoft Press. He has also worked at Cisco Systems, Amazon.com, and is currently direct test automation efforts at Malwarebytes.
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Student
Austria Austria
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Software Developer
Germany Germany
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Software Developer (Senior)
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
China China
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Software Developer
Ireland Ireland
My first program was written in Basic on a Sinclair Spectrum ZX 16K in the summer of '85. Having studied Computer Systems I attempted to break into the world of C but took a wrong turn and got immersed in COBOL!

I looked a C again in 1994 but didnt follow up on it. In 2001 I introduced myself to Visual C++ 6.0 courtesy of Ivor Hortons book, but found the going difficult. I tipped my toe in the .NET water in '05 but the first example I tried in VC++ 2005 express didnt work and allied with the absence of MFC in the express package, I parked that up.

Along the way my career got shunted into software testing

A personal machine change force me to migrate to VS2008 in 2008. The new edition of Ivor Hortons book for VC++ in VS2008 reintroduced me to .NET and I got curious whereupon I went out and acquired Stephen Fraser's "Pro Visual C++/CLI and
the .NET 3.5 Platform". I was hooked!

After 20 years I think I finally found my destination.

But it would take a further 8 years of exile before I was reappointed to a developer role. In that time I migrated to C# and used selenium wedriver (courtesy of Arun Motoori's Selenium By Arun) as the catalyst to finally grab the opportunity.
Engineer
Netherlands Netherlands
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Software Developer (Senior)
Israel Israel
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Software Developer (Senior) Freelancer
Spain Spain
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Web Developer
Germany Germany
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
CEO Marois Consulting
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Chief Technology Officer Genie solutions
Australia Australia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Founder CWAIN
Denmark Denmark
I have a MCPD .NET 3.5 EAD and a Bsc in computer science, organizational theory and economics.
After more than 24 years working as professional system engineer, I founded the independent consultant agency CWAIN.
Software Developer
Pakistan Pakistan
Ali, Murtaza Tahir

http://murtazadharis.blogspot.com/
Software Developer (Senior)
Sweden Sweden
Orjan has worked as a professional developer - in Sweden and England - since 1993, using a range of languages (C++, Pascal, Delphi, C, C#, Visual Basic, Python and assemblers), but tends to return to C++.
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Software Developer NXP Semiconductors
Romania Romania
My professional background includes knowledge of analyst programmer for Microsoft Visual C++, Microsoft Visual C#, Microsoft Visual Basic, Sun Java, assembly for Intel 80x86 microprocessors, assembly for PIC microcontrollers (produced by Microchip Inc.), relational databases (MySQL, Oracle, SQL Server), concurrent version systems, bug tracking systems, web design (HTML5, CSS3, XML, PHP/MySQL, JavaScript).
Team Leader
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Germany Germany
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
CEO VISION fOr VISION
Belgium Belgium
I fell into applied algorithmics at the age of 16 or so. This eventually brought me to develop machine vision software as a professional. This is Dreamland for algorithm lovers.
You must sign in to participate in this contest.
This contest has ended.
1 Aug - 31 Aug 2011