This document contains a question bank for the subject "Programming in C++" with questions and answers related to Windows programming, SDK, API, GDI functions, message handling, and application frameworks. Some key topics covered include defining handles, devices contexts, message loops, window procedures, and MFC components.
This document contains a question bank for the subject "Programming in C++" with questions and answers related to Windows programming, SDK, API, GDI functions, message handling, and application frameworks. Some key topics covered include defining handles, devices contexts, message loops, window procedures, and MFC components.
This document contains a question bank for the subject "Programming in C++" with questions and answers related to Windows programming, SDK, API, GDI functions, message handling, and application frameworks. Some key topics covered include defining handles, devices contexts, message loops, window procedures, and MFC components.
SRI RAMAKRISHNA ENGINEERING COLLEGE, COIMBATORE -22
DEPARTMENT OF INFORMATION TECHNOLOGY
Subject/coe! "#AF$"%-&'(u)* +,o-,)..'/- C*)((! III B0TECH IT 1B2 (ec 34ESTION BANK UNIT I 1. What do you mean by SDK? It is an acronym for Software Develoment Kit. It is a set of tools desi!ned to hel " ro!rammers create Windows alications. The Windows SDK consists of the followin! elements# $ % lar!e set of boo&s describin! functions messa!es' structures' macros and resources. $ (arious tools includin! a dialo! editor and an ima!e editor. $ )n*line hel files. $ % set of Windows libraries and header files. $ Samle Windows ro!rams in ". +. ,ive some common Simle Win-+ data tyes defined in the Windows header files. Data tyes are .))/' .0T1' "2%3' DW)3D' 2%ND/1' /)N,' /4"ST3' /4ST3' S2)3T' UINT' W)3D. -. Define static data. Static data is any ortion of the ro!ram that is not e5ecuted as machine instructions and which does not chan!e as the ro!rams e5ecutes. The Windows term for static data is 3estore data or 3esources. 6. What do you mean by callin! convention? "allin! conventions indicate the order in which the ar!uments are assed to a function when a function call is made. ("77 suorts different conventions li&e 8cdecl '8stdcall ' 8fastcall' thiscall. 9. What is 2un!arian Notation? It is a variable*namin! convention so called in the honour of the le!endary :icrosoft ro!rammer "harles Simonyi. %ccordin! to this convention the variable name be!ins with a lower case letter that denotes the data tye of the variable. 1.!.; s< of s<"md/ine stands for strin! terminated by <ero. =. What is a handle? % handle is simly a number >usually -+ bits in si<e; that refers to an entity. The entity could be a window' an icon' a brush' a cursor' a file or any such entity. ?. What is Windows 4ro!rammin!? Windows 4ro!rammin! uses ,UI concet. It is an event*driven 4ro!rammin!. %n %lication Window will resond to the events by !eneratin! a messa!e by the )eratin! System. It uses !rahics for or!ani<in! user wor&sace. 4ro!rams that run within Windows also use ,UI. 1.!.# Word' 15cel. These alication ro!rams use some built*in functions resent in %4I. @. /ist the main header files in Windows 4ro!rammin!? WIND)WS.2' WIND1A.2' WINNT.2' WIN.%S1.2' WINUS13.2' WIN,DI.2 B. What is an %4I? %4I is an acronym for %lication 4ro!rammin! Interface. It is simly a set of functions that are art of Windows )S. "allin! the functions resent in the %4I can create ro!rams. 1C. What are the stes reDuired to create a window? The stes reDuired to create a window are' a. 3e!isterin! Window "lass b. "reate a Window usin! create function c. :essa!e /oo to rocess events d. Window 4rocedure with secific tas&s for messa!es. 11. What are the stes to dislay the window? %fter the window is created to dislay the window on the screen two functions are used. i. Show window Euts the window on the dislay ShowWindow>hwnd' i"mdShow;F ii. Udate window*causes the client area to be ainted. "auses the client area to be ainted by sendin! the window rocedure a W:84%INT messa!e. UdateWindow>hwnd;F 1+. Define messa!e loo. Windows maintains a Gmessa!e DueueH for each Windows ro!ram currently runnin! under Windows. When an inut occurs' Windows translates the event into a Gmessa!eH then it laces in the ro!ramIs messa!e Dueue. % ro!ram retrieves these messa!es from the messa!e Dueue by e5ecutin! a bloc& of code &nown as the Gmessa!e looH# while>,et:essa!e>Jms!' NU//' C' C;; K Translate:essa!e>Jms!;F Disatch:essa!e>Jms!;F L 1-. Define Default Window 4rocedure. When a window rocedure rocesses a messa!e' it should return C from the window rocedure. %ll the messa!es that a window rocedure chooses not to rocess must be assed for default rocessin!. This default rocessin! is done by a WindowMs function named DefWindow4roc. DefWindow4roc>2WND hwnd' UINT messa!e' W4%3%: w4aram' /4%3%: l4aram;F 16. Define Device "onte5t. The device conte5t >GD"H; is a data structure maintained internally by ,DI. % device conte5t is associated with a articular dislay device' such as a video dislay or a rinter. Aor a video dislay' a device conte5t is usually associated with a articular window on the dislay. Some of the values in the device conte5t are !rahics G attributesH . These attributes define some articulars of how ,DI drawin! functions wor&. 19. What are the two methods for !ettin! a device conte5t handle? :ethod 1# This method is used when W:84%INT messa!es is rocessed. Two functions are involved# .e!in 4aint and 1nd 4aint. case W:84%INT# hdc N .e!in4aint >hwnd' Js;F Ouse ,DI functionsP 1nd4aint>hwnd'Js;F return CF :ethod +# To !et a handle to the device conte5t of the client area of the window ,etD" is called. 3eleaseD" is used to release the D" handle. hdcN,etD">hwnd;F Ouse ,DI functionsP 3eleaseD">hwnd'hdc;F 1=. What is the use of ,et:essa!e? The ,et:essa!e function retrieves a messa!e from the Dueue and coies it to a structure of Tye :S,. 1?. What is the use of Translate:essa!e? % messa!e /oo include Translate:essa!e.' if the messa!e loo receive character inut from the &eyboard' the system !enerates virtual &ey messa!es "W8K10D)WN and W:8K10U4 to each &ey the user rocess. 1@. What is the use of Disatch :essa!e? The Disatch :essa!e function sends a messa!e to the window rocedure associated with the window handle secified in the :S, structure. 1B. What is W:84%INT messa!e? The messa!e is !enerated when a art or all of the windows client area is G invalidH and must be G udatedH which means that it must be redrawn or G aintedH . +C. ,ive some "ommon Structured Win-+ data tyes defined in the Windows header files Data tyes are .IT:%4' /),.3US2' /),A)NT' /),41N' :S,' 4)INT' 31"T' WND"/%SS. +1. ,ive some 3esources $ Icons $ "ursors $ "haracter strin!s $ "ustom resources $ :enus $ Keyboard accelerators $ Dialo! bo5es $ .itmas ++. Define event driven? 1vent driven means the flow of ro!ram e5ecution is controlled by that event that occurs as the ro!ram is runnin!. +-. What is W:8D1ST3)0 messa!e? W:8D1ST3)0 messa!e indicates that a window is in the rocess of destroyin! a window based on a command from the user. The messa!e is a result of the user clic&in! on the close button or selectin! close from the ro!ramIs System messa!e. +6. 2ow a Window ro!ram is terminated? When the ostQuit messa!e function is invo&ed it inserts a W:8QUIT messa!e in the 4ro!ramIs messa!e Dueue. ,et:essa!e returns <ero for W:8QUIT messa!e. This causes Win:ain to come out of the :essa!e /oo. The ro!ram then returns ms!W4aram and is terminated. +9. What is ,DI? The ,rahics Device Interface >,DI; rovides functions and related structures that an alication can use to !enerate !rahical outut for dislays' rinters and other devices. +=. "lassify ,DI functions. The several functions that comrise ,DI can be classified into# i. Aunctions that !et D" and release D". ii. Aunctions that !et information about D". iii Aunctions that draw somethin! on the client area. iv. Aunctions that set and !et attributes of D". v. Aunctions that wor& with ,DI rimitives. +?. What are ,DI rimitives or obRects? ,DI rimitives or obRects refer to the tyes of !rahics that can be dislayed on the client area. They are# i. /ines and curves ii. Ailled areas iii. .itmas iv. Te5t +@.What is a window and Windows? Windows is an )eratin! System >sSw that controls hSw; and window is a rectan!ular area which receives inut and dislays outut in the form of te5t and !rahics. +B. Define "hild windows. % window can have a arent window. % window that has a arent is called a child window. The arent window rovides the coordinate system used for ositionin! the child window. % window that has no arent or whose arent is des&to window is called a to*level window. -C. ,ive some child window controls. Some of the child window controls are 1dit bo5' ,rou bo5' 4ush .utton' "hec& bo5' 3adio button' static bo5. -1. What are the fields in :S, structure? 2WND# The handle to the window which the messa!e is directed to :1SS%,1# The messa!e identifier. This is a number that identifies an event W4%3%:# % -+*bit messa!e arameter .The meanin! and value of which deend on the articular messa!e. /4%3%:# %nother -+*bit messa!e arameter deendent on the messa!e. TI:1# The time the messa!e was lace in messa!e Dueue. 4T# The mouse coordinates at the time the messa!e was laced. -+. What are Dueued and non*Dueued messa!es? The Dueued messa!es are those that are laced in a ro!rams messa!e Dueue by Windows. The non*Dueued messa!es are not osted to a messa!e Dueue. The non*Dueued messa!es are the results of calls by Windows directly to window rocedure. --.,ive some messa!es used in windows? W:8"31%T1# This messa!e is sent when a window is bein! created. W:8/.UTT)ND)WN# This messa!e is sent when the user ress the left. W:8"2%3# This messa!e is sent when the user tyes a character. W:8"/)S1# This messa!e is sent when the user closes a window. W:8")::%ND# This messa!e is sent to aroriate window in resonse to user menu choices' dialo! button clic&s and so on. -6. Write the rototye of Win:ain function? Win:ain Aunction 4rototye# int WIN%4I Win:ain >2INST%N"1 hinstance' 2INST%N"1 hrevinstance' 4ST3 s<cmdline' int icmdshow; -9.Name the imortant D// files which are used for windows ro!rammin!? K13N1/-+.D//' US13-+.D//' ,D1-+.D// 4NIT II -=. What is an %lication framewor&? %lication framewor& is G an inte!rated collection of obRect*oriented software comonents that offers all thatI s needed for a !eneric alication. -?. What are the features of %lication framewor&? i.%lication framewor& alications use a standard structure. ii.%lication framewor& alications are small and fast. iii.The ("77 tools reduce codin! drud!ery. iv.The :A" library alication framewor& is feature rich. -@. What are the ("77 comonents? The ("77 comonents are 1.4roRect +. 3esource 1ditor -."S"77 "omiler 6.Source "ode editor 9.3esource comiler =. /in&er ?. Debu!!er @. %lication Wi<ard B. "lass Wi<ard 1C. Source browser 11. ,allery 1+. Windows Dia!nostic tools 1-. )nline hel 16. Source code control 19. :A" library 1=. %ctive Temlate /ibrary >%T/;. -B. What is an %lication Wi<ard? %lication Wi<ard is a code !enerator that creates a wor&in! s&eleton of a Windows alication with features ' class names and source code file names that are secified by the user. %Wi<ard !ets started when a new alication either Sin!le Document Interface or :ultile Document Interface or Dialo! based alication is created. 6C.What is a "lass Wi<ard? "lass Wi<ard is a tool usin! which member variablesF messa!es and %ctiveT events are incororated into a roRect. "lass Wi<ard is a ro!ram imlemented as a D//' thatI s accessible from ("77 view menu. "lass Wi<ard write the rototyes' function bodies and if necessary the code to lin& windows messa!e to the function. 61. What are the imortant classes of an ("77 ro!ram? i.%lication class ":y%#ublic "Win% This class creates all comonents reDuired for an alication' receives all user inuts and events and ass the messa!e to (iew and Arame classes. ii.Arame class ":ainArame#ublic "ArameWnd This class is the Window frame. It holds menu bar' status bar' and other resource attached to the frame. iii.(iew class ":y(iew#ublic "(iew This class rovides the visual reresentation. iv.Document class ":yDoc#ublic "Document This class stores all the information about the chan!es done in outut window. 6+.Define :essa!e ma. :essa!e ma is used to add member functions for the events. It contains the roRect lists' all the classes contained in the roRect which includes both built*in and user defined classes. 6-. Define :ain! modes. :ain! mode is a device conte5t attribute that defines how Windows mas lo!ical coordinates that are secified in ,DI functions to device coordinates of the articular device. 66. ,ive two :ain! mode functions. Set:a:ode>hdc' i:a:ode;# Set the main! mode' where i:a:ode is one of the ei!ht main! mode identifiers. i:a:odeN,et:a:ode>hdc;# )btain the current main! mode. 69. What are the :ain! :ode identifiers? ::8T1TT ' ::8/):1T3I" ' ::82I:1T3I" ' ::8/)1N,/IS2 ' ::82I1N,/IS2 ' ::8TWI4S ' ::8IS)T3)4I" ' ::8%NIS)T3)4I". 6=. What are the tyes of main! modes? U::82I:1T3I" U::8%NIS)T3)4I" U::8IS)T3)4I" 6?. What is a Ai5ed*scale main! mode? %ll Ai5ed scale*main! modes have a actual scale factor. In these main! modes' 5 value increases while movin! the cursor ri!ht and y value decrease as the cursor is moved down. The Ai5ed scale main! modes are ::8/)1N,/IS2' ::82I1N,/IS2' ::8/):1T3I"' ::82I:1T3I"' and ::8TWI4S. 6@. What is a (ariable*scale main! mode? With these main! modes' drawin! can chan!e the si<e as the user chan!es the si<e of the window. The two (ariable*scale main! modes are ::8IS)T3)4I"' ::8%NIS)T3)4I". 6B.What are ,DI obRects? % window ,DI obRect tye is reresented by an :A" library class. ",di)bRect is the abstract base for the ,DI obRect classes. % c77 obRect of a class derived from ",di)bRect reresents a windows ,DI obRect. 9C.:ention some of the ,DI derived classes? .".itma .".rush ."Aont ."4alette ."4en ."3!n 91. What is system font? The system font is the font that windows use by default for te5t strin! li&e strin!s in title bars' menus and dialo! bo5es. The system font is a ra<or font' which means that the characters are defined as bloc& of i5els. The si<e of the character in the system font is based on the si<e of title video dislay. 9+.What is the use of !et system metrics function? The function retrieves information about the si<e of various !rahical item in windows such as icon' occurs' title bars and scroll bars. This function is an imortant function for achievin! device indeendent !rahical outline in the ro!ram. This needs a sin!le ar!ument called an inde5. This function returns an inte!er usually the si<e of the item secified in the ar!ument. 9-. 15lain the dislay conte5t classes ""lientD" and "WindowD"? WindowI s client area e5cludes the border' the cation bar' and the menu bar. If we construct an obRect of class ""lientDc' the oint >C'C; is at the uer*left corner of the client area. If we construct an obRect of class "WindowD" the oint >C'C; is the uer* left corner of the non*client area. 96. What is the state of the device conte5t? The current state of the device conte5t includes the followin!# $ %ttached ,DI drawin! obRects such as ens' brushes' and fonts. $ The main! mode that determines the scale of items when they are drawn. $ (arious details such as te5t ali!nment arameters and oly!on fillin! mode. 99. Define font. % font is comlete collection of characters of a articular tyeface and a articular face. Aonts are !enerally stored on dis& as resources >,DI fonts;' and some are device secific >Device fonts;. 9=.What are the tyes of ,DI fonts? There are three different tyes of ,DI fonts# i. 3aster fonts ii. Stro&e fonts iii. True tye fonts. 9?. What is a dialo! bo5? % dialo! or dialo! bo5 is a window that receives messa!es' that can be moved and closed ' and that can even accet drawin! instructions in its client area. Dialo! bo5es belon! to a redefined ' e5clusive window class. %lications do not have direct access to the redefined window class' but they can use the dialo! bo5 rocedure to modify the style and behavior of a dialo! bo5. 9@.What is a modal dialo! bo5? % modal dialo! bo5 does not allow the user to switch away from it after it is invo&ed. It should be dismissed first before switchin! to any other window. 1.!.;)en dialo! bo5 of a file menu in :S*W)3D. 9B.What is a modeless dialo! bo5? % modeless dialo! bo5 allows the user to switch to other windows without dismissin! it first. .ecause of this' the variable used to imlement the modeless dialo! bo5 should not !o out of scoe in the dialo! bo5I s lifetime. 1.!.; Aind and 3elace dialo! of :S*W)3D. =C./ist Windows common Dialo! classes? B""olorDialo! B"AileDialo! B"Aind3elaceDialo! B"4a!eSetuDialo! B"AontDialo! B"4irntDialo! =1./ist out the Windows common controls. The Windows common controls are# 1.Trac& bar control or Slider control +. 4ro!ress indicator -. Sin button control 6. Ima!e /ist control 6. 1dit controls 9. %nimation control =. "ombo .o515 control ?.I4 address control @.:onth calendar control B.Date and Time control 1C. Tree control =+.What are dialo! controls? % dialo! contains a number of elements called controls. Dialo! controls include# 1dit controls' .uttons. /ist bo5es' "ombo bo5es' Static te5t' Tree views' ro!ress indicators' Sliders. =-. What is a .itma? % bitma is an array of bits in which one or more bits corresond to each dislay i5el. .itma is a ,DI obRect and it allow comuters to store comle5 ima!es in the form of CIs and 1Is. =6.What is a messa!e bo5? % messa!e bo5 is a secial dialo! bo5 that can use to dislay messa!es and romt for simle inut. % messa!e bo5 tyically contains a te5t messa!e and one or more buttons. :essa!e bo5 is a modal dialo! bo5 and the system creates it by usin! the same internal functions that Dialo! .o5 uses. =9.What are the tyes of bitmas? There are two &inds of bitmas# i. ,DI bitma or Device Deendent .itmas. ii. DI.s or Device Indeendent .itmas. ==. /ist the tyes of video cards used to dislay the colors $ U$ +9= color video card>@ bit; U$ 1= bit color video card U$ +6 bit color video card 4NIT III =?. What do you meant by Document view %rchitecture? The :A" library contains alications and frame classes lus two other classes that reresent the G documentH and G viewH . This document*view architecture is the core of the alication framewor& and is loosely based on the :odelSviewS "ontroller classes. Document*view architecture searates data from the userI s view of the data. =@. What is a :enu? % menu is a familiar alication element that consists of a to*level hori<ontal list of items with associated o*u menus that aear when the user selects a to*level menu. =B.What is an %ccelerator? %ccelerators are short cut &eys that hel to choose multile level otions of menu with a sin!le &ey. % &eyboard accelerator entry does not have to be associated with menu item. ?C. What are the functions used to load a menu? :A" rovides a class for menus' ":enu. This suorts creatin! menu items. The functions used are# i./oad :enu ii. Set :enu iii.Detach ":enu mF m./oad:enu>;F m.Set:enu>;F m.Detatch>;F ?1. What is a floatin! o*u menu? % Aloatin! 4o*u menu is the menu that is dislayed while ri!ht clic&in! the mouse any where in the window. ?+."lassify menu? % menu is a ,UI' which contains a list of menu items. The various tyes of menu are' i. System :enus ii. 4ou :enu iii. Drodown :enu ?-. What is :A" Te5t 1dition? :A" suorts te5t edition usin! two otions. i. 1dit "ontrol ii.3ich 1dit "ontrol. These are suorted by the classes "1dit(iew' "3ich1dit(iew. ?6.What is a 3ich 1dit "ontrol? 3ich 1dit "ontrol is a :A" te5t editin! feature. It suorts mi5ed font and lar!e Duantities of te5t than ordinary edit control. ?9. Define "ommand rocessin!. The alication frame wor& rovides a sohisticated routin! system for command messa!es. These messa!es ori!inate from menu selections' &eyboard accelerators' and toolbars and dialo! button clic&s. "ommand messa!es can also be sent by calls to functions Send:essa!e and 4ost:essa!e which belon! to "Wnd class. ?=.What is a toolbar? Toolbars are menu item eDuivalents. They are reresented as icons. 1ach toolbar is associated with a menu item. % toolbar consists of hori<ontally >or vertically; arran!ed !rahical buttons that must be clustered in !rous. Toolbar is an obRect of "Tool.ar. ??.Define Toolti. When the user ositions the mouse on a toolbar button for a certain interval ' te5t is dislayed in a little bo5 ne5t to button which is called as a Toolti. ?@. Define Status bar. The status bar window neither accets user inuts nor !enerates command messa!es. Its Rob is simly to dislay te5t in anes under ro!ram control. The status bar suorts two tyes of te5t anes *messa!e line anes and status indicator anes. ?B.,ive the Static Indicators array of status bar. The static indicators array that % Wi<ard !enerates in the :ainArm.c file defines the anes for the alicationI s status bar. Static UINT indicatorsOPN K ID8S14%3%T)3' ID8INDI"%T)38"%4S' ID8INDI"%T)38NU:' ID8INDI"%T)38S"3/' LF The constant ID8S14%3%T)3 identifies a messa!e*line aneF the other constants are strin! resource IDs that identify indicator anes. @C.,ive the functions to set the Status Indicators. The function "Status.ar##SetIndicators confi!ures the status bar by the information in the Indicator array. The function "Status.ar##Set4aneTe5t is used to dislay the te5t in the ane. ":ainArame VArameN>":ainArame V;%f5,et%>;*Wm8:ainWndF "Status.ar VStatusNJArame*Wm8wndStatus.arF Status*WSet4aneTe5t>C'messa!e in the ane;F @1.What are the stes to be followed to build floatin! ou menus i; Use the menu editor to insert a new' emty menu in your roRectI s resource file. ii; Tye some characters in the left to*level item' and then add your menu item in the resultin! o*u menu. iii; Use class wi<ard to add a W:8")NT1TT:1NU messa!e handler in your view class that receives mouse*clic& messa!es. @+. What is a reusable frame window? % frame class that would remember its window si<e and osition is &nown as G 3eusable Arame WindowH . @-.What is Windows 3e!istry? Windows 3e!istry is a set of system files in which Windows and the individual alications can store and access ermanent information. @6.Define Seriali<ation. )bRects can be ersistent' which means they can be saved on dis& when a ro!ram e5its and then can be restored when the ro!ram is restarted. This rocess of savin! and restorin! obRects is called G Seriali<ation.H @9.Define Slitter Window. % slitter window aears as a secial tye of frame window that holds several views in anes. Window can be divided hori<ontally' vertically ' or both hori<ontally and vertically usin! movable slitter bars. @=.What are the tyes of Slitter Window? There are two tyes of Slitter Window. i. Static Slitter Window# The number of rows and columns in a static slitter window are set when the slitter is created and cannot be chan!ed by the user. % static slitter window can have a ma5imum of 1= rows and 1= columns. ii. Dynamic Slitter Window# % dynamic slitter window is limited to a ma5imum of + rows and + columns ' but it can be slit and unslit interactively. The number of rows and columns in a dynamic slitter window can be chan!ed by the user. @?.What is Dia!nostic Dumin!? Dia!nostic dumin! is the rocess by which the memory allocated to obRects are analy<ed and freed. @@.2ow to ma&e a class seriali<able? % seriali<ation class must be derived directly or indirectly from ")bRect. In addition' the class declaration must contain the Declare*serial macro call' and the class imlementation file must contain the imlement*serial macro call. @B. What are the characteristic of SDI frame window? SDI >sin!le document interface; frame window has the followin! characteristic. X Window Si<e X Window 4osition X Window status X Windows Status X Toolbar and status bar enablin! and ositionin!. BC. What do you mean by a D//? D// stands for Dynamic /in& /ibraries. % D// is a binary file that rovides a library of functions' obRects and resources. %ll the %4I functions are contained in Dynamic /in& /ibraries. The function resent in D// can be lin&ed durin! e5ecution. B1. What are the tyes of D//S? The tyes of D//s are# i. 3e!ular D//s# It can e5ort only "*style functions. It canI t e5ort "77 classes' member functions' or over loaded functions. ii.15tension D//S# It suorts "77 interface. %n e5tension D// dynamically lin&s to the code in the D// version of the :A" library. B+. What is a "ustom "ontrol D//? D//s are used for "ustom controls are called "ustom "ontrols. It acts li&e an ordinary control' such as edit control' in that it sends W:8")::%ND messa!es to its arent window and receive user*defined messa!es. B-.What is Dynamic /in&in!? Dynamic lin&in! is a rocess of connectin! the symbolic names with address of corresondin! functions. There are two tyes of lin&in!# i. Imlicit lin&in! and ii. 15licit lin&in!. B6.What is Imlicit lin&in!? When a D// is build' the lin&er roduces a comanion imort /I. file' which contains every D//I s e5orted symbols and ordinals' but no code. When the client is loaded' Windows finds and loads the D// and then dynamically lin&s it by symbol or by ordinal. B9.What is 15licit lin&in!? When e5licit lin&in! is used' /oad/ibrary function is called' secifyin! the D//I s ath name as a arameter. /oad/ibrary returns an 2INST%N"1 arameter that can be used to call ,et4roc%ddress function ' which converts a symbol or ordinal to an address inside the D//. B=.What are the benefits of 3un*time Dynamic lin&in!? The benefits of 3un*time Dynamic lin&in! are# i.When the D// is not available ' an alication usin! load*time dynamic lin&in! simly terminates' while the dynamic lin&in! is able to resond to the error. ii.If the D// chan!es' an alication that uses load*time dynamic lin&in! may terminate' while an alication lin&ed at run*time is only affected if the desired functions are not resent in the new D//. B?. What is a view? Arom a userI s stand oint' a view is an ordinary window that the user can si<e' move' and close in the same way as any other Windows*based alication window. Arom the ro!rammerI s ersective' a view is a c77 obRect of a class derived from the :A" library. B@.Difference between sin!le and multi document interface. Sin!le document interface # %n SDI alication has' from the userI s oint of view' only one window. If the alication deends on dis&*file G documentH ' only one document can be loaded at a time. The ori!inal windows notead is an e5amle of SDI alication. :ulti document interface # %n :DI alication has multile child windows' each of which corresonds to an individual document. :icrosoft word is a !ood e5amle of :DI alication. BB.What are the disadvanta!e of usin! D//? UThe ro!rammer must have access to the source code and must be usin! the same ro!rammin! lan!ua!e with same comiler setu.U:emory and dis& sace will be wasted if several ro!rams which use the same library of code are runnin! simultaneously. 1CC.What is /oad /ibrary>; function? /oad /ibrary >; call is used to ma the D// module into the memory of our rocess. The function ta&es a sin!le arameter' the name of the module to load. 2:)DU/1 h:yDllF h:yDllNload /ibrary >G my /ibH ;F if >h:yDllNnull; SS could not load D// 1C1.What is ,et4roc%ddress >; function? The address for the individual functions before usin! them once the D// has been loaded roerly. This is done by callin! ##,et4roc%ddress>; with the handle returned by /oad/ibrary>; and the name of the function. If the function is found this will return a !eneric ointer to a function. If the function is not found' ,et4roc%ddress>; returns NU//. 4NIT I& 1C+. Define %ctiveT controls. %ctiveT controls are &nown as ro!rammer built control which can be used in Window alication. %ctiveT is a :icrosoft term refer to !rou of comonents that include controls' D// and %ctiveT documents. 1C-. Define "): >comonent obRect model; "): is a rotocol that connects one software module with another and then dros out of the icture. %fter the "onnection is made the two modules can communicate throu!h a mechanism called an interface. "): is an industry standard sSw architecture suorted by :icrosoft and many other comanies. 1C6. What are the features suorted by "):? "): rovides a unified e5andable obRect oriented communications rotocol for windows i; % standard lan!ua!e*indeendent way for a win-+ client 1T1 to load and call a win-+ D//. ii; % !eneral*urose way for one 1T1 to control another 1T1 on the same comuter. % relacement for the (.T control is an %ctiveT control. 1C9.What is the use of IUn&nown interface? I Un&nown is a secial interface to obtain the interface ointer declarled by com. 1C=.What is class factory? % class obRect is sometimes called as a class factory because it often imlements a secial com interface named I"lassAactory. 1C?.What is the use of "/SIDArom4ro!ID? "om suorts other tyes of re!istration database entry that manufactures a human* readable ro!ram ID into the corresondin! "lass ID. The com function USIAorm ro!ram ID reads the database and erform the maniulation. 1C@.What is the urose of the D1"/%31*INT13A%"1*:%4 macro? The D1"/%31*INT13A%"1*:%4 macro !enerali<es the declarations for a table that holds the IDs of the classI s entire interface. 1CB./ist out the four states that an embedded obRect can assume? The four states are !iven below i; 4assive ii; /oaded iii; 3unnin! iv; %ctive 11C.What are the secial features of container? .It handle multile documents .:aintains a temorary stora!e .%llows embedded obRects to be coied and cut to the cliboard and arted .%llows an embedded obRect to be deleted 111.2ow a "): client calls out*of rocess comonents? In case of an out*of rocess comonents "): uses its remotin! architecture which usually involves 34"S >remote rocedure calls;. In an 34"' the client ma&es callsto a secial dll called a ro5y. 4ro5y sends a stream of data to a stub which is inside a dll. In the comonents rocess when the client calls a comonents function' the ro5y alerts the stub. The mechanism of convertin! arameters to and from data streams is called marshalin!. 11+. Define )bRect :odel. The "omonent )bRect :odel secifies architecture' a binary standard and a suortin! infrastructure for buildin!' usin! and evolvin! comonent*based alications. It e5tends the benefits of obRect oriented ro!rammin! such as encasulation' olymorhism software reuse to dynamic comutin!. 11-.What is D"):? D"): stands for Distributed "omonent )bRect :odel is the distributed e5tension of "):. It secifies the additional infrastructure that is reDuired to further e5tend the benefits to networ&ed environments. 116.What are main features of "):? The features of "): include the searation of interfaces and imlementations' suort for obRects with multile interfaces' lan!ua!e neutrality' runtime binary software reuse' location transarency' architecture for e5tensibility' suort for indirection aroach to versionin! and different styles of sever lifetime mana!ement. 119.Write short notes on (ersionin!. "):I s aroach to versionin! is based on the followin! three reDuirements# %ny interface must be immutable. % new imlementation of same interfaces. "/SID must suort e5istin! %ny client must start interactin! with with an ID. a server by Dueryin! an interface 11=.Define )/1. )/1 stands for )bRect lin&in! and 1mbeddin!. )/1 is at the core of window alications. It is also a very comle5 technolo!y that could be difficult to master without the hel of :A". 11?.What are the alications of )/1? i; "omound documents. ii; )/1 controls. iii; )/1 automation. iv; )/1 dra! and dro. v; Seciali<ed*:%4I. 11@.What is marshalin!? In a remote rocedure call the client ma&es calls to ro5y. The ro5y sends a stream to a stub. When the client calls the comonent function the ro5y alerts the stub by sendin! the messa!e to the comonent ro!ram. The mechanism of convertin! arameters to and from data stream is called :arshalin!. 11B.Write the difference between )rdinary control and %ctiveT control. Windows controls send notifications to their owners by sendin! messa!esF %ctiveT controls send notifications to their containers by firin! events. 4NIT & 1+C. What are the advanta!es of usin! a real D.:S? i; Use of standard file formats ii; Inde5ed file access iii; Data inte!rity safe!uards iv; :ulti*user access control 1+1.15and the followin!F .lob' SDK' %4I' )D."' D%)? .lob *binary lar!e obRect SDK *software develoment &it %4I *alication ro!rammin! interface )D." oen database connectivity D%) *data access obRect 1++. What is rocess and thread? % rocess is a runnin! ro!ram that owns its own memory' file handles and other system resources. The searate e5ecution aths that an individual rocess can contain are called as threads. 1+-. What are the two &inds of thread? Windows offers two &inds of threads namely i; Wor&s threads ii; User interface thread 1+6.Define )D."? The :icrosoft oen database connectivity>)D."; standard defines the rules of SQ/ !rammar and also the c*lan!ua!e ro!rammin! interface to any SQ/ database. %ny D.:S that has an )D." driver can be occurred by a sin!le comiled c or c77 ro!ram odbc thus searate the user interface from the actual database mana!ement rocess. 1+9.What are the methods of .inary Interface method? The first three methods are#i; Query Interface>; for navi!atin! between interfaces of the same obRect instance. ii; %dd3ef>; for incrementin! reference counts. iii; 3elease>; for decrementin! reference counts. 1+=.Write short notes on Threadin! :odel. If an alication allows multile clients to concurrently invo&e methods of the same "): obRect' some synchroni<ation mechanisms needs to be rovided to rotect the data. % artment is lo!ical !rouin! of obRect that share the same concurrency constraints' every "): rocess can have at most one multithread aartment but it can contain multile Sin!le Thread %artments>ST%s;. 1+?.What is :TS? :TS stands for :icrosoft Transaction Server rovides another style of server ro!rammin!. :TS rovides server obRects' must be imlemented in the form of D//s that are to be hosted by :TS surro!ate rocesses. :TS rovides conte5t obRects for these server obRects so that they can articiate in transaction. 1+@.What is 3AT and where is it used? 3AT is the acronym for 3ecord Aield 15chan!e. The :A" framewor& can move data bac& and forth between the database and the member variables of your "3ecordSet by usin! record field e5chan!e which wor&s very much li&e the Dialo! Data 15chan!e mechanism used by the dialo!s and controls. 1+B.What is the use of "3ecordSet ## dynamic? This tye uses a dynamic cursor which allows scrollin! in both directions. This tye of record set allow only forward scrollin! will not reflect any chan!es made to the database. 1-C.What are the stes to create samle database? The stes are# i;Start :S %ccess ii; "reate a new table iii; 4oulate the table 1-1. Write the !eneral synta5 to create a table. ,ive one e5amle. Synta5#*"31%T1T%./1# table*name>Kcolumn name data tyeL'YYY.; 15amle#"31%T1 T%./1 1mloyee K 1mID INT1,13' 1mName (%3"2%3>9C; Salary NU:13I">='+; 15 NU:13I">9; L 1-+. 2ow to use Sin!le 3ow Aunctions? Aor functions such as "3ecordSet## ,etAield (alue >; which wor& on a sin!le row then you set the current row within row set. This is done with the set row Set"ursor4osition >; member in "3ecordSet. 1--.What is Data transfer and what are its two structures? Transferrin! data between alication are accomlished throu!h the one data obRect interface which rovides a mechanism for transferrin! data and also for notifications of chan!e in the data. The two structures are# i; A)3:%T1T" ii; ST,:1DIU: 1-6. /ist the :A"WinIent classes i; "InternetSession ii; "2tt"onnectin iii; "At"onnection iv; ",oher"onnection v; "InternetAile vi; "httAile vii; "AtAileAind viii; ",oherAileAind i5; "internet15cetion 1-9. /ist the advanta!es of WinInet over Winsoc& 1. "achin! +. Security -. Web ro5y access 6. .uffered IS) 9. 1asy %4I =. User Ariendly 1-=.Define IS%4I Server 15tensions. %n IS%4I Server 15tension is ro!ram that runs in resonse to a ,1T or 4)ST reDuest from a client ro!ram. The .rowser can ass arameters to the ro!rams' which are often values that the browser user tyes into edit' controls' selects from list bo5es and so forth. It tyically sends bac& 2T:/ code based on those arameter values. 1-?./ist :A" IS%4I Server 15tension classes i; "2ttServer ii; "2ttServer"onte5t iii; "2tmlStream 1-@. Define WINS)"K. Winsoc& is the lowest level Windows %4I for T"4SI4 ro!rammin!. 4art of the code is located in wsoc&-+.dll and art is inside the Windows &ernel. 1-B./ist the comonents of )/1D. %rchitecture. i. 1numerators ii. Data source obRects iii. "ommands iv. 3ow sets v. 1rrors vi. Transaction obRects. 16C.What is WinInet? The WinInet >Windows Internet; is a hi!her*level %4I than winsoc& and is a collection of hi!h*level functions that assist a ro!rammer in usin! three oular Internetrotocols# the 2yerte5t Transfer 4rotocol >2TT4; used for the World Wide Web' the Aile Transfer 4rotocol >AT4;' and another file transfer rotocol &nown as ,oher in both asynchronous and synchronous modes. 161. Define IIS. :icrosoft IIS >Internet Information Server; is a hi!h*erformance InternetSIntranet server that ta&es advanta!e of Windows NT features such as IS) comletion orts' the win-+ function TransmitAile' file*handle cachin!' and "4U scalin! for threads. IIS is a secial &ind of Win-+ ro!ram called a service actually three services*WWW' 2TT4' and !oher *in one ro!ram called inetinfo.e5e. 16+.Define IS%4I. %n IS%4I >internet Service %4I; server e5tension is a ro!ram that runs in resonse to a ,1T or 4)ST reDuest from a client ro!ram>browser;. 16-.What is :ulti threadin!? It is the ability for a ro!ram to multitas& within itself. The ro!ram can slit itself in to searate ZthreadsZ of e5ecution that also seem to run concurrently. 166.Write the :A" WinInet "lasses. "InternetSession' "2tt"onnection' "At"onnection' ",oher"onnection. 169.Write the :A" )D." "lasses. "Database' "3ecordSet' "3ecord(iew. 16=.Write the :A" D%) "lasses. "DaoDatabase' "Dao3ecordSet' "DaoTableDef' "DaoQueryDef' "DaoWor&sce' "Dao15cetion' "DaoAield15chan!e. 16?. Differentiate NTAS from A%T. NTAS X Networ& Aile System X :ore Secured X User 4ermission for individual files and folders X Used with WinNT and above A%T X Aile %llocation Table X /ess Secured No individual user ermissions Used with Win B9'B@ 16@. What is Snashot and Dynaset? Snashot is a 3ecordSet tye. Snashot downloads the entire Duery in one shot. .ut occuy more memory to hold data. It has data as a static coy. When any chan!es made to the database will not reflect to the current alication. Dynaset is a 3ecordSet tye. In Dynaset only the records you actually need to fill the screen will !et downloaded. "onstantly resynchroni<es the recordset' so that any chan!es will reflect immediately. Ta&e less time to reflect. 5$ .),6( 4/'t I 1. Write a ("77 ro!ram to create a window. 15lain all the functions and messa!eloo. +. 15lain in detail about the architectural overview of windows ro!rammin!? -.15lain ,DI function and ,DI rimitives. 6. 15lain the two methods used for !ettin! Device "onte5t 2andle? %ns# :ethod 1 .y rocessin! W:84%INT messa!e Two function used# .e!inaint>; 1ndaint>; :ethod+ .y callin! the function ,1TD">; 3eleaseD">; 9. 15lain child window controls? 4/'t II 1.15lain various visual "77 comonents? +.I; 15lain in detail bitmas loadin! into your alication. II; Write a ("77 ro!ram to dislay the sum of two numbers usin! modal and modeless dialo!s. -. I; Write a ("77 ro!ram to draw a rectan!le J ellise. ii; 15lain main! models? 6.15lain :A" library in detail. 9.15lain windows common controls? 4/'t III 1. What is D//? "reate a D// to add J multily two numbers and how it can be used in alication? +. What is a &eyboard accelerator? 15lain how to imlement the accelerator in a Toolbar? 15lain with e5amle? -. Write a ("77 ro!ram to dislay &eyboard ressed? 6. I; Write a ("77ro!ram to dislay mouse coordinates? ii; 15lain slitter window J multile views? 9. 15lain document view architecture? 4/'t I& 1. What is an %ctive T control? 2ow to build an alication that uses a calendar control in a dialo!? +. 15lain in detail container*comonent interaction? -.15lain )/1 dra! J dro? 6. "reate an %ctive T control at runtime? >)r; Write a ("77 ro!ram to create a Dynamic %ctiveT control? 9. 15lain "):? 4/'t & 1. What is a D.:S? What is an SQ/? 15lain :A" )D." classes? 15lain filter J short strin!s? +. I; 15lain with e5amle the Winsoc& class? ii; 15lain Threadin!? -.15lain data access throu!h )D." with e5amle? %nswer i; Database creation ii; )en ("77 iii; "onnect database with ("77 throu!h )D.". 6. Write a ("77 ro!ram for chat alication. 9. Write a ("77 ro!ram for layin! an i; %udio file ii; (ideo file