devxlogo

Tip Bank

Pull a Date From SQL Server DateTime

SQL Server stores datetime data in 8 bytes. The first four bytes represent the date and the second four represent the time. To axe off the time part of the

Add a Tooltip for the MFC Dialog

This method works for the MFC derived class and was tested on a Dialog-based class. Set Active Project Select Project –>Add to Project –>Components and Controls –> VC++ Components –>

Adding C++ Specific Code into IDL Files

When you write an IDL file and need to add specific C++ code in the header file created after MIDL compilation, you can use the the cpp_quote(” “) IDL construct.

Avoid Nesting Errors

There are two very annoying–yet completely avoidable–nesting errors that occur in C/C++ programming.1) This one typically happens toward the end of the day, thereby making the day longer: for (int

Create a unique GUID

The System.Guid type exposes several shared and instance methods that can help you work with GUIDs, that is, those 128-bit numbers that serve to uniquely identify elements and that are

Building arrays on the fly

VB.NET supports the creation of arrays on-the-fly, by using the New operator. For example, look at the following code, that uses GDI methods to display few connected lines ‘ Get

Drawing Cardinal splines

GDI+ supports two different forms of a complex curve that can’t be represented as an arc of a circle or an ellipse: a cardinal spline and a B