amicalrahul

Question:-

A CFormView uses a dialog-template resource. What properties must the dialog-template resource have to work correctly with a CFormView

Choice 1

WS_CHILD on
WS_BORDER off
WS_VISIBLE on
WS_CAPTION off

Choice 2

WS_CHILD off
WS_BORDER off
WS_VISIBLE off
WS_CAPTION off

Choice 3

WS_CHILD on
WS_BORDER off
WS_VISIBLE off
WS_CAPTION off

Choice 4

WS_CHILD off
WS_BORDER off
WS_VISIBLE on
WS_CAPTION off

Choice 5

WS_CHILD on
WS_BORDER on
WS_VISIBLE off
WS_CAPTION off



Re: Visual C++ General Referring to the sample code, which line is in error

amicalrahul

Question:-

An IDL file contains one or more interface definitions. Each interface definition is composed of what two parts

Choice 1

An open interface header and a closed interface body

Choice 2

An interface declaration and an interface definition

Choice 3

An interface header and an interface body

Choice 4

A visible header and a hidden body

Choice 5

An unlocked interface header and a locked interface body





Re: Visual C++ General Referring to the sample code, which line is in error

amicalrahul

Sample Code

1: inS PostChatMensage(HWND hWnd,HWND hWndTrgt)
2:{
3: HGLOBAL hMem;
4: LPSTR lpszChatStr = NULL;
5: LONG ]StrLen;
6:int it;
7: lStrLeieSendDlgltemMennage(hWnd,IDC_SENDEDIT,WM_GErTEXTLENGTH,
8: (WPARAM) 0, (LPARAM) 0);
9 llmabzoomfonit
10: hMem = GlobalAUoc(GMEM_MOVEABLE I 0MEv! ZERO!N1T,IStrLen + U;
11: if( em NULL)
12:{ ir-1;gotoFA.ILURE;
13: }
14: lpszChatStr (LPSTR) GlobalLock(hMem);
15: IStrLen = GetDIg!temText(hWnd, IDC_SENDEDIT, 1zCh&Str,
16: lStrLen+1);
17: PontMezage(hWndTrgt, WM_USER_ADDSTRING, (WPARAM) 0,
18: (LPARAM) 1jzChatStr);
19: tetuni(O);
20: Ilfailute nubroutme
21 FAILURE:
22: if(lpszChatStr)
23: GlobalUnIock(lpnzChatStr);
24: SetDlgltemText(hWnd, IDC_SENDEDIT, );
25: retuni(ir);
25:)

Referring to the sample code above, which line is in error

Choice 1

Line 7

Choice 2

Line 14

Choice 3

Line 17

Choice 4

Line 23

Choice 5

No line is in error.





Re: Visual C++ General Referring to the sample code, which line is in error

amicalrahul

What is a property bag

Choice 1

An in-process server providing persistent storage

Choice 2

A storage format on remote servers

Choice 3

A collection of ActiveX properties

Choice 4

A persistent storage format

Choice 5

An element of a security blanket





Re: Visual C++ General Referring to the sample code, which line is in error

amicalrahul

Sample Code

class CPerson : public CObject {

DECLARE_DYNAMIC(CPerson)

// rest of class definition
};

With respect to the above code, which one of the following statements is true

Choice 1

In order to perform a diagnostic dump of a CPerson object, the DECLARE_DYNDIAG should be used instead.

Choice 2

A CPerson object cannot be dynamically allocated with the new function.

Choice 3

A CPerson object can be created using the CRuntimeClass::CreateObject() member.

Choice 4

A CArchive class can use its << and >> operators to save and restore a CPerson object.

Choice 5

A CPerson object can be dynamically identified at runtime using the CRuntimeClass::IsKindOf() member.





Re: Visual C++ General Referring to the sample code, which line is in error

amicalrahul

Scenario

An integer variable in your application is overwritten somehow, but you do not have a clue as to where it is occurring.

Referring to the above scenario, how do you best use the integrated debugger to track this kind of problem down

Choice 1

Scatter TRACE statements throughout your application to monitor the value.

Choice 2

Set a breakpoint to fire when the variable changes value.

Choice 3

