18.04.2015 Views

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

C++ APPLICATION PROGRAMMING INTERFACE<br />

Undocking windows<br />

If the Output window (or any docked window, for that matter) seems too<br />

small to you, try undocking it to make it a real window. Right-click it and<br />

toggle the Docking View item.<br />

Conditional break points<br />

Use conditional break points when you need to stop at a break point once some<br />

condition is reached (for example, a for-loop reaching a particular counter value).<br />

To do so, set the break point normally, then bring up the Breakpoints window<br />

(Ctrl+B or Alt+F9). Select the specific break point you just set and click the<br />

Condition button to display a dialog box in which you specify the break point<br />

condition.<br />

Preloading DLLs<br />

You can preload DLLs that you want to debug before executing the program.<br />

This allows you to set break points up front rather than wait until the DLL has<br />

been loaded during program execution. (Click Project, click Settings, click Debug,<br />

click Category, then click Additional DLLs.) Then, click in the list area below to<br />

add any DLLs you want to have preloaded.<br />

Changing display formats<br />

You can change the display format of variables in the QuickWatch dialog box or<br />

in the Watch window using the formatting symbols in the following table.<br />

Symbol Format<br />

Value<br />

Displays<br />

d, i signed decimal integer<br />

0xF000F065 -268373915<br />

u unsigned decimal integer 0x0065 101<br />

o unsigned octal integer 0xF065 0170145<br />

x, X hexadecimal integer 61541 0x0000F065<br />

l, h long or short prefix for d, I, u, o, x, X 00406042, hx 0x0C22<br />

f signed floating-point 3./2. 1.500000<br />

e signed scientific notation 3./2. 1.500000e+00<br />

g e or f, whichever is shorter 3./2. 1.5<br />

c single character 0x0065 'e'<br />

s string 0x0012FDE8 "Hello"<br />

su Unicode string "Hello"<br />

hr string 0 S_OK<br />

To use a formatting symbol, type the variable name followed by a comma and the<br />

appropriate symbol. For example, if var has a value of 0x0065, and you want to<br />

see the value in character form, type “var,c” in the Name column on the tab of<br />

the Watch window. When you press Enter, the character-format value appears:<br />

var,c = ‘e’. Likewise, assuming that hr is a variable holding HRESULTs, view a<br />

human-readable form of the HRESULT by typing “hr,hr” in the Name column.<br />

Chapter 4 • <strong>Developer</strong> environments • 203

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!