|
Hello all,
Iam trying to raise the event asynchronously, by invoking each subscriber using begininvoke method like this
C#
public event DrawTreeNodeEventHandler dr;
Delegate[] del= dr.GetInvocationList();
object[] obj=null;
foreach (Delegate d in del)
{
BeginInvoke(d, obj);
}
But this is not working in VC++(this is working in C#), its not compiling saying the error @ line1 "Usage requires to be a data member"
How to do that in VC++
|
|
|
|
|
i use the msxml lib write a xml,but have such a problem,that is i want to the file that open by notepad looks like the open by ie which has the layer and tabbed space,
for example:
my file
<UNIT><ATTR></ATTR></UNIT>
want to look like below in notepad:
<UNIT>
<ATTR>
</ATTR>
</UNIT>
how to solve the problem?who can help me ,i tried some method but can not solve so well.
|
|
|
|
|
Write a program that will enter a new line and a tab(or 2-4 spaces) after every '>' char. Of course it is a little more complicated but it shouldn't be too hard to implement.
█▒▒▒▒▒██▒█▒██
█▒█████▒▒▒▒▒█
█▒██████▒█▒██
█▒█████▒▒▒▒▒█
█▒▒▒▒▒██▒█▒██
|
|
|
|
|
yes,that maybe ok.but how to control the layers,such like this,
<L1>
<L2>
<L3>
</L3>
</L2>
</L1>
should i compute the tab numbers about each line?
if i want to format the xml like this,what can i do?
<L1>
<L2>
<L3></L3>
</L2>
</L1>
that is if the node is the leaf node,do not add a new line?
is that possible?
|
|
|
|
|
I was looking for something similar a few days ago. Search google for "XML pretty Print" and you'll find a few things. In the end I opened it in VS2006 which formats the text, then copy & paste but I only needed to do it once
|
|
|
|
|
I haven't found a way to do this in MSXML, but i know that Xerces can do it.
Just use this:
<br />
DOMWriter *theSerializer = ((DOMImplementationLS*)impl)->createDOMWriter();<br />
theSerializer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true);<br />
and possibly this:
<br />
theSerializer->setFeature(XMLUni::fgDOMWRTSplitCdataSections, true);<br />
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
sharkmouse wrote: how to solve the problem?who can help me ,i tried some method but can not solve so well.
IMXWriter Interface
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief And You
|
|
|
|
|
can you give me a simple example?
|
|
|
|
|
How to get all the flash's url from IHTMLDoument?
Is this possible?
Thanks.
3.141592653... Never Stop
|
|
|
|
|
3141592653 wrote: How to get all the flash's url from IHTMLDoument?
Is this possible?
you have to use correct interface for same i.e. IHTMLAttributeCollection and IHTMLAttribute
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief And You
|
|
|
|
|
3141592653 wrote: How to get all the flash's url from IHTMLDoument?
Is this possible?
you have to use correct interface for same i.e. IHTMLAttributeCollection and IHTMLDOMAttribute
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief And You
|
|
|
|
|
Hi Everyone,
I am having problem while trying to deploy a windows app on a client's machine. I have developed the app in VS 2005 vb.net. I am able to install the app on the development pc but when installing it on the client machine it gives me MS general error: System.InvalidOperationException and gives me an option to send the message to MS of not. The client machine has framework 2.0 installed. Can it be the windows XP causing this problem? I would be really grateful if anyone can help me.
Vin
What goes around come around
|
|
|
|
|
I would recommend you to post this on the VB.NET forum - this one is for non-.NET C++
Windows Calculator told me I will die at 28.
|
|
|
|
|
[Actually, never mind. I think the behavior I'm seeing matches the comment about printf in a child process behaving poorly due to buffering of output. The output does appear, just not immediately, presumably because it's being buffered.]
I want to create a child process (cmd.exe) that runs a batch file that will run for days or weeks or months and capture the stdout and stderr concurrently as it is happening. Do you know how I can do that?
I tried altering the example in http://support.microsoft.com/kb/190351 to use cmd.exe instead of client.exe, thinking I might be able to use separate threads for reading stdout and stderr. What I get seems to be the output from the batch file itself, but not from child processes of the batch file...
With a couple of examples I saw on this web page, they end up reading stderr first and then stdout afterwards, eventhough the code appears to be combining the stdout and stderr. I can't have that behavior, because the batch file could print output constantly to stdout and then once every 12 hours or so print something to stderr. I need to capture both stdout and stderr immediately as they are being written to.
-- modified at 13:27 Friday 27th October, 2006
|
|
|
|
|
I ve just started writing a little c file for webcam capture; all suggestions i got imply using 'ICaptureGraphBuilder2' interface, but visual studio comp. cant't recognize it;
should not it be in strmif.h, that is included through DShow.h?
Also i get funny compiling errors as 'SetFileName' is not a member of 'IFileSinkFilter'...when actually the auto-complete func itself prompts it among suggested methods of my pointer!
Using: visual studio 6.0 in windows xpHE and newest PSDK; going to fire off SP2 because improved nothing;
i linked in project settings to Quartz, strmbase and strmiids libs; i tried cut off default includes and/or incremental link but nothing changed...
please, tell me not i must use these interfaces only in a cpp env, i have to avoid it
Surely i forgot some simple, stupid thing...what?
Thanks guys
|
|
|
|
|
You've added a path to the platform sdk include folder to your VC settings?
|
|
|
|
|
yes. Include and subfolders. Without it vc complains about ALL dshow classes/methods, now only for some
Perhaps i need some newer .lib/.dll in system paths?
(installing SP2 didn't help )
I like this new way of learning TaiChi...
|
|
|
|
|
Talemin wrote: Perhaps i need some newer .lib/.dll in system paths?
That's what I was thinking. The libs won't help compile errors though, only link errors.
With VC 6.0 I'm pretty sure you'll need to point to the new stuff.
Maybe make sure include/library paths for latest sdk are ahead of the default paths in the
VS settings.
Can you post all the #include lines you are using, in order, including any in a stdafx.h pre-
compiled header file?
Mark
|
|
|
|
|
I am NOT using stdafx...i am bound to rely strictly on a void project/simplest c enviroment - for now at least.
I included:
#include "DShow.h"
#include "WinBase.h"
no redefinition errors showing up with this order;
DShow includes uuids, windows, ole[s] and a lot of 'standard' requested libs...all as <xxx> namespaces
I am starting to fear having to use all this stuff in a cpp env...or I shall ask my prof for vc2005
Nonetheless, put sdk paths ahead of others could do some good, thanks!
--edit---
I just found a ICaptureGraphBuilder2 def in an 'axextend.idl' file in sdk\Include! But I cannot use it as it is...
what are idl files?
thanks Mark and excuse me for pseudo-english
|
|
|
|
|
what about
#ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later.
#define WINVER 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#endif
#ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later.
#define _WIN32_WINNT 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#endif
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#endif
#ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later.
#define _WIN32_IE 0x0400 // Change this to the appropriate value to target IE 5.0 or later.
#endif
#include <DShow.h>
(winbase.h is pulled in through dshow.h)
|
|
|
|
|
sorry copy/pasted...you can use it simpler like this...
#define WINVER 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#define _WIN32_WINNT 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#define _WIN32_IE 0x0400 // Change this to the appropriate value to target IE 5.0 or later.
#include <DShow.h>
|
|
|
|
|
|
Talemin wrote: Well, i'd just found a mini-very-tiny-little line in sdk page so that new (2003->) sdks don't support visual studio 6.0 more. So much for microsoft compatibility
Bummer!!
You'll be happy you upgraded though. I'm still on VC++ .NET 2003, I admit, but it's far better.
Best of luck!
Mark
|
|
|
|
|
OK. VS2005 accepts new classes. I still get the 'funny' errors
(a is not a member of b, but auto-complete func prompts a in &b-> members list...) but they seem only a problem with old vs6 project file conversion.
I hope
Tip
you all will know this already, but for completeness'sake:
VS2005 provides no more ddraw libraries, which dshow still requires; you must install directx sdk too.
I like this new way of learning TaiChi...
|
|
|
|
|
Hello everyone!
I have this:
CEdit *m_em_errorMsg = (CEdit *) GetDlgItem(IDC_ERROR_MSG);
Is that a correct form of initialization? I don't want to use Create() because I'm using the dialog designer...
That code's giving me some errors, and the debugger's Watch 1 window has a lot of class (CEdit /CWnd ) members with "expression cannot be evaluated" errors on them, so that's why I'm assuming the init is the problem... Is it wrong? Thanks!
Windows Calculator told me I will die at 28.
|
|
|
|