Set a breakpoint to fire when the variable is less than zero.

Choice 4

Set a breakpoint to fire when the variable is greater than zero.

Choice 5

Set a breakpoint in the message loop of your application with a condition to verify the variable has a valid value.





Re: Visual C++ General Referring to the sample code, which line is in error

amicalrahul

Sample Code

1: nit WINAPI WinMani (HINSTANCE hlnstance, HINSTANCE hPrevlnstance,

2: PSTRszCmdLine, nit iCrnriShnw)

3:(

4: memset(&wndclass,0,sIzeoIXWNDCLASS));

5: wndclass.style = CS_HREDRAWI CSVREDRAW;

6: inidclass.lpfnWndProc = WndProc,

7: wndclass.hlnstasice = hlnstance

8: wndclass.hlcon = Loacllcon (NULL, IDI_APPUCATION);

9: wndclass.hCinsor = LoadCursor (NULL, IDC ARROW);

10: wnclclass.ItrBackground= (HERUSH) GetStockObject (WHITE_BRUSH);

11: wndclass.lpszClassName = szAppName;

12: ifQRegisteeClass (&wnclclass)) retuntO

13: hwncl CreateWindow(szAppName, szClassName,

14: WS_OVERLAPPEDWINDOW,

15: CW_USEDEFAULT, CW_USEDEFAULT,

16: CW_USEDEFAULT, CW_USEDEFAULT,

17: NULL, NULL, hlnstance, NULL);

18: UpdateWindow(hwnd);

19: while (OetMessage (&snsg, NULL, 0,0))

20: {

21: TranslateMeage (&msg);

22: DispatchMeage (&ms

23: )

24: return rnsgwParam;

25:)

The above WinMain functions compiles, links, and executes WITHOUT error, but the window is never seen. What is the best reason for this

Choice 1

The window has a height of zero.

Choice 2

The window's position and size have placed it completely off the physical display.

Choice 3

The background color of the window is the same color as the desktop.

Choice 4

The visible bit of the window class is never set.

Choice 5

The window has a width and height of zero.





Re: Visual C++ General Referring to the sample code, which line is in error

Ovidiu Cucu

What's this A Brainbench test




Re: Visual C++ General Referring to the sample code, which line is in error

amicalrahul

The main window in an MDI application is often referred to as which one of the following

Choice 1

MDI Parent Window

Choice 2

Client Window

Choice 3

Main Window

Choice 4

Frame Window

Choice 5

Document Window





Re: Visual C++ General Referring to the sample code, which line is in error

amicalrahul

Which method does NOT export C++ classes or functions from a Win32 DLL

Choice 1

Use the /EXPORT link option.

Choice 2

Use the /MAPINFO:EXPORTS link option and bind the DLL to the map file.

Choice 3

Use AFX_EXT_CLASS in your class declaration or member function declaration.

Choice 4

Include the method name and an ordinal number in the EXPORTS section of the definition file.

Choice 5

Insert __declspec(dllexport) to the left of the calling-convention keyword.





Re: Visual C++ General Referring to the sample code, which line is in error

amicalrahul

Which function must be used to load the common control classes from the dynamic-link library

Choice 1

InitCommonControlsEx().

Choice 2

LoadCommonControlsEx().

Choice 3

AfxCommonCtrlInit().

Choice 4

LoadControlDLLEx().

Choice 5

There is no such function--common controls are automatically provided by GDI.DLL.





Re: Visual C++ General Referring to the sample code, which line is in error

amicalrahul

ya, it is a question from brainbench test.



Re: Visual C++ General Referring to the sample code, which line is in error

amicalrahul

What is an MFC message map

Choice 1

A hashed index table used for managing multi-threaded messages

Choice 2

A hashed index table used for handling single threaded apartments

Choice 3

Data structure used for OLE/COM messages

Choice 4

Data structure for managing message routing

Choice 5

A hashed index table used for handling TCP/IP message packets





Re: Visual C++ General Referring to the sample code, which line is in error

einaros

I've now merged a good 10 questions of yours, which appear to belong to some test or quiz. Don't spam these forums like that!

See http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=19445&SiteID=1 for information about what kind of discussion this site is meant for.