Navigate the TRACEs in Your Code

If you put many TRACE’s, in your code, it might be very convenient to jump to each one of them by double clicking a text line in the Debug window.

//With IMMsgBox function one can Drop an "interactive" message on aScreen,//or a message in Debug window#include "stdafx.h"#include #include #define DROP_SCREEN				 0#define DROP_DEBUG_MSG			-1#define DROP_DBG_MSG_TRACEBLE	-2#define TRACE_HERE				__FILE__, -__LINE__int IMMsgBox(char * Caption, int Type, char * FormatString, ...){	char Text[1024], TracedText[1500];	va_list pArgList;	va_start(pArgList, FormatString);	vsprintf(Text, FormatString, pArgList);	va_end(pArgList);	if(Type <= DROP_DBG_MSG_TRACEBLE)	{		sprintf(TracedText, "
%s(%d): - %s
", Caption, (-1) * Type, Text);		OutputDebugString(TracedText);		return Type;	}	if(Type >= DROP_SCREEN)		return MessageBox(NULL, Text, Caption, Type);	if(Type == DROP_DEBUG_MSG)	{		OutputDebugString(Text);		return Type;	}	return -1;}int main(){	if(IMMsgBox("Caption", DROP_SCREEN + (MB_YESNOCANCEL | MB_ICONQUESTION),		"Text containing int %d double %f and string %s", 123, -1.234, "ABCDefg") == IDYES)		MessageBox(NULL, "You've clicked Yes", "Hi, User", MB_OK);	IMMsgBox(NULL, DROP_DEBUG_MSG, "Text containing int %d double %f and string %s",		123, -1.234, "ABCDefg");	IMMsgBox(TRACE_HERE, "Text containing int %d double %f and string %s",123, -1.234, "ABCDefg");	return 0;}
Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

The Latest

homes in the real estate industry

Exploring the Latest Tech Trends Impacting the Real Estate Industry

The real estate industry is changing thanks to the newest technological advancements. These new developments — from blockchain and AI to virtual reality and 3D printing — are poised to change how we buy and sell homes. Real estate brokers, buyers, sellers, wholesale real estate professionals, fix and flippers, and beyond may

man on floor with data

DevX Quick Guide to Data Ingestion

One of the biggest trends of the 21st century is the massive surge in internet usage. With major innovations such as smart technology, social media, and online shopping sites, the internet has become an essential part of everyday life for a large portion of the population. Due to this internet

payment via phone

7 Ways Technology Has Changed Traditional Payments

In today’s digital world, technology has changed how we make payments. From contactless cards to mobile wallets, it’s now easier to pay for goods and services without carrying cash or using a checkbook. This article will look at seven of the most significant ways technology has transformed traditional payment methods.