devxlogo

Tip Bank

Using Recursion Efficiently

It’s important to use recursion carefully to avoid running into stack overflow. This sample code reverses a given integer number using recursion: #include “stdafx.h”int myreverse(int num){ static int nLocal =

Capturing the ESCAPE Key Event

Consider a scenario where a dialog is launched from a panel which itself was launched by another panel. It’s very tedious to get the dialog disposed when the ESCAPE key