Click to See Complete Forum and Search --> : newbie questions


Zanarkand
April 22nd, 2003, 05:52 AM
i'm not quite sure i get what's a device context? from what i read, it's something that let you control/draw on a ...window?
:confused:if that's so, then what's the diff between hDC, hInstance, hWnd? :confused:very confused about these handles...someone please explain :(

are all types of control in winapi referred to as a window? like...all those buttons, edit, static etc?

if that's so, all those controls are window, then does that mean i can use hDC to draw in those controls? like...drawing shapes in an edit box?:confused:

also, everything controls are said to be a "child window" of the main window itself?

thanks

mahanare
April 22nd, 2003, 06:06 AM
Windows way of dealing with peripherals is Device context.

For each device there will be a device context which acts as an interface b/w the application and the device.
In this way suppose u want to use printer then u should use printer device context. a Device context contains all the required references to the device. what we have to do is use the supported functions and get the work done.

Next:
You were talking about handles right.
a handle is a nothing but a number which gives reference to the window or anything u r refering to.
Better u go through some vc++ book it will cater ur needs.
don try to ask questions like this unless and until it is a must.
there is no body to teach u throgh this boards..
do remember that.

yah, for ur next question all buttons etc all the controls are windows only. they inherit the base class may be CWnd (i think i have to refer) but with some different functionality.


again i tell u go through some tutorial or some book or see the various FAQs of codeguru.com etc.

cheers
mahanare