Drawing continuously(dynamically) in MFC .

Hi Folks,


I have to develop an application in which I would like to paint the
screen (view/dialog) as long as the application exists. I am recieving
some data from the below layers and I should paint the screen
accordingly. In betwwn user may click on the screen , can change the
color of the line I have drawn etc.

Correct me If I am wrong..If I draw my screen from OnPaint or OnDraw()
my application would hang and I want to handle other events also so
this option is ruled out.

So what may be the solution , I have to remember what I have drawn
using some data structure and tell Onpaint function to draw those
everytime it gets called ?
or is there any other better way of doing that?

Please post a link to a sample if u have .

Regards,
JustLikeDat

0
8/21/2007 3:19:34 PM
vc.mfc 33608 articles. 0 followers. Follow

13 Replies
263 Views

Similar Articles

[PageSpeed] 29

I'm not sure if I understand exactly what you want but you should definitely 
avoid a loop in OnDraw() if that is what you are asking.

The first thing I would do is optimize OnDraw() so that it is very efficient 
by being able to draw only the data that's changed, and scrolling the window 
contents if needed rather than simply redrawing the entire screen. Use the 
Hint argument if at all possible.

Second, then call OnUpdate()/OnUpdateAllViews() whenever the data changes. 
This could be called whenever you receive new data. Or, if that's not 
possible, use a timer handler that calls the update routine.

You definitely need to coorperate with the Windows model of handling events. 
An endless loop anywhere in your main thread would definitely be bad. But, 
if for some reason the above approach doesn't work for you, you could also 
consider creating a worker thread that loops. It would have to constantly 
test some variable to see if it should stop that the rest of your program 
could set.

-- 
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com


<ggurubasavaraja@gmail.com> wrote in message 
news:1187709574.435770.80340@x35g2000prf.googlegroups.com...
> Hi Folks,
>
>
> I have to develop an application in which I would like to paint the
> screen (view/dialog) as long as the application exists. I am recieving
> some data from the below layers and I should paint the screen
> accordingly. In betwwn user may click on the screen , can change the
> color of the line I have drawn etc.
>
> Correct me If I am wrong..If I draw my screen from OnPaint or OnDraw()
> my application would hang and I want to handle other events also so
> this option is ruled out.
>
> So what may be the solution , I have to remember what I have drawn
> using some data structure and tell Onpaint function to draw those
> everytime it gets called ?
> or is there any other better way of doing that?
>
> Please post a link to a sample if u have .
>
> Regards,
> JustLikeDat
> 

0
jwood (1291)
8/21/2007 3:44:12 PM
If you are going to draw continuously you will block everything no matter 
what.  I would suggest drawing every so often (Every 500 millseconds or so). 
TVs refresh at 30 frames pre second, and a human eye can't really see the 
refresh rate at 20 frames per second.
Anyway, if I was doing this I would probably do the drawing to an offscreen 
DC/Bitmap and then force a WM_PAINT (Invalidate(),UpdateWindow()) when the 
new image is ready.  If the drawing takes too long you can even put the 
drawing to the offscreen bitmap in a seperate thread.

AliR.


<ggurubasavaraja@gmail.com> wrote in message 
news:1187709574.435770.80340@x35g2000prf.googlegroups.com...
> Hi Folks,
>
>
> I have to develop an application in which I would like to paint the
> screen (view/dialog) as long as the application exists. I am recieving
> some data from the below layers and I should paint the screen
> accordingly. In betwwn user may click on the screen , can change the
> color of the line I have drawn etc.
>
> Correct me If I am wrong..If I draw my screen from OnPaint or OnDraw()
> my application would hang and I want to handle other events also so
> this option is ruled out.
>
> So what may be the solution , I have to remember what I have drawn
> using some data structure and tell Onpaint function to draw those
> everytime it gets called ?
> or is there any other better way of doing that?
>
> Please post a link to a sample if u have .
>
> Regards,
> JustLikeDat
> 


0
AliR3470 (3234)
8/21/2007 3:44:48 PM
On Tue, 21 Aug 2007 08:19:34 -0700, ggurubasavaraja@gmail.com wrote:

>Hi Folks,
>
>
>I have to develop an application in which I would like to paint the
>screen (view/dialog) as long as the application exists. I am recieving
>some data from the below layers and I should paint the screen
>accordingly. In betwwn user may click on the screen , can change the
>color of the line I have drawn etc.
>
>Correct me If I am wrong..If I draw my screen from OnPaint or OnDraw()
>my application would hang

