|
Braulio,
To get started there are several classes with different flavors on this site.
http://www.codeproject.com/soap/
I would recommend getting the msxml 4 core services and experimenting.
http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/001/766/msdncompositedoc.xml
Create an XML file and then see if you understand how the parser really breaks the data up into child nodes. Read in the file and step through the nodes testing the type in debug mode. You can do this from sample code from several of the sample on code project as well as the msdn site.
|
|
|
|
|
As suggested, download and install the XML SDK. The examples can be filter for the language of choice, i.e. VB, C++, JavaScript
|
|
|
|
|
|
Guys,
Does anybody have an idea how to display stock quote in a C/C++ application. I am thinking of using a free stock quote server such as Yahoo Finance. How do I conect and retrieve this information? Any guidance in the matter is most appreciated.
Regards,
SAK
|
|
|
|
|
From and ATL server written in VC 6.0 with one interface I would like to publish to VB clients enumerated values.
VC header-
enum FileTypes{ FILE, MEMFile, MEMORY};
My VB code looks like;
Dim y As Object
Set y = New PARMIOLib.BufferIO
'where 0 stands for FILE
'where 1 stands for MEMFile
'where 2 stands for Memory
y.FileFormat 0
How do I replace the 0, 1 and 2 with enumerated values?
thanks
|
|
|
|
|
It has been a while since I did this, but I think you need to put the enum defines in the IDL.
Michael
|
|
|
|
|
That makes good sense. Thank you.
I have looked for an example of the syntax, but have not found it.
|
|
|
|
|
Which is the prefered memory allocation method when the need for memory can be anywhere from 10 to 10mb...?
Would it be acceptable to use new over VirtualAlloc() under most circumstances....I read an article on VirtualAlloc and the author suggests using new whenever possible and you only need VirtualAlloc() if your gonna use major memory resources and stay running for long durations, like software running on NT. Is this generally acceptable practice...?
TIA
"An expert is someone who has made all the mistakes in thier field" - Niels Bohr
|
|
|
|
|
If you have a requirement that the pages you reserve remain in main memory and not swapped to virtual (possible disk memory)then VirtualAlloc gives you more control.
Are you writing some kind of service or kernel related task?
Do you reserve large chunks of memory but not always use it?
If none of the above is true then let the OS do what it does best and manage memory pages for you. Using New is much more acceptable as a general practice.
|
|
|
|
|
Just a generic text editor buffer, allocating 4096 byte pages. I would like to make the buffer grow to virtually unlimited size, but the hassle's I assume with VirtualAlloc are greater than the need for unlimited memory.
Heres the problem i foresee(spelling)
You can only lock 30 pages at any given call to VirtualLock, which creates the problem of not being able to lock once, move all, but instead i'd have to lock move 30 pages, unlock, lock again move another 30 and so on...am i right here...?
"An expert is someone who has made all the mistakes in thier field" - Niels Bohr
|
|
|
|
|
I have a program which creates an MCI window and plays a .avi movie.
At my school network, which runs win98, the program ran perfectly.
At home where I have win2k, it won't open. I've made sure the path is correct (the video is on cd as well so it's only something small like "H:\\movie.avi") and nothing was changed between the time I ran it at school and brought it home.
Are there any know problems with MCIWndCreate (or MCIWndPlay perhaps?) in win2k?
I'm quite curious as to why this doesn't work.
Thanks
|
|
|
|
|
I am trying to redraw the CHeaderCtrl contained in a CListCtrl and would like to handle WM_PAINT messages. Problem is when I do the control never stops painting.
Any help greatly appreciated
|
|
|
|
|
Post your OnPaint() code. Sounds like something you're doing in OnPaint() is causing another WM_PAINT message to be fired.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
You didnt put an UpdateWindow in your paint handler, did you?
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
I'm getting an error when I try to get the contents of a CEdit control. I'm have a SDI MFC app that has a dialog bar. I put a CEdit control on it and I get an Assert error. I guess you can't do this in the Doc/View architecture because it works when I tested it in a Dialog App.
CEdit* pEdit =(CEdit*)GetDlgItem(IDC_EDIT1);
Any help would be appreciated becuase I don't normally use MFC
<marquee style="filter:blur(Add=1, Direction=90, Strength=4)">I Microsoft and
|
|
|
|
|
This approach is fraught with error. You should store the edit control as a member variable and access it that way.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Just a suggestion, but why not use m_edit1.GetWindowText()?
|
|
|
|
|
From what context are you calling GetDlgItem?
The code you have should work, but only if GetDlgItem is called from the right context. For example, if you dialog bar is called m_dlgBar, then you should have, m_dlgBar .GetDlgItem (IDC_EDIT1). My best guess is that you are calling GetDlgItem from your main window class or a view window.
Then again, it has been a while since I used MFC and I could be wrong.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
In which of your classes have you put that code?
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Actually, I would guess that your problem is a result of timing. When are you calling GetDlgItem()? If you are calling it before the control has been created, you will get an assert.
Yes, there are people who argue that using GetDlgItem() is bad - don't listen to them! Both ways are valid. Form your own opinion! Check this article for a well-written explanation of one side...
J
|
|
|
|
|
That's the main error, I think. Because control in your dialog bar is not attached to existing CEdit object, GetDlgItem creates temporary CWnd instance and returns pointer to it. You use the temporary object.
This is how it should be done:
HWND hwnd;
dlgBar.GetDlgItem (IDC_EDIT1, &hwnd); // get the handle of control
CEdit wndEdit;
wndEdit.Attach (hwnd); // copy handle to the instance
// ... use wndEdit
wndEdit.Detach ();
Don't forget to Detach (), because as wndEdit goes out of
scope, its destructor destroys the window with the handle that it has last attached.
|
|
|
|
|
I still don't know the correct answer to this one.....
If you create a DLL and an EXE, both linked to use the DLL version of the RTL -- is it the case the the DLL and the EXE are using the exact same heap. Can you at this point, delete memory (in the EXE) which was allocated in the DLL?
If they are not, how do they do it? How would they manage to dynamically allocate a different heap to each DLL/EXE?
-p
|
|
|
|
|
Peter Weyzen wrote:
If you create a DLL and an EXE, both linked to use the DLL version of the RTL -- is it the case the the DLL and the EXE are using the exact same heap. Can you at this point, delete memory (in the EXE) which was allocated in the DLL?
Yes, and Yes.
I vote pro drink
|
|
|
|
|
My app keeps generating Access Violations after my program exits(More like after my code is finished and the system code is finishing up) and I can't find out why for the life of me... Any ideas as to what might cause this?
Also, are there any good Memory Monitors( like boundschecker) that are free?
Stephen Caldwell
Blackfission, CEO
|
|
|
|
|
Also, are there any good Memory Monitors( like boundschecker) that are free?
VC++'s C run-time library includes some rudimentary functions for out-of-bounds error checking and related stuff. Check MSDN article Debug Reporting Functions of the C Run-Time Library. Some samples are also included on the documentation.
Not very powerful, but they're good as a starting point as they're free and ready to use.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|