|
The error message in the task list should be descriptive enough... you are supplying the wrong data type to the function.
It should be
m_Graph.SetParentWnd(this);
Edit: I just looked at the article and I realised that you have failed to cut and paste properly as CWnd doesn't have a SetParentWnd() function and only has SetParent() and that SetParentWnd() belongs to the component...
m_Graph.SetParentWnd(this->m_hWnd);
-- modified at 9:38 Thursday 6th July, 2006
|
|
|
|
|
Thank you man!
SnaidiS(Semion)
|
|
|
|
|
I haven't understood one thing: How can I manage/control/edit the function of the graph?
for instance :line graph or Parabola?
SnaidiS(Semion)
|
|
|
|
|
|
here:
http://www.codeproject.com/miscctrl/pgllib.asp[^][^]
There are an instructions:
1 Install GDI+ (part of Microsoft SDK).
2 Download Gdiplus.dll and make sure it is in the path,
3 Recompile the source, it will build .lib in the lib directory and the .dll in the bin directory
4 Add the directory with PGL binaries to your path. (by default it is C:\Program Files\PGL\bin)
5 Add the include directory and lib directory to Visual C++ include/lib directories.
6 Make sure the headers are available
I dont really understand them
I downloaded the GDI dll but I dont understand which path(in 2).
which source(in 3)?
How can I recompile him?
4 I dont understand too 5 and 6
After that they want me to make the variable ULONG_PTR m_ulGdiplusToken; in the CWinApp-is this class is the Dialog class?
I mean if I made a dialog based project.
Because when I have tried to find this class I haven't found..
Thank you all for your wonderful answers!
SnaidiS(Semion)
|
|
|
|
|
I tried to use it for hours and...nothing... please help me
SnaidiS(Semion)
|
|
|
|
|
Semion_N wrote: I downloaded the GDI dll but I dont understand which path(in 2).
You just need to make sure the app can find the dll. Put it in windows/system32 or along with the app.
Semion_N wrote: which source(in 3)?
The source that comes with the article...
Semion_N wrote: I dont understand too 5 and 6
In your project settings add the path to the PGL headers to the Additional Include Directories under C/C++.
Add the lib directory under Linker/General. Add the .lib file to Additional Dependencies.
Semion_N wrote: is this class is the Dialog class?
I mean if I made a dialog based project.
No. This is the CWinApp derived class, usually named CXXXApp located in XXX.cpp where XXX is the name of your project.
These are pretty basic questions, it might be prudent that you go and get yourself a book on MFC otherwise you would find it difficult to continue.
|
|
|
|
|
I cant find the lib directory and the .lib file...
Can you please helo me?
Another thing I didnt find is the "Additional Dependencies" in my project properties.
SnaidiS(Semion)
|
|
|
|
|
Semion_N wrote: I cant find the lib directory and the .lib file...
You are supposed to build the .lib file from the source provided, and set whatever path you want to put the .lib file in.
Semion_N wrote: Another thing I didnt find is the "Additional Dependencies" in my project properties.
In VC7.1
Configuration Properties > Linker > Input : Additional Dependencies
|
|
|
|
|
I'm looking for a convenient little library that makes building HTML text easier
Some of us walk the memory lane, others plummet into a rabbit hole
Tree<t> in C# || Fold With Us! || sighist
|
|
|
|
|
I am not sure, but this[^] might be what you are looking for.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
|
|
|
|
|
peterchen wrote: building HTML text easier
"easier", what do you mean? Easier than what?
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
easier than
body += FmtStr(_T("<a href=\"%s\">%s</a>"), url_urlescaped, title_htmlescaped);
|
|
|
|
|
I think I can't "see" your posted code completely. I guess the format string contained some HTML tags? One option would be to use an XML DOM like MSXML or something. That is an extreme improvement from string concatenation and formating.
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
(fied above post)
XML DOM is better only in some cases, I've tried a bit (rather, with the IE5 DOM, but the game is the same, isn't it?).
I frequently end up having to build some HTML, often the XML DOM feels heavy (though acceptable), and I usually end up rolling my own very specializred functions. Trying to generalize these, the interface always gets very convoluted, so I woukld at least like to see others ideas
Some of us walk the memory lane, others plummet into a rabbit hole
Tree<t> in C# || Fold With Us! || sighist
|
|
|
|
|
peterchen wrote: I frequently end up having to build some HTML
Don't know what that means, example?
I have used DOM's for years to generate HTML and never had a problem. Acutally it's 2006 wouldn't you generate XHTML anyway. A DOM is little more than a tree structure that handles syntax for XML which is exactly what you need to generate HTML anyway right? I'm confused.
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
Hi i've strange problem.i've 4 columns Account,date,amount,address in a Clist Control.
//a breif abt my project
in my project am trying to slect a file by browsing (i used cfiledialog). & then pressing the button 'showbutton' i want to see all the documents(i.e.account,date,amount,address) of that file.this file is actually a list of several transaction.........
now in this project i didn't use classwizard, all the message mapping,dialog creation i've done mannually...............
//the problem
now, the problem is, while am trynig to insert items in the r8 column, only the 1st column is being populated , not the others....in the insertion column
CString strItem;
LVITEM lvi;
lvi.mask = LVIF_TEXT;
//Account no...
strItem.Format(_T(&TP->TR.Account[1]));
lvi.iSubItem = 0;
lvi.pszText = (LPTSTR)(LPCTSTR)(strItem);
m_cListCtrl.InsertItem( &lvi);
//Expirary Date
strItem.Format(_T(&TP->TR.ExpDate[1]));
lvi.iSubItem = 1;
lvi.pszText = (LPTSTR)(LPCTSTR)( strItem);
m_cListCtrl.InsertItem( &lvi);
nd this way only putting "lvi.iSubItem=2,3...4"
Don't get confused with TP,TR...these r my project variables for other issues.
using that above code.. am getting only 1st column....
waiting for quick reply.....A GOOD DAY to all.
kamalesh
|
|
|
|
|
kamalesh82 wrote: strItem.Format(_T(&TP->TR.Account[1]));
The _T() macro is only needed with string literals. Also, why use the Format() method when you can assign &TP->TR.Account[1] directly to strItem ?
Try:
int nItem = m_cListCtrl.InsertItem(0, &TP->TR.Account[1]);
m_cListCtrl.SetItemText(nItem, 1, &TP->TR.ExpDate[1]);
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
&TP->TR.Account[1] returns the string literal.so be sure that it's not making any problem. nd i used SetItemText as well as the SetItem both function.
Good Day
kamalesh
|
|
|
|
|
Hi,
here is my example without lvItem structure:
<br />
i -> my linenumber and 1 is the first subitem! <br />
ctrlList->SetItem(i, 1, LVIF_TEXT, MyTextHere, 0,NULL, NULL, 0);<br />
lvItem.iSubItem = 1;<br />
ctrlList.Setitem(&lvItem);<br />
i hope that helps!
regards
break;
-- modified at 10:07 Thursday 6th July, 2006
|
|
|
|
|
you should set the itemidentifier for the subitem, subitem must to know to witch item is to add!?
i solve your problem like this:
<br />
LVITEM lvItem;<br />
lvItem.iItem = 0;
lvItem.iSubItem = 1;
lvItem.mask = LVIF_TEXT;<br />
<br />
int i = 0;<br />
while(i < 10)<br />
{<br />
lvItem.iItem = i;
lvItem.pszText = (LPTSTR)(LPCTSTR) NewText;<br />
listCtrl->SetItem(&lvItem);<br />
i++;<br />
}<br />
<br />
i try this and it works!
regards
break;
-- modified at 10:43 Thursday 6th July, 2006
|
|
|
|
|
Hi All!
We have a system with, 256MB of memory. and the hard drive is 40GB but besides to it is written 37.2GB. Is this has to do with virtual memory???
Thanks!!!
|
|
|
|
|
See Here
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Dennis L wrote: ...the hard drive is 40GB but besides to it is written 37.2GB.
What exactly does this mean?
Dennis L wrote: Is this has to do with virtual memory???
Virtual memory
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
maybe he does not know that a HD will have its capacity reduced after being formatted ?
that the advertised 40GB will really be 37.2GB AFTER formatting.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|