Click here to Skip to main content
15,909,835 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralAveraging & Median Filters Pin
4-Nov-01 19:50
suss4-Nov-01 19:50 
GeneralRe: Averaging & Median Filters Pin
markkuk4-Nov-01 20:00
markkuk4-Nov-01 20:00 
QuestionBoot Disk? Pin
Stephen Caldwell4-Nov-01 18:16
Stephen Caldwell4-Nov-01 18:16 
AnswerRe: Boot Disk? Pin
markkuk4-Nov-01 20:28
markkuk4-Nov-01 20:28 
AnswerRe: Boot Disk? Pin
Jon Hulatt4-Nov-01 22:52
Jon Hulatt4-Nov-01 22:52 
GeneralVC++ Multi-Threaded Add-In... Pin
4-Nov-01 18:14
suss4-Nov-01 18:14 
GeneralRe: VC++ Multi-Threaded Add-In... Pin
Jamie Hale5-Nov-01 6:18
Jamie Hale5-Nov-01 6:18 
GeneralNeed help urgently in my MCSD questions Pin
Assem Abdel Maqsoud4-Nov-01 15:58
Assem Abdel Maqsoud4-Nov-01 15:58 
dear all VC++ programmers. i'm a bigginer VC++ programmer, my first MCP in the MCSD for VC++, which is Desktop applications, will be next monday.i have 9 questions need answer and i don't know thier answers so could any one please help me an answer these questions.
here you are the questions.

1 – you want to use a form view in your MFC-MDI application. You add a close button to the dialog resource that will be used with the form view. You then add to the form view class a button click handler for the close button you want the button click handler for the close button to close MIDI child window that contains the form view.
What must you do in the button click handler of the close button to accomplish this goal?
A. Post the WM_CLOSE message to the form view.
B. Call the DestroyWindow function in the form view.
C. Post the WM_CLOSE message to the parent frame window of the form view.
D. Call the DestroyWindow function on the parent frame window of the form view.

2 – your program uses a COM component. The COM server object has returned a standard HRESULT with a severity field of 1. you want to present to the user a message box explaining what the returned HRESULT means. You need the message string corresponding to that HRESULT.
How must you obtain this string?
A. call OutputDebugString.
B. Call FormatMessage(FORMAT_MESSAGE_FROM_STRING,…);
C. Call FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,…);
D. Call GetLastError.

3- you are using VC++ to create COM component that will scan files for conformance to validity constraints. The component might be used by many client programs at the same time. To avoid duplicate scanning, the component maintains an internal list of files it has scanned. The component does not persist this list when it unloads.
Which type of COM component should you create?
A. active document.
B. ActiveX user interface control.
C. Out-of-process COM server component.
D. In-process COM server component.

4 – you are the administrator of the Microsoft Visual Source Safe database for you company’s main software product. You want to retrieve the code tree from the previous day and rebuild the entire project on a clean system. Only one file has been changed since yesterday. You want to retrieve the code tree from the previous day while preserving today’s changes to this file.
What should you do?
A. Click Show History for the changed file, click Pin, and then click Get Last Version for the project.
B. Click Show History for the changed file, click Rollback, and then click Get Last Version for the project.
C. Branch the project, click Show History for the changed file, click Rollback, and then click Get Latest Version for the project.
D. Branch the project, click Show History, click Pin, then click Get Latest Version for the project.

4 – you want to restrict the size of s frame window in your VC++ windows-based application. You add code to handle WM_SIZE message.
The frame window is now initially displayed in a large frame, and then it snaps to the correct size. In addition, auser can drag the frame to any size while holding down the mouse button.
How should you restrict the size of the frame window?
A. Add the code that restricts the frame size to the WM_GETMINMAXINFO message handler.
B. Add the code that restricts the frame size to the AdjusWindowRectEx function.
C. If the unadjusted frame window too big, resend the WM_SIZE message at the end of the WM_SIZE message handler.
D. Add the code that restricts the frame size to the ON_WM_CREATE message handler.

5 – your company maintains a library of documents in a proprietary format on the intranet. You write an active document component to edit documents of this format.
To manage these documents, you will run the component in Microsoft Internet Explorer on your company’s intranet. When a user clicks a link to one of these documents, Internet Explorer will automatically launch your active document to edit it. You want to obtain in the active document the URL of the document that Internet Explorer has activated.
What must you do?
A. Call the Imoniker::RelavtivePathTo method.
B. Implement the IoleLink::GetBoundSource method.
C. Call the IoleClientSite::GetMoniker method.
D. Call the Imoniker::GetDisplayName method.
E. Implement the IoleObject::GetClientSite method.

6 – you write an ActiveX user interface control by using VC++, the control has a number of properties. You want to accomplish the following goals:
1. Display the available properties on property pages of the control.
2. Allow access to the control properties from Microsoft Visual Basic.
3. Constrain some properties to predefined values.
4. Load ambient property values from the control container.
5. Indicate which user interface element of the control receives focus when the control is loaded.
You implemented the IpropertyBrowsing interface on the control.
Which result or results does this action produce?(choose all that apply)
A. Display the available properties on property pages of the control.
B. Allow access to the control properties from Microsoft Visual Basic.
C. Constrain some properties to predefined values.
D. Load ambient property values from the control container.
E. Indicate which user interface element of the control receives focus when the control is loaded.

