|
I got it working thanks for the help.
|
|
|
|
|
How can I call this dll from a resource DLL that we are building?
Thanks for the help.
|
|
|
|
|
Is it possible to get the DLL to use static instead of dynamic. The computers we install them do not have the libraries require to run them. Any help would be great. Thanks
|
|
|
|
|
Is there a way to add a vertical line marker. Basically putting a vertical line for a specific x-axis point?
Is there any plans to support bar charts?
Thanks for the help.
|
|
|
|
|
Thanks for the reply.
I have recompiled the files you gave me and it gave me an error
gfxutils.obj : error LNK2001: unresolved external symbol __imp__AlphaBlend@44
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Can tell me what I am doing wrong?
Thanks
|
|
|
|
|
I got your email and added the lib. That allowed me to recompile. The only thing is that after click on properties the app crash.
Also how can I use SetAxisMarker?
Thanks for the help.
|
|
|
|
|
Thanks I got your reply. I will look foward to getting the new source code with the fix.
Also when I tried cursor the window that display the data is small and will not be able to display the values of the curve. Can this window be a bit bigger so that we can see the values of the curve?
Thanks for the help!
|
|
|
|
|
Thanks
I got the updates. I got it working. Thanks for the time and help
|
|
|
|
|
Hi I would also like to add vertical line, How should I do?
Great Work by the way!
|
|
|
|
|
Ok, I find out(see CXGraphAxis::SetAxisMarker).
|
|
|
|
|
I got this working in a dialog. This is really a good program.
Can you tell what type of license is this. I am thinking of using this in our program
|
|
|
|
|
In AxisDlg.cpp and CurveDlg.cpp, function OnDrawItem(..), running on VC7.1,
"stack corrupted" for the local variable dc. Down-casting a pointer to CDC to its derived CDCEx is the source of the problem.
The following code is my fix for CAxisDlg::OnDrawItem(..). The fix for CCurveDlg::OnDrawItem(..) is similar.
Bug code (downloaded on 2004-09-01):
-----------------------------------
CDC dc;
dc.Attach (lpDrawItemStruct->hDC);
int nSaveDC = ::SaveDC(lpDrawItemStruct->hDC);
CDCEx *pDCEx = (CDCEx*) &dc;
pDCEx->m_bMono = pDCEx->m_bPrinting = false;
dc.FillSolidRect (&lpDrawItemStruct->rcItem, lpDrawItemStruct->itemState & ODS_SELECTED ? ::GetSysColor(COLOR_HIGHLIGHT) : ::GetSysColor(COLOR_WINDOW));
{
CPenSelector ps(0L, 1, pDCEx, lpDrawItemStruct->itemID);
dc.MoveTo(lpDrawItemStruct->rcItem.left, lpDrawItemStruct->rcItem.top + 6);
dc.LineTo(lpDrawItemStruct->rcItem.right, lpDrawItemStruct->rcItem.top + 6);
}
::RestoreDC (lpDrawItemStruct->hDC, nSaveDC);
dc.Detach ();
----------------------------------
My fix:
-----------------------------------------------------------------
CDCEx DCEx;
DCEx.Attach (lpDrawItemStruct->hDC);
int nSaveDC = DCEx.SaveDC();
DCEx.m_bMono = DCEx.m_bPrinting = false;
DCEx.FillSolidRect (&lpDrawItemStruct->rcItem, lpDrawItemStruct->itemState & ODS_SELECTED ? ::GetSysColor(COLOR_HIGHLIGHT) : ::GetSysColor(COLOR_WINDOW));
{
CPenSelector ps(0L, 1, &DCEx, lpDrawItemStruct->itemID);
DCEx.MoveTo(lpDrawItemStruct->rcItem.left, lpDrawItemStruct->rcItem.top + 6);
DCEx.LineTo(lpDrawItemStruct->rcItem.right, lpDrawItemStruct->rcItem.top + 6);
}
DCEx.RestoreDC(nSaveDC);
DCEx.Detach ();
------------------------------------------------------------
|
|
|
|
|
Hi All,
I find that occationally when i add a graph it is drawn black, even though i call <curve>.SetColor(<red>) everytime.
This happens very rarely, but it does happen. If anyone has seen this, and know where it is coming from, please let me know.
btw - good find on that memory leak dimo_ivanov!
thanks a million.
Mike
"I bet Einstein turned himself all sorts of colors before he invented the light bulb." -- Homer J.
|
|
|
|
|
Hi all,
I would really like to see some docs on this control!
Author of this masterpiece, we are you?
Are there any bugs in it, does it work without problems, in other words, do I dare integrate it in a big application?
/Tommy
|
|
|
|
|
hey
When you move the mouse around the screen in Cursor mode, there is a definate (and rather hefty) memory leak.
Has anyone seen this? if so is there a way to doctor up the code to stop this from happening?
Please let me know. Thanks,
Mike
"I bet Einstein turned himself all sorts of colors before he invented the light bulb." -- Homer J.
|
|
|
|
|
Hi,
try to modify Prepare(HDC hdc) member function of CDCEx class, adding "::ReleaseDC(AfxGetMainWnd()->m_hWnd,hWinDC);" in the end:
void CDCEx::Prepare (HDC hdc)
{
/*.....
original code
.....*/
::ReleaseDC(AfxGetMainWnd()->m_hWnd,hWinDC);
}
|
|
|
|
|
Hi,
This Glamar.s. I need u'r Help, please see it.
Can u Chang the X-axis scale into Time and date Display
Or only Time. Otherwise please inwhich line u display
the x-axis value.
Pointout or specify the function and which line it.
i change Drawtext(); and command this function also
setdata();. There is NO result.
glamar.s
|
|
|
|
|
Hi,
//////////////////
CXGraph m_Graph;
TDataPoint m_Data[MAX_COUNT];
double db_Your_YAxis_Data;
DATE date_Your_XAxis_Data;
int m_nAxis;
.....
m_Data[i].fYVal = db_Your_YAxis_Data;
m_Data[i].fXVal = (double) date_Your_XAxis_Data;
.....
m_Graph.SetData(m_Data,MAX_COUNT,......);
m_Graph.GetXAxis(m_nAxes) .SetDisplayFmt(_T("%H:%M:%S \n %d.%m.%Y ."));
m_Graph.GetXAxis(m_nAxes) .SetDateTime(true);
//////////////////
|
|
|
|
|
Hi,
This Glamar.s. I need u'r Help, please see it.
Can u Chang the X-axis scale into Time and date Display
Or only Time. Otherwise please inwhich line u display
the x-axis value.
Pointout or specify the function and which line it.
i change Drawtext(); and command this function. There is
NO result.
glamar.s
|
|
|
|
|
I am sure that everyone has noticed that the XGraph does not re-paint correctly when in background, that is, when another window (e.g. another Dialog) is dragged-moved over the control. When this happens some parts of the chart partly disappear. When the focus is returned to the graph (for example when the user clicks on the chart, then the re-draw takes place and the problem is corrected.
This behavior has been reported before. I have even noticed, while trying to solve the problem myself, that this happens ONLY for the data-series plots - the Axis and label are not affected. However I could not find a solution.
Has anyone solved the problem ????
Warm regards
Pothitos M. Baikas
|
|
|
|
|
Switch off double buffering.
|
|
|
|
|
Yes I know. I have used the same trick my-self. However I do not feel that this is the correct way to do it. I am still looking into the issue, although it is not a top priority
|
|
|
|
|
Solution for corret re-paint:
- in method CXGraph::OnPaint call second (modified) constructor of class CMemDC,
- create constructor CMemDC(CDC* pDC, CRect wndRect) : CDC()
>> 2nd parameter wndRect contain size of client window
In example used constructor call method GetClipBox, which always set RECT components
to 0. So in the end CopatibleBitmap will be size of 0,0.
Izidor
|
|
|
|
|
I understand that you are providing the solution, however I am not sure I can follow your instructions. Would you be so kind to give the modified code for the OnPaint ?
Hope that you will find the time to help once more
Warm regards
Pothitos M. Baikas
|
|
|
|
|
I think this is what he means:
XGRAPH.cpp around line 664:
CXGraph::OnPaint
{
...
if (m_bDoubleBuffer)
{
>>> // MMM
CRect empty, client;
GetClientRect( client );
empty.SetRectEmpty();
pmdc = new CMemDC(pdc, empty, client);
instead of:
//pmdc = new CMemDC(pdc);
|
|
|
|