|
I only try to add a new message ,this is my first.
Let us rap off,for you,for me,for our man!
|
|
|
|
|
then we all hope that this will remain your first message!
Don't try it, just do it!
|
|
|
|
|
|
|
hi everyone,
i got the following problem: i'm writing a program taht exchanges xml-messages over a network and i use IXMLDOMDocumentPtr ' s to generate (and parse) the xml message.
my problem is that after memory allocated for the xml-docs remains allocated even after i load sth new into the IXMLDOMDocumentPtr so my prog keeps getting bigger and bigger.
here's how the thing works:
Parse(BSTR theXML)
{
IXMLDOMDocumentPtr theXMLDoc;
::CoInitialize(NULL);
theXMLDoc.CreateInstance(CLSID_DOMDocument);
theXMLDoc->loadXML(theXML);
//do something
theXMLDoc.Release();
}
so what did i miss?
i also tried taking the ::CoInitialize(NULL) out of there and put it into the constructor of the class, but then i always get errors while trying to .CreateInstance(..) because "CoInitialize has not been executed"
|
|
|
|
|
How about ::CoUninitailize(); after theXMLDoc.Release();?
|
|
|
|
|
tried that, but i the still get that 'CoInitialize has not been called' error (or a program crash).
probably i should mention that there are 2 threads running, so that function i described can be called by 2 threads at the same time. i also tried to use a mutex to prevent the function to be executed multiple times:
{
WaitForSingleObject(mutex,INFINITE);
::CoInitialize(NULL);
//...
::COUninitialize();
ReleaseMutex(mutex);
}
but still the same thing happens.
|
|
|
|
|
|
Hi,
How can I use editable List Control with Combo Boxes in CForm View Window.
(List Control will be used somewhere in middle of the window)
Thanks & Regards,
T R Raghavendra
|
|
|
|
|
i don't think that this is funny!
POST UR DAMN MESSAGE ONLY ONE TIME, NOT THREE TIMES!!!
Don't try it, just do it!
|
|
|
|
|
A typical method would be to handle the NK_DBLCLK message for the control. From there, get the mouse position (GetCursorPos), translate it to the control coordinates (ScreenToClient()) and do a hit test
From this you can identify the item index and the sub item (column) number. You can then get that items rectangle (GetItemRect). As you want to do an edit, depedning on what kind of edit you can:
Create a new control and place it at the items rectangle position/size, destroy the item when it loses the focus, and apply its changes. Or you could move an existing control on your form which was not visible/disabled to the right location and enable it. Then hide it when it loses the focus as before.
Roger Allen - Sonork 100.10016
If your dead and reading this, then you have no life!
|
|
|
|
|
Hi,
How can I use editable List Control with Combo Boxes in CFrame View Window.
(List Control will be used somewhere in middle of the window)
Thanks & Regards,
T R Raghavendra
|
|
|
|
|
Hi,
How can I use editable List Control with Combo Boxes in CFrame View Window.
Thanks & Regards,
T R Raghavendra
|
|
|
|
|
A newbie question
When I type in my static ip for my computer at home (149.101.1.100) Iwhat is the subnet mask? is it 255.255.0.0?
What is the default gateway?
Best Wishes and Happy Holiday's,
ez_way
|
|
|
|
|
not a visual c++ question, cya!
Don't try it, just do it!
|
|
|
|
|
Well I am trying to understand how to get static ip and their components into a var. I guess I should have phrased it better.
Anyway thanks for the reminder.
Best Wishes and Happy Holiday's,
ez_way
|
|
|
|
|
See if GetAdaptersInfo() helps.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Google for information on TCP/IP addressing, but in the meantime...
The IP address has two components, the network number and the host number. The subnet mask defines which part of the address is which. Most address schemes I've seen use 255.255.255.0 as the subnet mask, but that isn't necessarily the case, especially in private networks. If you AND the IP address with the subnet mask, the result is your network number; subtracting this from the IP address gives you the host number on the network. A class C network (subnet 255.255.255.0) allows 254 hosts, as the first and last address of any range of addresses are reserved. Using a subnet of 255.255.254.0 would enable you to put 510 hosts in the network - write it out in binary and it will make a lot more sense.
The gateway is just the IP address of the router or computer that connects your network to the outside world, usually provided by your ISP through DHCP, along with the gateway and DNS addresses.
"Your village called - They're missing their idiot."
|
|
|
|
|
Thank you very much for this consise answer.
Best Wishes and Happy Holiday's,
ez_way
|
|
|
|
|
Hi all
I'm setting underlining with CHARFORMAT2, but the underlining seems to be the color of the font. Is there anyway I can control this?
Thanx
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
Hi,
I am using VC++ 4.0, mfc
Using mapping mode LOENGLISH I drew a rectangle
about 8 inch width and hight 9 inches (800,900 logical units). I display the rectangle at (100,-100) so it is
displayed in the centre of the screen(levaing aprox. 1 inch
margin on left, right side), the lower half can be seen by
scrolling.
This works ok in windows95,98, me(Res 800 x 600) but when I run the program
on XP (Res 600 x 800) the size of the rectangle reduced to half.
Changing different resolutions or setting could not solve my
problem.
Moreover when the same machine (Same Graphics card and hardware)booted in 98. The rectangle got the original
normal size.
I expected minor change in the size(the printing is of
same size on all OS and Printers )
how to resolve this problem ?
TIA
- milind
|
|
|
|
|
hi , can anyone please tell me how to copy a file to another destination , something like the filecopy command in the vb.
|
|
|
|
|
Check out shfileoperation api.
My God is more powerfull Than Your God.
|
|
|
|
|
> ...something like the filecopy command in the vb.
Just swap the words in filecopy ...and you'll get the C++ equivalent.
CopyFile or CopyFileEx will do it in C++. Another alternative is SHFileOperation .
Regards,
RK
|
|
|
|
|