Why do you say that?

>and I want to handle other events also so
>this option is ruled out.

You would never enter a loop to repaint the screen over and over again. If
you wanted to do animation, you would use some timer-based method that
returns to the message loop regularly.

>So what may be the solution , I have to remember what I have drawn
>using some data structure and tell Onpaint function to draw those
>everytime it gets called ?

In a nutshell, that's it. You have to be able to paint the invalid part of
your window whenever you receive the WM_PAINT message. I'm sure MSDN has a
lot more on this.

>or is there any other better way of doing that?
>
>Please post a link to a sample if u have .

See the Scribble and DrawCLI examples.

-- 
Doug Harrison
Visual C++ MVP
0
dsh (2499)
8/21/2007 3:53:19 PM
<ggurubasavaraja@gmail.com> wrote in message 
news:1187709574.435770.80340@x35g2000prf.googlegroups.com...

> I have to develop an application in which I would like to paint the
> screen (view/dialog) as long as the application exists. I am recieving
> some data from the below layers and I should paint the screen
> accordingly. In betwwn user may click on the screen , can change the
> color of the line I have drawn etc....

All Windows applications should paint the client area of window in response 
to WM_PAINT messages.   You make sure you get a WM_PAINT message by using 
Invalidate() or InvalidateRect() to tell Windows that an area needs 
painting.

In the MFC doc-view architecture, you store data in the document which 
determines the visible appearance, and paint the view window according to 
its contents.

So when you receive data, (from a user action or from anywhere else) you use 
it to update the document, and having done so you invalidate the appropriate 
area of the view(s).    You'll then get a WM_PAINT message whch tells you 
which area to draw.

The important thing is that Windows is quite clever about sending WM_PAINT 
messages.  If two or three things happen at once, the idea is that you won't 
be waiting fo the window to be updatae only to have it updated again.

So "continuous drawing" is just a question of "regular invalidation", and 
allowing the drawing to happen when Windows wants you to do it.

[There's also UpdateWindow() which forces redrawing of all invalid areas 
"now" - but you may be able to get by without it.]

Dave
-- 
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm







0
dave9996 (486)
8/21/2007 6:26:25 PM
I don't see why drawing your screen from OnPaint or OnDraw has the effect you describe.
Why would the application hang?  They do their drawing, they return, life goes on.

If you have some source of data, the more common approach is to start one or more threads
that obtain the data, so they do not interfere with what you are doing in the main GUI
thread.  

For low data rates you can PostMessage from the thread to the main GUI thread to cause
redrawing to happen.  See my essay on worker threads on my MVP Tips site, or my essay on
serial port I/O.  For high data rates, see my essay on I/O Completion Ports as an
interthread queueing mechanism.

Note that at any instant, you need to have EVERYTHING necessary to COMPLETELY redraw the
contents of a window at any moment, without warning.  So what you would be doing with the
PostMessage is recording whatever is required to redraw the display, but it doesn't
actually redraw it.  Instead, it selectively will InvalidateRect whatever part of the
display requires redrawing.  I use a technique like this to draw real-time data from a
mass spectrometer which is running continuously.  I have one thread to send requests to
the MS, one to receive its replies, another to send the data to a named pipe so the user
can get the raw data stream, and of course the main GUI thread to do the actual drawing.
It is reasonably straightforward to do this, and is the normal way this sort of thing is
handled.
					joe
  
On Tue, 21 Aug 2007 08:19:34 -0700, ggurubasavaraja@gmail.com wrote:

>Hi Folks,
>
>
>I have to develop an application in which I would like to paint the
>screen (view/dialog) as long as the application exists. I am recieving
>some data from the below layers and I should paint the screen
>accordingly. In betwwn user may click on the screen , can change the
>color of the line I have drawn etc.
>
>Correct me If I am wrong..If I draw my screen from OnPaint or OnDraw()
>my application would hang and I want to handle other events also so
>this option is ruled out.
>
>So what may be the solution , I have to remember what I have drawn
>using some data structure and tell Onpaint function to draw those
>everytime it gets called ?
>or is there any other better way of doing that?
>
>Please post a link to a sample if u have .
>
>Regards,
>JustLikeDat
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15977)
8/21/2007 8:09:50 PM
Thanks a lot for ur replies.

