|
|
Authorized user can see question and answers. Please log in or sign up. 
|
#1. You are developing an MFC-MDI application that uses DDX. One of the requirements for your application is that the data between each form view and its dialog box controls must be updated through DDX whenever the form view is activated or deactivated. To fulfill this requirement, you override OnActivatcView for your form view. Your form view's OnActivateVicw contains the following code: void CViewl::OnActivateView(BOOL bActivate, CView* pActivatcVicw, CVicw* pDcactivcVicw) {//TODO: store/restore dialog control data HERE. CFormView: :OnActivateView(bActivate, pActivateView, pDeactiveView);) You must write the code indicated by the //TODO comment.
Which code fragment should you insert in place of the //TODO comment?
Show comments for this question (0)
Add comments
Link to this question
|
|
#2. 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 the 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?
Show comments for this question (0)
Add comments
Link to this question
|
|
#3. You are writing a Windows-based application by using MFC. Your application uses a CForm View-derived object to manage a dialog box. You add the Microsoft Web Browser control to your project. You drag the control to your dialog box, but you do not see the control when Visual C++ is running in debug mode.
How can you make the Web Browser control appear?
Show comments for this question (0)
Add comments
Link to this question
|
|
#4. Your Visual C++ application uses an ADO Data control along with a number of edit controls to display inventory data for your company. Changes to the inventory must be validated by code within your application before the changes are written to the database. For which event should you write a handler?
Show comments for this question (0)
Add comments
Link to this question
|
|
#5. You write a Windows-based SDI application that uses a set of Microsoft Windows controls for input. To simplify the design of your application, you create a form by using the Visual C++ resource editor. You derive a class from the standard MFC CFormView class, and you use this class as the default view in your application. You want to resize the main frame window of the application to match the size of the form you have designed.
What should you do?
Show comments for this question (0)
Add comments
Link to this question
|
|
#6. You are modifying a change-password dialog box for a number of applications that are used internally by your company. You arc using an edit control named Editi to accept the user's password. You want to require a minimum length for passwords. You also want the control to retain focus until the user has entered a password that is valid by company rules.
What should you do to meet these requirements?
Show comments for this question (0)
Add comments
Link to this question
|
|
#7. You are using Visual C++ to create a 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?
Show comments for this question (0)
Add comments
Link to this question
|
|
#8. 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?
Show comments for this question (0)
Add comments
Link to this question
|
|
#9. You create an ActiveX user interface control. Many application programs in your company will use the control. You want to name the control when it is embedded in an application and display the name in a title bar at the top of the control window.
What should you do?
Show comments for this question (0)
Add comments
Link to this question
|
|
#10. You design a COM component for use by many user interface applications in your company. One of the interface methods for the component defines a parameter for an IP address as a string in the format nnn.nnn.nnn.nnn. The component's type library defines this parameter as both an input and an output parameter. When the interface method is called, the component validates the IP address. If the current user is forbidden to access that address, then the component should change the parameter to the string 0.0.0.0 and display this string within the application.
Which type of COM component should you design?
Show comments for this question (0)
Add comments
Link to this question
|
|
|
|
gen. 0.151
|
Server date 06:57 22-11-2008
|
Developed by Zip © 2006
|
|
 |
|
|