|
Oh sorry!
My MSDN must be really old
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Hi,
I have checked the preface of this book. It's named Window95, a developer's guide written by Jeffrey before 1997. It's a Win32 SDK programming guide which includes several key techniques such as subclassing and superclassing, hooking etc.
Best regard.
One concrete prolem is worth a thousand unapplied abstractions.
|
|
|
|
|
Thanks for the info Nicholas
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Include htm, html, css, asp and so on.
thank you very much.
zl
|
|
|
|
|
|
One node at a time, probably recursively.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
So Christian, I will have to write it? There is nothing that can do the job in MSXML; give it two XML structures and to compare them. Any idea?
Thank you
Vance
|
|
|
|
|
If you are not a .NET or VB hater, here is how:
dim doc1 as XmlDocument = new XmlDocument()
dim doc2 as XmlDocument = new XmlDocument()
doc1.LoadXml("file1.xml")
doc2.LoadXml("file2.xml")
if doc1.OuterXml = doc2.OuterXml then
' the same
else
' different
end if
|
|
|
|
|
What about if the nodes are out of order, or white space
|
|
|
|
|
Ok, you need to state clearly what you mean by "compare"?
1. Do you want to check if the two files are exactly the same? You don't need XML to do that.
2. Do you want to see if the two files will generate exactly the same XML document? My sample does that.
3. Do you want to check if the two files have the same set of nodes but may be in different order, and each node may have the same number of children but may be in different order? What about attributes, you want to compare that too?
4. ...?
So what is it that you want?
|
|
|
|
|
Number 3 is what I am looking for to solve...
|
|
|
|
|
You need to write a recursive function. At least I hope you do, because that's what I ended up doing....
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
3. Do you want to check if the two files have the same set of nodes but may be in different order, and each node may have the same number of children but may be in different order? What about attributes, you want to compare that too?
A simple recursive function will probably not solve this problem. Consider the following extreme case:
< node ...>
< node ...>
< node ...>
< node ...>
...
< /node>
< /node>
...
< /node>
< node ...>
...
< /node>
< node ...>
< node ...>
< node ...>
...
< /node>
...
< /node>
< /node>
...
< /node>
That is, all nodes have the same name but its content may be different. If factor into the effort of comparing attributes (they can also be the same but in different order), camparing two nodes will be a nightmare (at least). It takes someone with your determination to do it.
What do we call the kind of problems we are too stupid to solve? NP-Complete?
|
|
|
|
|
It's pretty clear to me he does not want operator=. You can do that in C++ as easily as your VB example.
He wants to do a difference of the two XML documents, to see what is the same and what is different. That's how I read it, anyhow.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
I have CPropertySheet inside CDialog instead the control with ID - IDC_PROPSHEET_WINDOW.
I have 7 identical CPropertyPage, but with different labels.
The code of realization is given below.
But if tabs are placed more than in one line, there is the mistake of drawing connected by that the top line of tabs is visible only.
Code of realization in OnInitDialog() the following.
m_sheet.AddPage(&m_pageMyPage1);
m_sheet.AddPage(&m_pageMyPage2);
m_sheet.AddPage(&m_pageMyPage3);
m_sheet.AddPage(&m_pageMyPage4);
m_sheet.AddPage(&m_pageMyPage5);
m_sheet.AddPage(&m_pageMyPage6);
m_sheet.AddPage(&m_pageMyPage7);
m_sheet.Create(this, WS_CHILD | WS_VISIBLE);
m_sheet.ModifyStyleEx (0, WS_EX_CONTROLPARENT);
TC_ITEM item;
item.mask = TCIF_TEXT;
TCHAR szText [100];
CString sTitle;
for (int i = 0; i < 7; i++)
{
sTitle.Format(_T("Long label %d"), i);
lstrcpy(szText, sTitle);
item.pszText = szText;
m_sheet.GetTabControl ()->SetItem (i, &item);
}
RECT rect;
HWND hwnd;
GetDlgItem(IDC_PROPSHEET_WINDOW, &hwnd);
ASSERT(hwnd);
if (hwnd)
{
::GetWindowRect(hwnd, &rect);
ScreenToClient(&rect);
m_sheet.SetWindowPos(NULL, rect.left, rect.top, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE);
}
Most likely a problem that at addition CPropertyPage they have small length of labels and hold in one line.
And when I change label of the tab on the text with greater long tabs occupy more than one line.
Thus control ceases correctly them to display.
One of decisions, by default in label of the template CPropertyPage to place the text of long not less maximal length of the future label, then all is drawn normally.
Whether there are some more decisions of this problem?
Best regards,
Eugene Pustovoyt
|
|
|
|
|
Hi,
I have a MFC based resource dll,it works fine in Debug mode,But it doesn't in release.The OS i work on is Windows ME.Could anyone help me to make the release build to work fine?
Regards
Neha
|
|
|
|
|
Could you be more specific abt the problem you are facing ?
|
|
|
|
|
Ok,I have a MFC based dll.This dll is been launched from an application.If i build a dll in debug mode ,it works fine.But if i build it in release mode,it crashes.for both debug & release settings options are same.
|
|
|
|
|
i think he meant "can you be more specific about what kind of errors you are getting?"
the easiest way to see where its goofing up is to log certain checkpoints to a text file ... or include debug info in the release build but that might still change the behaviour of certain very subtle bugs
"... and so i said to him ... if it don't dance and you can't eat it either f**k it or throw it away" sonork: 100.18128 8028finder.com
|
|
|
|
|
yea.,u got to give the exact details of the errors, so that i will be easy to fix the problem.
Try debugging in release mode.
or go thru'
http://www.codeproject.com/debug/releasemode.asp
for more details..
rgds,
ravi
|
|
|
|
|
I want to download a site, but how to change the asp file to htm file?
thank you very much.
|
|
|
|
|
Any particular site you had in mind?
cheers,
Chris Maunder
|
|
|
|
|
|
now, codeproject.
if i want to download the page:http://www.codeproject.com/system/hooksys.asp, how can i change it to htm in my soft?
thank you.
zl
|
|
|
|
|
Only open the page, with the IE and make a Save As of it, in html format....
Regards
Carlos Antollini.
www.wanakostudios.com
Sonork ID 100.10529 cantollini
|
|
|
|