I think I undesrstood how to draw continuously onto a screen (window/
view) . But I dont have any idea about how to store what I have
drawn.
Say for example I have drawn 3 bitmaps and 4 lines between those
bitmaps .I should have a data structure which would contain the
position of the itmes I have drawn, the size  etc.  And I will keep on
addding new items to this pool.
I think I ll have to impliment this mechanism in document also. Then
draw these items everytime in the WM_PAINT handler or my OnDraw()
function.
For a big GDI application I think this would be very critical as the
speed of the application depends on this.
Is there any optimal mechanism to impliment this? if I use GDI+ would
this implimentation change?
Please throw some light on this ..


0
8/22/2007 6:40:53 AM

ggurubasavaraja@gmail.com wrote:

> Thanks a lot for ur replies.
> 
> I think I undesrstood how to draw continuously onto a screen (window/
> view) . But I dont have any idea about how to store what I have
> drawn.
> Say for example I have drawn 3 bitmaps and 4 lines between those
> bitmaps .I should have a data structure which would contain the
> position of the itmes I have drawn, the size  etc.  And I will keep on
> addding new items to this pool.
> I think I ll have to impliment this mechanism in document also. Then
> draw these items everytime in the WM_PAINT handler or my OnDraw()
> function.
> For a big GDI application I think this would be very critical as the
> speed of the application depends on this.
> Is there any optimal mechanism to impliment this? if I use GDI+ would
> this implimentation change?
> Please throw some light on this ..

If you are doing something on the line of a 'scope' output, I recall 
some stuff on codeproject that didn't look bad.

I don't know, but have you downloaded those examples?

Best, Dan.

0
public21 (290)
8/22/2007 6:45:04 AM
Hi Dan,

I did not get ur first statement ..
anyways I have downloaded many examples , but few are very complex and
some examples does not address this issue..

regards,
JustLikeDat

0
8/22/2007 9:09:30 AM
<ggurubasavaraja@gmail.com> wrote in message 
news:1187773770.975988.124150@x40g2000prg.googlegroups.com...
> Hi Dan,
>
> I did not get ur first statement ..

'scope' = Oscilliscope

Les


0
8/22/2007 10:16:27 AM
Dan,

I did not find any sample of that type.
It would be great if you paste a link to that sample.

Regards,
JLD


0
8/22/2007 11:27:18 AM
http://www.codeproject.com/miscctrl/oscope.asp


AliR.

<ggurubasavaraja@gmail.com> wrote in message 
news:1187782038.180576.214360@m37g2000prh.googlegroups.com...
> Dan,
>
> I did not find any sample of that type.
> It would be great if you paste a link to that sample.
>
> Regards,
> JLD
>
> 


0
AliR3470 (3234)
8/22/2007 3:39:25 PM
Thanks a ton AliR

0
8/23/2007 4:40:37 AM
The key here is that you never actually draw anything on the window from anywhere except
the OnPaint handler.  Therefore, it is essential that you have some data structure of some
sort (the exact details always depend upon the nature of the application) which contains
all the information you need to completely draw everything you want on the window.  To
update the display, you add new stuff, and Invalidate the window (or as small a piece of
the window as you can manage).

So indeed you would do as you describe.  The most common way to handle this is to create a
single abstract superclass

class DrawingObject {
     public:
         virtual void Plot(CDC & dc) PURE;
};

Now you would have some structure of DrawingObjects, for simplicity, let's use a CArray:

CArray<DrawingObject *, DrawingObject *> DisplayList;

then you write OnPaint as

void CMyClass::OnPaint()
    {
     CPaintDC dc(this);
     for(INT_PTR i = 0; i < DisplayList.GetSize(); i++)
         DisplayList[i]->Plot(dc);
    }

or OnDraw as

void CMyClass::OnDraw(CDC * pDC)
    {
     for(INT_PTR i = 0; i < DisplayList.GetSize(); i++)
	DisplayList[i]->Plot(*pDC);
   }

now you can derive classes, e.g.,

class CDrawingBitmap : public CDrawingObject {
    public:
        virtual void Plot(CDC & dc);
        CPoint pt;
        CBitmap bmp;
};