7 – you are implementing a COM component by using ATL. You paln to use ATL features wherever possible. You want to allow other COM components to reuse your component by aggregating it.
Which three things must you do?(choose three)
A. Declare an internal reference count for the component.
B. Declare a pointer to the controlling Iunknown interface.
C. Override the FinalConstruct method.
D. Override the FinalRelease method.
E. Override the IclassFactory::CreateInstance method.
F. Add the DECLARE_CLASSFACTORY2 macro to your class.

8 – you write a COM component by using VC++. The component supports the ImangeSales interface, which your company has defined. The component is designed to support aggregation, and it provides a class factory object.
A client object males a call to the CreateInstance function of the class factory object, requesting an instance of the ImanageSales interface. The client object passes a non-NULL pointer to the controlling unknown as a paramater of the CreateInstance call.
Which value must your component’s QueryInterface function return?
A. a pointer to the ImanageSales interface.
B. A pointer to the Iunknown interface.
C. A NULL pointer.
D. CLASS_E_NOAGGREGATION.
E. CLASS_E_CLASSNOTAVAILABLE.
F. S_OK.

9 – a real estate company hires you to develop an application to display homes that are available for sale. You create an ActiveX user interface control that allows the broker to enter a postal code. The application then displays a map of the appropriate area. Homes that are for sale are highlighted on the map. The application sets its color scheme independently of the Control Panel color settings. You want your control to follow the color scheme of the application.
Which two things must you do to accomplish this goal?(choose two)
A. Implement IoleControl::SetColorScheme.
B. Call Idispatch::Invoke(DISPID_AMBIENT_BACKCOLOR,…).
C. Implement IoleControl::OnAmbientPropertyChange.
D. Call IoleControlSite::OnControlInfoChanged.
E. Implement IoleControl::GetControlInfo.



Assem Abdel Maqsoud
C/C++ programmer
GeneralRe: Need help urgently in my MCSD questions Pin
Jim A. Johnson4-Nov-01 16:41
Jim A. Johnson4-Nov-01 16:41 
GeneralRe: Need help urgently in my MCSD questions Pin
Christian Graus4-Nov-01 16:48
protectorChristian Graus4-Nov-01 16:48 
GeneralRe: Need help urgently in my MCSD questions Pin
Michael Martin4-Nov-01 17:41
professionalMichael Martin4-Nov-01 17:41 
GeneralRe: Need help urgently in my MCSD questions Pin
Christian Graus4-Nov-01 17:56
protectorChristian Graus4-Nov-01 17:56 
GeneralRe: Need help urgently in my MCSD questions Pin
Chris Maunder4-Nov-01 20:11
cofounderChris Maunder4-Nov-01 20:11 
GeneralRe: Need help urgently in my MCSD questions Pin
Nish Nishant4-Nov-01 20:25
sitebuilderNish Nishant4-Nov-01 20:25 
GeneralRe: Need help urgently in my MCSD questions Pin
Christian Graus4-Nov-01 21:58
protectorChristian Graus4-Nov-01 21:58 
GeneralRe: Need help urgently in my MCSD questions Pin
Jon Hulatt4-Nov-01 22:56
Jon Hulatt4-Nov-01 22:56 
GeneralRe: Need help urgently in my MCSD questions Pin
Chris Maunder5-Nov-01 1:39
cofounderChris Maunder5-Nov-01 1:39 
GeneralRe: Need help urgently in my MCSD questions Pin
Tomasz Sowinski5-Nov-01 1:57
Tomasz Sowinski5-Nov-01 1:57 
GeneralRe: Need help urgently in my MCSD questions Pin
Assem Abdel Maqsoud5-Nov-01 7:03
Assem Abdel Maqsoud5-Nov-01 7:03 
GeneralRe: Need help urgently in my MCSD questions Pin
Not Active5-Nov-01 2:20
mentorNot Active5-Nov-01 2:20 
GeneralRe: Need help urgently in my MCSD questions Pin
5-Nov-01 7:11
suss5-Nov-01 7:11 
GeneralRe: Need help urgently in my MCSD questions Pin
5-Nov-01 7:11
suss5-Nov-01 7:11 
GeneralRe: Need help urgently in my MCSD questions Pin
Christian Graus5-Nov-01 8:44
protectorChristian Graus5-Nov-01 8:44 
GeneralRe: Need help urgently in my MCSD questions Pin
Assem Abdel Maqsoud5-Nov-01 7:02
Assem Abdel Maqsoud5-Nov-01 7:02 
GeneralRe: Need help urgently in my MCSD questions Pin
Jon Hulatt5-Nov-01 7:24
Jon Hulatt5-Nov-01 7:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.