1

Topic: Whether probably somehow to draw a window on the screen, and in storage?

The task approximately the such: to create normal CDialog which will not be displayed on the screen, but its contents can be analyzed.

2

Re: Whether probably somehow to draw a window on the screen, and in storage?

Hello, C0x, you wrote: C0x> the Task approximately the such: to create normal CDialog which will not be displayed on the screen, but its contents can be analyzed. Too it is very interesting. Once there was such task regular methods it did not turn out. The same richedit refused flatly to be drawn in storage. Though the Windows draw the transparent windows and rdp work mean somehow it is possible.

3

Re: Whether probably somehow to draw a window on the screen, and in storage?

Hello, C0x, you wrote: C0x> the Task approximately the such: to create normal CDialog which will not be displayed on the screen, but its contents can be analyzed. What means "to analyze contents"? And generally why it is impossible? Standardly we create dialogue, only from WM_INITDIALOG it is done to dialogue ShowWindow + SW_HIDE, and it is returned FALSE.

4

Re: Whether probably somehow to draw a window on the screen, and in storage?

Hello, kov_serg, you wrote: _> the Same richedit refused flatly to be drawn in storage. For this purpose it is necessary  Windowless RichEdit.

5

Re: Whether probably somehow to draw a window on the screen, and in storage?

Hello, Carc, you wrote: a C> Hello, kov_serg, you wrote: _>> the Same richedit refused flatly to be drawn in storage. A C> For this purpose it is necessary  Windowless RichEdit. It was necessary under WinXP and WinNT there and then minimal requirement Windows Vista.

6

Re: Whether probably somehow to draw a window on the screen, and in storage?

Hello, kov_serg, you wrote: _> Hello, Carc, you wrote: a C>> Hello, kov_serg, you wrote: _>>> the Same richedit refused flatly to be drawn in storage. A C>> For this purpose it is necessary  Windowless RichEdit. _> It was necessary under WinXP and WinNT there and then minimal requirement Windows Vista. Well and in what a problem then? What under Vistoj  above will not work IText *** which worked under 2, and 98th? Whether With ? Was specific Windowsless did not check, but here right now on 7-ke one fake which with might and main uses Text Object Model for RichEdit works for me. As poured in works, without a knot and . So I do not see a problem...

7

Re: Whether probably somehow to draw a window on the screen, and in storage?

Hello, Carc, you wrote: a C> Hello, C0x, you wrote: C0x>> the Task approximately the such: to create normal CDialog which will not be displayed on the screen, but its contents can be analyzed. The C> That means "to analyze contents"? Something means there is drawn also to me it is periodically necessary to receive it. For example, there is  which something draws periodically. The C> And generally why is impossible? Standardly we create dialogue, only from WM_INITDIALOG it is done to dialogue ShowWindow + SW_HIDE, and it is returned FALSE. If I make SW_HIDE then there something generally will be drawn and I can receive it somehow?

8

Re: Whether probably somehow to draw a window on the screen, and in storage?

Hello, Carc, you wrote: a C> Hello, kov_serg, you wrote: _>> Hello, Carc, you wrote: a C>>> Hello, kov_serg, you wrote: _>>>> the Same richedit refused flatly to be drawn in storage. A C>>> For this purpose it is necessary  Windowless RichEdit. _>> It was necessary under WinXP and WinNT there and then minimal requirement Windows Vista. A C> Well and in what a problem then? What under Vistoj  above will not work IText *** which worked under 2, and 98th? Whether With ? Was specific Windowsless did not check, but here right now on 7-ke one fake which with might and main uses Text Object Model for RichEdit works for me. As poured in works, without a knot and . A C> So I do not see a problem... The Problem in that that now is not necessary

9

Re: Whether probably somehow to draw a window on the screen, and in storage?

Hello, C0x, you wrote: C0x> If I will make SW_HIDE then there something generally will be drawn and I can receive it somehow? I am am tormented with vague doubts... But the automatic machine most likely anything  will not be, for from what to it? But it is possible to try certainly pens it to pull on the timer on this subject,  to a kontrolu \window that-thread like WM_PAINT, WM_PRINTCLIENT... But I such did not try. At me the task was easier: to remove everyone  like layout , inscriptions on them ...