void CDrawingBitmap::Plot(CDC & dc)
    {
     ...set up memory DC, etc.
     dc.BitBlt(pt.x, pt.y, bminfo.bmWidth, bminfo.bmHeight, &memDC, 0, 0, SRCCOPY);
    }

class CDrawingLine : public CDrawingObject {
     public:
        CDrawingLine() { LPen.lopnStyle = PS_SOLID; 
                                      LPen.lopnWidth = 0; 
                                      LPen.lopnColor = RGB(0,0,0); 
                                      rop = R2_COPYPEN;  }
        virtual void Plot(CDC & dc);
        CPoint pt0;  // first endpoint
        CPoint pt1;  // second endpoint
        LOGPEN LPen;
        int rop;        
};

void CDrawingLine::Plot(CDC & dc)
   {
    int save = dc.SaveDC(); 
    CPen pen;
    pen.CreatePenIndirect(&LPen);
    dc.SelectObject(&pen);
    dc.SetROP2(rop);
    dc.MoveTo(pt0);
    dc.LineTo(pt1);
    dc.RestoreDC(save);
   }

class CPolygon : public CDrawingObject {
      public:
           virtual void Plot(CDC & dc) PURE;
           CPolygon() { LPen.lopnColor = ...etc...
                                  LBrush.lbStyle = BS_SOLID;
                                  LBrush.lbColor = RGB(0,0,0);
                                  LBrush.lbHance = 0; // depends on style
                               }
           CRect boundingbox;
           LOGPEN LPen;
           LOGBRUSH LBrush;
};

class CEllipse : public CPolygon {
      public:
            virtual void Plot(CDC & dc);
            CEllipse() : CPolygon() { }
};

void CEllipse::Plot(CDC & dc)
    {
     int save = dc.SaveDC();
     CPen pen;
     pen.CreatePenIndirect(&LPen);
     CBrush br;
     br.CreateBrushIndirect(&LBrush);
     dc.SelectObject(&br);
     dc.SelectObject(&pen);
     dc.Ellipse(&boundingbox);
     dc.RestoreDC(save);
    }

and so on.  You can build much more complex class structures. 
           

Note that this is analogous to a structure you might have in the document, but the
document might represent these in a more abstract way.  For example, the document might
merely note that there are objects with connectivity.  A->B->C, for example.  But the View
logic you implement figures out that A is a transistor, B is a resistor, and C is a
capacitor, and given the screen space and layout rules, will create the actual display
list, select the bitmaps that represent a transistor, resistor, or capacitor (and these
might be localized, since there are alternative representations of these components; in
spite of the apparent standardization, I remember that European schematics were harder to
read than the American ones I was familiar with.  And reading a relay circuit diagram for
industrial controls, or for phone switching controls, requires reading entirely different
symbols than classic "relay" symbols used in other contexts.  So what bitmaps you use to
represent whatever you are representing might change depending on locale).  The view would
have information about the local implementation; the document would contain the abstract
specification of your diagram.  Note that the document might implement semantics about the
objects, but the view has only information about how they are displayed.

Largely, the representation of objects like this hasn't changed since SketchPad was done
by Ivan Sutherland in 1961.  I've used these kinds of representations on PDP-11 graphics
controllers, on Z80s with 80x80 LCD panels, on MS-DOS, on the Macintosh, and in every
version of Windows.  GDI+ can add interesting parameters such as alpha blending, but the
basic concept doesn't change.  You can use a CArray, std::vector, CList, std::list, etc.
to hold these objects, but the basic idea doesn't change at all.
						joe

On Tue, 21 Aug 2007 23:40:53 -0700, ggurubasavaraja@gmail.com wrote:

>Thanks a lot for ur replies.
>
>I think I undesrstood how to draw continuously onto a screen (window/
>view) . But I dont have any idea about how to store what I have
>drawn.
>Say for example I have drawn 3 bitmaps and 4 lines between those
>bitmaps .I should have a data structure which would contain the
>position of the itmes I have drawn, the size  etc.  And I will keep on
>addding new items to this pool.
>I think I ll have to impliment this mechanism in document also. Then
>draw these items everytime in the WM_PAINT handler or my OnDraw()
>function.
>For a big GDI application I think this would be very critical as the
>speed of the application depends on this.
>Is there any optimal mechanism to impliment this? if I use GDI+ would
>this implimentation change?
>Please throw some light on this ..
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15977)
8/23/2007 5:23:10 AM
Reply:

