Referring to the sample code, which line is in error  
Author Message
amicalrahul





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

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



Visual C++3  
 
 
amicalrahul





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

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


 
 
amicalrahul





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

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.


 
 
amicalrahul





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

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


 
 
amicalrahul





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

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 de**** 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.


 
 
Ovidiu Cucu





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

What's this A Brainbench test

 
 
amicalrahul





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

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


 
 
amicalrahul





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

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.


 
 
amicalrahul





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

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.


 
 
amicalrahul





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

ya, it is a question from brainbench test.
 
 
amicalrahul





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

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


 
 
einaros





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

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.