1. The app to run a C language is as follows:
MAIN () {
Printf ("Hello World");
}
Which type of project should be established in the development environment of VC6? B
A, Win32 Application
B, Win32 Console Application
C, MFC AppWizard (Exe)
D, UTILITY PROJECT
2. In the VC6 environment, after the application is input, the following error occurs after the compile link.
Mytest.cpp (192): Fatal Error C1010: UNEXPECTED End of File While Looking for Precompiled Header Directive
How to solve: C
A, check the case in the written program
B, check if there is a brace in writing programs
C and check if the program is the first to include the pre-translated header file.
D, check if there is an undefined variable name
3, the statement on the engineering established by VC6, the correct thing is: C
A, the project can only contain .cpp and .h type files
B, the suffix of the work area file is .dsp
C, double-click the workspace file with the mouse to open the entire project
D, you can see all the files in the project, including workspace files, project files, etc.
4. The following statement about debugging in the VC6 environment is A
A. Set the appropriate breakpoint (F9), press CTRL F5 to start debugging
B, set the right breakpoint, press F5 to start running
C, when debugging, you can observe the variable value at breakpoint at any time.
D. During the debugging process, you can press STOP DEBUGGING (SHIFT F5) to end debugging operation at any time.
5. Provide automatic list of automatic lists and method parameters of the member method in VC6, but sometimes it is not normal, this is to delete
After the complex type of the suffix, open the project again, you can prompt normal. B
A, CLW
B, NCB
C, OPT
D, APS
6. The following is incorrect: c
A handle is a 4-byte long integer value
B handle is used to identify different instances of different objects or similar objects in applications.
C message is a kind of handle
The type of handle of the D brush is HPEN, the handle type of the painting is Hbrush
7. In the Basic Application Framework of a Windows API, there is a message loop:
While (GetMessage (& MSG, NULL, 0, 0))
{
TranslateMessage (& MSG);
DispatchMessage (& MSG);
}
Which message below makes the message loop exits the running to terminate the operation of the entire application. B
A WM_DESTROY
B WM_QUIT
C WM_Close
D WM_CREATE
8, 1 is the basic operating unit of the Windows application, providing interactions between applications and users
Interface environment; Windows programming is an event-driven programming method, which uses 2 description
Information about the event; Windows application uses 3 identification of different objects in applications
Different instances of objects and similar objects, such as buttons, icons, scroll bars, controls or files, etc .;
Named name of variable name in Windows application design, it takes data types of variables as before
To follow the names of its meaning or function, such as LpszFacename. B
A message, window, pointer, Hungarian representation
B window, message, handle, Hungarian representation
C window, message, handle, prefix representation
D message, window, pointer, prefix representation
9. The role of the REGISTERCLASS this Windows API function is: a
A Register a window class
B window display
C Create an instance of a window class
D Window class definition
10. About Windows API's programming, incorrect: D
A is a callback function
B I have internal Switch ... Case branch to determine the processing of different types of messages
C It has four entrance parameters, its meaning and the meaning of the message structure MSG.
D If you use the full-air window function (there is no code inside), Windows will also be responsible for processing messages according to the default method.
11, the Windows window corresponds to the refresh request, which does not require application considerations in the following cases: D
A, refresh after the window moves
B, refreshing area covered area
C, scroll through the scroll bar
D, icon or cursor crossing the window
12. The following statement about BeginPaint and getDC two functions is: C
A. The former is generally paired with endpaint, and the latter is paired with ReleaseDC.
B, the operating area of the equipment environment obtained by the former may not be the entire customer area; the latter's operating area of the equipment environment is the entire customer area
C, only the equipment environment handle can be obtained through these two methods
D. After the former is called, the coordinates of the invalid area can be obtained, and the latter cannot obtain the coordinates of the invalid area.
13. The following statements about the image modes in the Windows drawing are: D
A, the default image mode is mm_text
B, only mm_anisotropic mode, the ratio of x, Y-axis may not be 1: 1
C. In all image modes, the coordinates of the upper left corner of the window are (0, 0) by default.
D, in mm_himetric mode, the X-axis positive direction is right, the Y axis is downward.
14. What is wrong with Windows text and font, wrong: d
A, set the foreground and background color of the font, separately using SetTextColor and SetBKColor
B, when you create a font using CreateFont, you can change the size of the font, the type of the font, etc.
C, the data type of the font handle is HFONT
D, the coordinates used in the font output function textout parameter is the device coordinate
15. The Windows API function that can be obtained at the same time, width, and character sets of the currently used fonts are: b
A, gettextextentpoint32
B, GetTextMetrics
C, getObject
D, getTextInfo
16. The following statement about the response to the keyboard application is: D
A, the scan code of the keyboard does not depend on the specific device
B, Windows applications do not use messages to handle keyboard responses
C. Press a key on the keyboard to generate buttons and character messages simultaneously.
D, the TRANSLATEMESSAGE function in the message loop in the Winmain function is used to convert the button message into character messages.
17. The following statement about the WINDOWS application's response is true: B
A, only the active window can accept mouse events
B, you can call the function setcapture () to achieve the capture of the mouse, and capture the keyboard function of the system after the mouse is temporarily invalid.
C. Users can only call the cursor shape of the system defined mouse, and cannot customize the cursor.
D, you can respond to the mouse drag event by the corresponding single type of mouse message
18, in the application framework developed in the Windows API, which method does not load menu: D
A. When the window class is defined, set the LPSZMENUNAME of the structure WNDClass to the appropriate menu name.
B, when you create a window, first call the LoadMenu to get the menu handle, then call the function CreateWindow load this menu.
C, call the loadMenu to get the menu handle in the application, call the function setMenu dynamically load menu
D, in the window processing function, set the appropriate message response for menus messages
19. The menu resource is defined as follows, and the "File" submenu has a handle HSubmenu
Menu1 menu Discardable
Begin
Popup "file (& f)"
Begin
Menuitem "New (& N) / T Ctrl N", IDM_New
Menuitem "Open (& O) / T Ctrl O", IDM_Open
Menuitem "Close (& C)", IDM_Close
Menuitem Separator
MenuItem "Save (& S) / T Ctrl S", IDM_SAVE
Menuitem "Exit (& X)", IDM_EXIT
End
End
To set the menu of the menu ID to IDM_Open to disable status and gray, which API function and its parameter settings are correct: a
A, EnableMenuItem (Hsubmenu, 1, MF_BYPOSITION | MF_G_G_GRAYED);
B, EnableMenuItem (Hsubmenu, 2, MF_BYPOSITION | MF_G_G_GRAYED);
C, DisableMenuItem (Hsubmenu, 2, MF_BYPOSITION | MF_G_G_GRAYED);
D, EnableMenuitem (HSubMenu, IDM_Open, MF_BYPOSITION | MF_G_GRAYED).
20, add a menu command for the menu ID to IDM_SAVE to add a Ctrl S accelerator key resource, the correct way of writing is: A
A, Acce1 Accelerators {
"^ S", IDM_SAVE
}
B, Acce1 Accelerators {
"^ S", IDM_save, Virtkey
}
C, Acce1 Accelerators {
"S", IDM_SAVE, ASCII, CONTROL
}
D, Acce1 Accelerators {
"^ S", IDM_SAVE, CONTROL
}
21. The following about the Windows API development, the modal dialog, the error is: D
A, the modal dialog box is displayed by calling the Dialogbox function
B, the modal dialog box is turned off by calling the enddialog function
C, when the modal dialog is turned on, it is not possible to switch to its parent window to do any operation.
D, the modal dialog box must set the WS_Visible display style to display 22, how to get the size (height and width) of a bitmap, call the following Windows API function a
A, getObject
B, LoadBitmap
C, SelectObject
D, CreateCompatibleBitmap
23, how to change the name displayed on the button in VC6? A
A, in the resource editor, select this button, select the value of the property (Properties), change the value of the property box (CAPTION) field in the right mum
B, in the Resource Editor, select this button, select Properties in the Right-click menu, change the value of the id field of the property box.
C. In the class wizard, select the "Message Map" tab to specify the appropriate name and corresponding function for the button.
D, in the class wizard, select the "MEMBER VARIABLES" tab to specify the appropriate name and variable for the button
24. Add a dialog to an application and add an edit box in the dialog. You need to set the value of the edit box to "Test".
This should be added to: (Suppose the window processing function of the application main window is WndProc, the dialog processing function is DLGPROC) B
A, window processing function WNDPROC in the processing of WM_CREATE messages
B, dialog processing function DLGPROC processing in WM_INITDIALOG messages
C, dialog box processing function DLGPROC in processing of WM_CREATE messages
D, the processing of the WM_NEXTDLGCTL message in Window Processing Function WndProc
25. Add a shortcut menu to the application (right-click menu), should make the corresponding code on which message below: a
A, WM_CONTextMenu
B, WM_RBUTTONDOWN
C, wm_lbuttondown
D, WM_POPUPMENU
26, let simple static controls can accept input, should: a
A, give it a style of SS_NOTIFY
B, give it a style of SS_COMMAND
C, plus "&" characters on static text
D, plus "%" characters on static text
27. For non-modular dialogs, it is possible to respond to user input in its dialog processing function, should be: b
A, and general news cycle
B. ISDIALOGMESSAGE intercept message must be called
C, you must call TranslateAccelerators translation messages
D, you must call sendMessage Send Messages
28, the following statements about the classes in the MFC are incorrect: a
A, the COBJECT class is the base class of all the MFC class
B, the CVIEW class is the subclass of the CWND class
C, the CDIALOG class is the subclass of the CWND class
D, CARCHIVE class can support serialization operations
29. Which of the following is the COBJECT class does not have: D
A, the establishment and deletion of the object
B, diagnose the target
C, provide runtime information
D, create an application window
30. In the VC6 development environment, double-click the workspace file, you can open the workspace and the project it contains, which is: A
A, .dsw
B, .dsp
C, .rc
D, .CLW31, which function of the following can be implemented by integer to character type: a
A ITOA
B atoi
C Sprintf
D Strtol
32. The following statements about editing box style are: B
A, you can automatically convert characters by setting the editing box style
B, if the ES_READONLY style is set, the text cannot be set in the application.
C, only the ES_MULTILINE style can be set to display multiple lines of text boxes
D, only the ES_WANTRETURN style is set, and the Enter can be inserted into the carriage return (/ N) when the Enter is pressed.
33. The following about the CMenu class, the error is: a
A, CMenu class is a subclass of CWND
B. You can get a menu handle HMENU by the CMenu class object. You can get the corresponding CMenu class object by the menu handle HMENU.
C, cMenu class member method with graphic sheet-painted menus is DrawItem and MEASUREITEM
D. The members of the cMenu class for implementing shortcut menu (right-click menu) is TRACKPOPUPMENU
34. The statement about the scroll bar is wrong: B
A. The scroll bar can be divided into scroll strip controls and rolling bars belonging to the window.
B, scroll bar sends a WM_COMMAND message
C. After the scroll strip control is created, it must be programmed to make it properly move.
D, the rolling strip control is created after setting the range and the initial position to properly
35. About scrolling classes CScrollBar is incorrect: a
A, cscrollbar is a subclass of CControlbar
B, members of the CSCrollbar class SetScrollInfo and SetScrollRange can set the rolling bar's variation range
C, member method of cscrollbar ShowscrollBar can control the display and hide of the scroll bar
D, members of CScrollbar getScrollLimit can get the maximum value of the rolling bar plus 1
36. What is wrong with the button control, the error is: a
A, normal button, radio button, multi-selection button, packet box is a button of different styles
B, the title of the button is the text displayed on the button.
C, the class of the graphic button is CBitmapButton
D, the notification message type of the button control is WM_COMMAND, its parameter (LPARM and WPARM) meaning and command message (WM_COMMAND)
37. The statement about the toolbar is: C
A, the ID of the button on the toolbar can be the same as the menu ID
B, command prompts, tooltips, and size variable, etc., can be implemented by setting the corresponding style
C, the display and hide of the toolbar can set the appropriate properties through the CToolbar's setStyle member function.
D, one window can display multiple tools at the same time
38. The statement about the document / view class, the correct thing is: D
A, document class cannot handle WM_COMMAND messages
B, one document can have multiple views, one view can have multiple documents
C, MFC Single Document (SDI) Application Framework and Multi-Document (MDI) Application Framework CMAINFRAME class is a subclass of cframewnd
D, the Ondraw member method of the view class is called when the window needs to be redrawged.
39. The method below is not the member method of the cdocument class.
A, AddView
B, UpdateAllViews
C, getDocumentd, getDocchemplate
40. The following method is the member method of the CDOCTemplate class.
A, getnextdoc
B, getDocument
C, getDoctemplate
D, UpdateAllViews
(Individual original, please specify the source, thank you .yanqlv)