Similar Artilces:

How to create MFC child window with parent given as HWND ?
Can I create a window with some template parent and after it just call : ::SetParent( m_cWnd.m_hWnd, hWnd ); on MFC widow. Will it work ? Thanks in adwance, Adam Avoid the use of SetParent. What is it you are trying to do? There is no such thing as "creating a window with some template". There is creating dialogs from templates, and creating windows. In either of these cases, you specify the parent, so there is no need to SetParent. Generally, if you are using SetParent, you are either doing something completely wrong, or there is a better way to do it. joe On Fri, 18...

in word, i want to change subsection 3.2 to 4 and continue
not sure what u call the labelling, but below u can see "3 tools" and then 3.1 and 3.2 etc. I want to change 3.3 to the higher level label (like 3, but in this case 4, and update the number going forward). ################################################### 3 Tools There are several intelligent matrix switches on the market and there are many similarities in some of the products available. Two that will be discussed here are the Gigavue-420 from Gigamon and the NetOptics Director. (The NetOptics products are also re-branded be Netscout.) 3.1 Gigavue-420 Key Feature...

Text Box dynamic Color Fill
Hi, I have a textbox in excel that is linked to a cell. Depending if the cell value is positive or negative, I would like to change the textbox background color (fill). Any advice? Tks a lot! - Castor Hi Castor! You can use a macro, like the sample below to change the background color in the textbox. You have to update the name of the textbox in the macro, if it's not "Text Box 1", and the cell where you want to check for a positive/negative values. Sub ChangeTextboxFillColor() TheActiveCell = ActiveCell.Address If ActiveSheet.Range("A1") >= 0 Then Acti...

question about MFC and .NET framework
Is the new .NET framework supposed to replace the old MFC? In Visual Studio.NET, can the windows GUI design in VC++ is as easy as C#? another question is what the word "framework" means? is it another kind of class library? if it is so, what's the difference? On Fri, 26 Dec 2003 00:15:33 -0800, Brandon wrote: >Is the new .NET framework supposed to replace the old >MFC? In Visual Studio.NET, can the windows GUI design in >VC++ is as easy as C#? ..Net is not really a framework. There's no support I've seen in .Net for developing an MDI application equ...

two-variable calculations continued ...
Could you be more specific, as I am still learning to program in excel. "Gary''s Student" wrote: > Use a worksheet change event macro. It can detect two cells entered and > calculate the third, See: > > http://www.mvps.org/dmcritchie/excel/event.htm#wb_shtChange > > -- > Gary''s Student > > > "fredonic" wrote: > > > If I input a formula e.g. ‘A1+B1=C1’; how do I tell excel to calculate B1 if > > I have A1 and C1’s values or A1 if I have the other 2 values – doing all this > > using only the 3 or...

a new drawing not erase previous drawing?
visual studio c++ 6.0, mfc, graphics in my program a new drawing erases previous drawing. How to manage that all that is drawn stays alive on the window? And is not erased when the window is covered by another window, as well. And that the image does not flicker... Those last two have from time to time appeared in my attempts to solve the first problem. And that I didn't manage at all - make the first drawing, then the second, see them both at the same time on the window. I have tried the following and maybe more: Invalidate(false), InvalidateRect(false), override OnEraseBkgnd, ...

EFT transaction file generation on Microsoft Dynamics GP 10.0
Customers find it inefficient that Microsoft Dynamics GP 10.0 creates one transaction file per unique check batch. They prefer the design of previous versions with which they are able to generate only one transaction file for multiple payment batches on the Generate EFT Files window. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based New...

how to draw a bitmap transparently?
Hi, I have an owner draw button associated with a bitmap. In the bitmap editor, I turn off the option "draw opaque" for the bitmap. That is, I make it transparent. However, the the bitmap's background color still shows up on the button. The bitmap has only a solid circle in the middle. What else do I have to do? Please help. Thanks. Tony One thing you can do--and this works only for some restricted cases, which you may or may not have--is to make the button background 192,192,192, and when you LoadImage, you specify LR_MAP3DCOLORS. It will change the 192,192,192 to...