10

Re: Whether probably somehow to draw a window on the screen, and in storage?

Hello, Carc, you wrote: a C> Hello, C0x, you wrote: C0x>> If I will make SW_HIDE then there something generally will be drawn and I can receive it somehow? Cs> torment Me vague doubts... But the automatic machine most likely anything  will not be, for from what to it? Here and I think from what a C> But it is possible to try certainly pens it to pull on the timer on this subject,  to a kontrolu \window that-thread like WM_PAINT, WM_PRINTCLIENT... But I such did not try. At me the task was easier: to remove everyone  like layout , inscriptions on them ... At me the task will write a bot which in the latent mode to play  and not to hinder the user on the screen. Decided to make by means of CHtmlDialog. But here the hitch as to remove it now from eyes down with.

11

Re: Whether probably somehow to draw a window on the screen, and in storage?

Hello, C0x, you wrote: C0x> the Task approximately the such: to create normal CDialog which will not be displayed on the screen, but its contents can be analyzed. How much I remember: 1. It is possible to draw in CBitmap, it is possible to create somehow on it CDC, it is necessary . 2. To draw dialogue in the CDC too it is possible, superimpose messages WM_PAINT and WM_ERASEBKGND and do there everything that want.

12

Re: Whether probably somehow to draw a window on the screen, and in storage?

Hello, Went, you wrote: W> Hello, C0x, you wrote: W> 2. To draw dialogue in the CDC too it is possible, superimpose messages WM_PAINT and WM_ERASEBKGND and do there everything that want. If I superimpose OnPaint or even at all anything I will not do there the window as was drawn and will be drawn on the screen.

13

Re: Whether probably somehow to draw a window on the screen, and in storage?

Hello, C0x, you wrote: C0x> If I will superimpose OnPaint or even at all anything I will not do there the window as was drawn and will be drawn on the screen. Here the working code: void CTreeCtrlEx:: OnPaint () {CPaintDC dc (this);//Create a memory DC compatible with the paint DC CDC memDC; memDC.CreateCompatibleDC (&dc); CRect rcClip, rcClient; dc. GetClipBox (&rcClip); GetClientRect (&rcClient);//Select a compatible bitmap into the memory DC CBitmap bitmap; bitmap. CreateCompatibleBitmap (&dc, rcClient. Width (), rcClient. Height ()); memDC.SelectObject (&bitmap);//Set clip region to be same as that in paint DC CRgn rgn; rgn. CreateRectRgnIndirect (&rcClip); memDC.SelectClipRgn (&rgn); rgn. DeleteObject ();//First let the control do its default drawing. CWnd:: DefWindowProc (WM_PAINT, (WPARAM) memDC.m_hDC, 0);//Something here still we draw in memDC//And at one stroke we draw all on the screen dc. BitBlt (rcClip.left, rcClip.top, rcClip. Width (), rcClip. Height (), &memDC, rcClip.left, rcClip.top, SRCCOPY); memDC.DeleteDC ();} we at first draw  in , then it we put on the screen. Dialogue will have still OnNCPaint or somehow so, in sense, a drawing not-client areas, frames. Probably, still it is required to cock flag CS_OWNDC for a window class, but, in my opinion, it not that case. If the problem that dialogue is drawn in , and children - is not present, it already a question another. Here it is necessary or to intercept somehow drawing of children, or to all children to do the drawing, or somehow to force these children to use ours DC. It is necessary to understand that  in Windows are drawn is not cascade and who when considers necessary, it too can create problems.

14

Re: Whether probably somehow to draw a window on the screen, and in storage?

Hello, Went, you wrote: W> Here the working code: In present MFC there is class CMemDC, in which  all this operation with contexts in storage. Now in output agent WM_PAINT simply we create copy CMemDC and it is drawable all already in storage, and in  he  that drew all on the screen. CPaintDC dc (this); CMemDC memDC (dc, this); CDC* pDC = &memDC.GetDC ();//it is drawable in pDC