Saturday 20 January 2018

Important Tips Visual C plus


Important Tips:-
AddString ( ): Adds string to a list box and for combo box this adds string to the end of the list in the list box of a combo box.
App wizard: this will write default code in our program for us.
Application Programming Interface(API): is an interface implemented by a software program to enable interaction with other software, similar to the way a user interface facilitates interaction between humans and computers. APIs are implemented by applications, libraries and operating systems.

ASSERT_VALID ( ): This is a special Visual C++ test string used to make sure that nothing has gone wrong and that the pointer to the document is correct.
BN_CLICKED: a special message that buttons send (the BN prefix stands for button) when they are clicked.
BN_DOUBLECLICKED:a special message the button sends when double clicked on it.
Class Wizard: Use this code wizard to add a class to an existing MFC project. You can also add MFC classes to Win32 projects that have MFC support. The features you specified when you created your project determine the options available in this dialog box. ClassWizard helps you develop your MFC application and customize it. We use this
                        To add a handler for a message
                        To add a member variable
                        To add a new class
                        To add methods and properties to automation interfaces
                        To add a handler (function) for a user-interface item
CBN_SELCHANGE:messages to report when the user clicks the item in the list box or combo box. CBN stands for combo box notification.
CDC:a class which supports device contexts.
Checkbox:let the user to select one or more options from a number of options.
COMMAND:This is the message corresponds to the case in which the menu item is clicked.
Combo Box: combination of a text box, button, drop-down list box. The user presses the button to open the list box and can select the item.

Device Context: It is a special object that has a great number of built-in methods to be used in drawing of graphics and text.
Dialog Box: Windows with lots of buttons and list boxes and other controls that are useful to pass some information to a program.
DoModal ( ): calls a Modal dialog box and Returns the value IDOK or IDCANCEL when the user clicks the default buttons on the dialog box.
Event-Handler:without programs responds to user actions called events, each time an event occurs, the corresponding method is called (handled) in a program.
GetDocument ( ): Call this function to get a pointer to the view’s document.
OnButton1 ( ): the method is handled when the user clicks the button in the dialog box.
OnChar ( ): The framework calls this member function when a keystroke translates to a nonsystem character. Parameters
nChar             
Contains the character code value of the key.
           
nRepCnt         
            Contains the repeat count, the number of times the keystroke is repeated when use holds down the key.
nFlags
            Contains the scan code, key-transition code, previous key state, and context code.
OnCheck ( ): is an event-handler consisting two states checked and unchecked called when the user clicks check box.
OnDraw ( ): called by the framework/view to render an image of the document.
Pdc
            Points to the device context to be used for rendering an image of the document.
OnHScroll ( ): The framework calls this member function when the user clicks a window’s horizontal Slider.
Parameters
            nSBCode         Specifies a scroll-bar code that indicates the user’s scrolling request. This parameter can be SB_THUMBPOSITION Scroll to absolute position.
            nPos    The current position is specified by the nPos parameter. Specifies the slider position depending on the initial range, nPosmay be negative and should be cast to an intif necessary.         
PScrollBar  If the scroll message came from a scroll-bar control, contains a pointer to be control. If the user clicked a window’s scroll bar, this parameter is NULL. The pointer may be temporary and should not be stored for later use.
OnInitDialog():used to initialize data in dialog box.
OnRadio():is an event handler called when the user clicks the radio button, if the user clicks one of the radio buttons will be dislabled/de-selected automatically.
OnSelChange():event handler called when the user selects an item from the combobox or list box.
GetCurSel():returns the zero-based index of the currently selected string.
Invalidate():Invalidates the entire surface of the control and causes the control to be redrawn.
LBN_DBLCLICK:is a message that the list box sends to the program when the user double clicks on it. LBN stands for list box notification.
ListBox:list of items will be displayed in a box and user can click on it to highlight it and double click it to select it.
Radio Buttons:let the user to select only one option from number of options.
Serialization:Serialization is the process of writing or reading an object to or from a persistent storage medium such as a disk file.
                        Serialize( CArchive& ar)
                        CArchive class as an intermediary between the object to be serialized and the storage medium. A CArchive object ‘ar’ uses overloaded insertion (<<) and extraction (>>) operators to perform writing and reading operations.
SetRangeMax():Sets the maximum position for a slider.
SetRangeMin():Sets the minimum position for a slider.
Slider:these will have the small sliding box called the thumb along the groove used to adjust the positions in the applications like volume control, color contrast etc.
TextOut():Writes a character string at the specified location using the currently selected font.
UpdateData():used to get or set the actual value in the control.
Win32Console Application: Win32 console is a text user interface implementation within the system of Windows API, which runs console applications. Win32 consoles are typically used for applications that do not need to display images. Examples include command line interface, text editiors.
WM_CHAR:message contains the character code of the key that was pressed. 

0 comments:

Post a Comment