Visual C++6, MFC project to Visual Studio 2005 MFC
Hello, I convert a Visual C++6, MFC project to Visual Studio 2005 MFC and I have a lot of warnings. What I want? I want to sitch off the warnings and I make following without good result. How is the correct way to do this? File: stdafx.h #if ! defined(AFX_STDAFX_H__63C457B5_7B4F_11D5_A777_0001021D6D89__INCLUDED_) #define AFX_STDAFX_H__63C457B5_7B4F_11D5_A777_0001021D6D89__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #define _CRT_SECURE_NO_DEPRECATE 1 #ifdef _MSC_VER_VS2005 # pragma warning(disable:4927) # pragma warning(disable:4244) # pragma wa...

Linking new database tables to an existing MFC application
I created an MFC application which was linked to a MS Access database (using the wizard when first constructed). Since then, I have added new tables to the database and I need to link them to my application. I have tried to add DDX_FieldText using the m_pSet pointer notation, but it gives an error when attempting to compile. So, my question is, how do I link these new tables to my application? -- hf Use the wizard to create new classes for the new tables. You can certainly create these classes from scratch just by typing the source code in, but this requires intimate knowledge of ...

Dynamic object creation in MFC
Say I have soething like this: #define ID_MYID 10000 class MyList : CListCtrl { public: MyList(); MyList(CWnd *pparent) ~MyList(); DECLARE_MESSAGE_MAP() afx_msg void OnClick(NMHDR *pNMHDR, LRESULT *pResult); }; BEGIN_MESSAGE_MAP(MyList, CListCtrl) ON_NOTIFY(NM_CLICK,ID_MYIDL,OnClick) END_MESSAGE_MAP() MyList ::MyList (){} MyList ::MyList (CWnd *pparent) { CListCtrl::Create(WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL | LVS_REPORT | WS_BORDER, CRect(10,10,20,20),pparent,IDC_MYLIST); } void...

Archiving Dynamics GP MFG Data
Has anyone ever archived any of their Dynamics GP MFG Data? We need to do this but can't find any information on the best way to do so. Our data volume has grown over the years and queries are taking a performance hit as a result. In our test environment I found a 300% increase in efficiency when posting MO Receipts after deleting the data in the MOP1027 table, in which we had over 4 million records. I posted previously about MO Receipt posting being slower after upgrading and found that SQL 2k sp4 returns the following error found in the DEXSQL.log often when trying to perform inserts...

