devxlogo

We are an award-winning tech entrepreneurship website where trusted experts can provide value globally.

Since 1998, DevX has helped people start businesses, build websites, and provide enterprise technology to people globally. Interviewing the likes of Microsoft’s co-founder, Steve Ballmer, the publication brings comprehensive, reliable, and accessible insights to the Internet.

devxlogo

Trusted for 26 years

Over 30K Articles

1M+ Readers

Expert-reviewed

10K+ Tech Terms

As seen in:

microsoft logo
business_insider_logo
wired_logo
berkley
arstechnica_logo
hackernoon

The Latest

int and class defination

Question: Why is int 2 bytes with real mode compilers, but 4 bytes with protected mode compilers? And why is the class defination ended with ;-mark, since other definations aren’t?

Windows sound programming.

Question: When writing a Windows 95 program using VC++, how do you play a MIDI sound file? Answer: Musical Instrument Digital Interface (MIDI) is a standard used by electronic keyboards

Terminate and Stay Resident Programs

Question: Can you supply me with boilerplate code for a simple console tsr program? I’m using VC++ 4.0, and I want to create a console program to check a directory

Static initialization and free store

Question: Is it valid to attempt to allocate (via ‘new()’) dynamic memory prior to ‘main()’? I am working on software that has static *’s to class objects, and through some

Making a file circular

Question: I want to make a log file circular using C++ I/O manipulation. I am new to C++ and come from a C background. To me stream I/O is completely

Right shift

Question: Can you tell me how to write a program that right-shifts an integer variable 4 bits? The program should print the integer in bits before and after the shift

Difference between C++ and HTML

Question: What are the main differences between C++ and HTML? If I can use HTML, how hard will it be for me to use C++? Answer: For the most part,

Determining if a ToElement Exists

Question: In a VBScript function I assign the window.event.ToElement to an object for some functionality. The problem is that if the mouse is moved outside of the browser window, the

Selecting and Moving Parts of a String

Question: I have two TField400s. The first TField400 contains the value “12345678” and other TField400 contains the value “11111111”. I want to move the “5678” from the first TField400 and

Event Handling for Dynamically Added Objects

Question: I have used InsertAdjacentHTML to insert a dynamic number of images onto a page in Internet Explorer 4. Having given the new images a single ID, I can refer

Dynamically Change Another Opened Window

Question: I am having trouble creating a site where customers can click something in a parent window and have a picture appear in another child window. I then want customers

Single Quote Marks in a SQL Query

Question: I have built several pages that use VBScript to pull information from a Microsoft Access database. My problem is that if a user tries to use a single quote

16/32 Bit Strings

Question: Is there a difference in the way that strings are passed between an application written in Delphi 1.0 and a DLL and between an application written in Delphi 3.0

Swing, Pluggable Look & Feel

With Swing, you can easily change the Look & Feel (L&F) at run time to match one of the L&F implementations in your system. This program contains strings identifying three

Using Swing to Create a Rollover Effect

Using Swing you can easily make the image on a button change when you touch the button with the mouse and change again when you press the button. To run

Using Swing to Add Tool Tips

Using Swing, you can easily add tool tips to any of the components in your GUI. Tool tips aren’t normally visible, but they become visible when you point at the

Macintosh Platform?

Question: Is Delphi available for a Macintosh platform? Answer: At this time, there is no version of Delphi available for the Macintosh.

Advantages of Declaring a Constant Object as Const

By declaring a variable that doesn’t change throughout program’s execution as const, you make your code safer and more readable. But there’s an additional advantage: efficiency. An optimizing compiler can

Inheritance Relationship of Templates

A common mistake is to assume that a vector is like a vector if Derived is a subclass of Base. However, there is no relationship between classes generated from the

Swing, Images on Buttons

Swing makes it easy to place an image on just about any component. To see an image on a button, substitute the path and file name of an image on

Before You Profile Your Software…

If you intend to optimize your software’s performance, make sure to profile the release version rather than the debug version. The debug version of the executable contains additional code (about

Inline Assembly

C++ is used in as diverse fields as high-level GUI through the lowest level real-time applications. In time-critical sections of C++ code, you can ensure enhanced responsiveness by combining inline

Swing, Buttons in Buttons

Tired of the same old buttons? My car radio has buttons in buttons, and you can do the same with Swing. Swing components are also containers which can contain other

How is Virtual Inheritance Implemented?

When multiple inheritance is used, it is sometimes necessary to use virtual inheritance. A good example for this is the standard iostream class hierarchy: //Note: this is a simplified description

Code-Commenting Shortcuts

Instead of going to the Edit menu to comment out a section of code, you can add the comment command to the shortcut menu you access by right-clicking in a

Is My Object Valid?

Have you ever needed to determine if an object variable is holding a valid reference? TypeName() returns a class name if the object holds a valid reference. It returns the

Run Your VB App on Startup

Do you have an application you need to launch on Windows startup? Typically, you do this by placing an item in the Startup directory. However, you can also do this