Click to See Complete Forum and Search --> : NewBie in Device Context
maxiis
January 3rd, 2007, 09:58 PM
hi guy im a student now currently work on a project that require me to work with device context. but i not sure how it work do u guy have any example to teach me about device context and (sample will be great). And how do i draw on the other dialog in the same program.
Any help would be great.
HanneSThEGreaT
January 4th, 2007, 04:52 AM
Device Context Definition (http://encyclopedia.thefreedictionary.com/device+context)
maxiis
January 4th, 2007, 10:50 AM
thank man. i have another problem is that how i going to draw on different dialog(like get DC from that dialog so that i can draw rect or circle on the second dialog on a same program).
any Help would be Great.
HanneSThEGreaT
January 5th, 2007, 01:40 AM
I'd also recommend having a look at the following link :
CDC Class Members on MSDN (https://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_cdc_class_members.asp)
Orf
January 9th, 2007, 06:24 AM
thank man. i have another problem is that how i going to draw on different dialog(like get DC from that dialog so that i can draw rect or circle on the second dialog on a same program).
You have to get the DC handle of the dialog (well, of the "window") onto you want to draw, then supply that handle to the drawing functions.
maxiis
January 9th, 2007, 10:54 AM
You have to get the DC handle of the dialog (well, of the "window") onto you want to draw, then supply that handle to the drawing functions.
but which function is to get the DC handle of the other window/dialog. isiz GetDC()or GetHandle?
Orf
January 9th, 2007, 11:41 AM
HWND GetSafeHwnd( ) const;
Is a member of CWnd.
Mike Harnad
January 9th, 2007, 02:07 PM
Before drawing directly on the dialog with a device context, I would recommend you take a look at using some form of control first (picture control?).
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.