owner draw CListBox, how to draw "no item found"
Hello, I have an owner draw listbox, in the DrawItem I draw the items. If the listbox doesn't contain any item I would like to display a message "no item found" but this is no item, so DrawItem is the wrong place. Where should I do this? OnPaint, OnEraseBkgnd? I thought I would be able to do something like this for a test (just paint the window blue) but it's always white BOOL CmyListbox::OnEraseBkgnd(CDC* pDC) { if (m_pItemList.GetCount() < 1) { CRect rc; GetClientRect(&rc); pDC->FillSolidRect(rc,RGB(0,0,255)); return TRU...

Draw a horizontal line after the last record is printed on each pa
The details section of my report draws vertical lines which grow to accomodate text size changes. I would like to have a horizontal line drawn when last record finishes printing on the page and joins the end of the last vertical line to make a table. Please help. Thanks. -- Lydia Liu Access/VB Programmer There was at least one answer posted to your same question yesterday. -- Duane Hookom Microsoft Access MVP "Lydia" wrote: > The details section of my report draws vertical lines which grow to > accomodate text size changes. I would like to ha...

Anyone want to draw roads?
Just thought that if anyone wants to do diagrams with roads or rivers as double lines then Jeff Lanam (this n/group) kindly provided me with this link to a free programme called OCAD. Its a tiny file, is EASY to use and the results can be exported as a .bmp into Publisher. www.ocad.com I asked on this newsgroup how to achieve this and many threads resulted, so thought I'd post the solution. Many thanks Jeff (see reply to your post) Chrissss........ Glad you solved your map problem. An interesting program. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.o...

Released Today: Rapid Implementation Tools for Microsoft Dynamics GP 10.0 Feature Pack 1
http://www.microsoft.com/downloads/details.aspx?FamilyID=D9DFA747-63DA-4CAC-B92D-28BB24192C1D&displaylang=en Has anyone tried using these tools? I'm curious if QB online will work? ...

Drawing graphs on Modal dialogs
I've encounter a strange phenomenon: I have an MFC application that creates a child dialog using DoModal(). Within this child dialog I have a couple of buttons and a graph plot drawn within the area of a Cstatic using a third party API from GraphicsServer. This modal dialog has a minimize button, but when I minimize the dialog, the graph doesn't minimize with the dialog is always on top of the screen. Has anyone encountered this problem? Do you think is is a GraphicsServer issue or a Microsoft issue? I've called Graphics Server and they say that they haven't countered my proble...

System information using MFC and WMI???
Hi all I have to extract some system information using MFC and WMI. I have extracted some information like Add/Remove Programs, Network, username, computer name, Processor Information, hard disks attached. But for some information i have to use WMI. How i can use the WMI for getting information about system hardware. Please help me by giving sample examples. Thanks and Regards ...

Where did the drawing go?
Visio 2003 SP2 with all the latest patches. I have an extensive floor plan created in a file. I renamed the page by double-clicking on the tab and replacing the name with 'Current'. I then added a page and called it 'Proposed'. The program hour-glassed for a bit which I thought was curious and then hung. I could close the program and since I did some editing on the file, I saved it when prompted. The next time I opened the file, the design was not visible and the scale was literally off the charts (it says X = - 46 ft., Y = 89478492 ft. 6, and if I go into Page Setup a...

Microsoft Dynamics CRM 4 for Outlook cannot be installed
Upon trying to install the Microsoft Dynamics CRM 4 for outlook plug-in I’m receiving the following error message. "Microsoft Dynamics CRM 4 for Outlook cannot be installed on a computer where Microsoft Exchange Server versions prior to Exchange Server 2007 are installed" I would like to know whether I need to upgrade my Exchange infrastructure to Exchange 2007 to enable the use of Microsoft Dynamics CRM 4 for outlook plug-in, I can’t find any documentation stating that Exchange 2007 is a pre-requisite or requirement. Kind Regards Exchange 2007 isn't a requirement fo...

How to draw text always visible
Hi NG, I Have program which is drawing objects(PIPES)using the OPENGL. The labels for the for the PIPE is drawing using the GDI. The text colour for the labels is same that of the objects. The labels are usually positioned at out side of the pipe so that it will be visible always. But while rotating there are possibilities that the labels and objects coincide. I want to set the labels always visible with respect to the back ground colour. I used SetRop2() but it has no effect. Any help would be greatly appreciated Best regards Raghuram.k ...

Dynamically Add/Remove Page from PropertySheet
I have a little Problem and look for advise... Lets say i have 2 pages in my sheet, defined as m_Page1 and m_Page2. in the ctor of my PropertySheet i add the first page with AddPage(&m_Page1) and everything is fine. If i add m_Page2 it works, too, but that's not what i want. what i want is to dynamicall add/remove my 2nd page, and that is where the trouble starts: after adding page2 everything is fine and i can use its content, after removing it by RemovePage() the TabControl switches back to the 1st page and still everything runs as expected. But when i now add the 2nd page again,...

Owner draw main windows, will left some drawing on the background of the window, I want the reason and how to prevent this happen? 01-05-10
Hi, Everyone! Ownerdraw main window , I used SetWindowRgn to cut down the four corners, but there will left something drawing here when you drag the corners and borders to resized the window on the background of the main window. Only 3 corners of the four corners do this. I used HDC hWindowDC = GetWindowDC(); Draw the non client area on hWindowDC In class of WTL: class CMainFrame : public CFrameWindowImpl<CMainFrame>, public CUpdateUI<CMainFrame>, public CMessageFilter, public CIdleHandler Thanks a lot! Have a Happy New Year! begin 666 problem.JPG ...

Outlook client via Internet with dynamic IP
I am attempting to connect to an exchange server from the internet. The Exchange server is on a connection with dynamic IP. I already have a dynamic DNS name resolution, but outlook requires a netbios name, and not a DNS name. Any solution? Thank you in advance Cesare ...

how to write dynamic link library for excel to use?
HI, I tried to use these code, However, I need the variable that can be shared among different modules and different workbooks. e.g, I have written an addin workbook : addin.xla and I declared an array called arr1() as double. then I use this array in other sheet to copy the values into this array from another workbook book1,xls and I find that it doesn't work. may you help me again? thanks Desmond >-----Original Message----- > >as per my later response....using public variables makes >the adta available to other code modules. >If you want the data vailable some o...