Premium Essay

Qewqe

In: Computers and Technology

Submitted By zennia
Words 514
Pages 3
Windows Programming
Assignment No.1
Group 4

Submitted To: Submitted By: E.R. Mandeep Kumar Zennia 81307113049 I.T.

Q.NO.1 What is device context? Explain how it is used.
Ans.
Device Context:
A data structure in Windows programming that is used to define the attributes of text and images that are output to the screen or printer. The device context (DC) is maintained by GDI. A DC, which is a handle to the structure, is obtained before output is written and released after the elements have been written. One of the advantages of windows is its device independence. Device independence means that same program should be able to work using different devices like keyboard, screen, printer etc without modification to the program. Windows take care of the hardware allowing the programmer to concentrate on the program itself.
How is it used: Windows program do not send data directly to the screen or printer. Instead, the program contains a handle (ID value) for the screen or printer’s device context. The output data is sent to the device context (DC) and then windows take care of sending it to the real hardware. The part of windows that converts the windows graphics function calls to the actual commands sent to the hardware is the GDI (Graphics Device Interface). He GDI is program file called GDI.EXE that is stored in the Windows System Directory. The Windows Environment will load GDI.EXE into memory when it is needed for graphical output.

Getting and Releasing the handle of Device Context: To get the handle of DC : GetDC(hWnd)

Similar Documents

Free Essay

Marcantile Bank Ltd, Bangladesh

...Company profile Akij Food and Beverage Ltd. “Brings Quality in Life”. 1. History: Akij Food & Beverage Ltd. (AFBL) a unit of Akij Group started its operation in the year 2006. AFBL manufactures a wide range of Snacks and Beverage for both National & International market alike. AFBL is a project worth $ 70 million& is funded by the parental company Akij Group. AFBL started its production at 400 bph in the carbonated soft drinks line and 300 bph in the juice line. In a span of one and a half years we have increased our capacity to 1800 bph. At present our capacity; one is at the ground breaking rate of 1900 bph. So in approximately three years time our capacity has increased three folds. During this same period most of our brands became either number one or are almost on the verge of becoming number one in their respective categories. Most of our machineries have been imported from world famous brands as Krones, Tetra Pak, Alfalaval, Sipa, and Husky to achieve the best quality. The history of Akij Group stretches back to later part of the forties. In its infancy, the Group started in humble way with jute trading which was known as the golden fiber of the country, earning highest amount of foreign exchange. Akij Group's ceaseless efforts with dynamic management and support from our numerous clients have led our Group in diversifying its business activities. In the second phase, the Group went into manufacturing...

Words: 2744 - Pages: 11