|
Thanks heath, most helpful.
I'll make the enumeration in C# and use that to interpret / designate the integer.
What is IL?
I will definitely look into it.
Cheers
Cata
|
|
|
|
|
IL is Intermediate Language, it's the code that compilers targeting the CLR produce - this is what makes the source language unimportant, because they compile down to IL, or to be more specific, MSIL or Microsoft IL, which is just some extensions to the Common IL specification.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I've looked at the Reflector program.
Very interesting.
However, I have found all the draganddrop related classes, except the DoDragDrop.
Am I missing something? It's not in there anywere.
Cata
|
|
|
|
|
Found it.
Just got lost looking for a method in Form, when it's in Control.
|
|
|
|
|
Wrong one - you must P/Invoke the native DoDragDrop . It is also in there.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I found the one that uses the STGMEDIUM structure you pointed out to me.
Where would the native COM DoDragDrop method be?
Cata
|
|
|
|
|
System.Windows.Forms.SafeNativeMethods.DoDragDrop . You really should try to P/Invoke these yourself, though, and then compare them to what Microsoft did. It's a much better way to learn about marshaling and Types.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I've always found that, if i have a minimal understanding of something, it is helped more by looking at what others do than blundering around in the dark.
If I know roughly what I am doing, then I am happy to try and find my own way.
I shall look it up as you said, and study it.
Marshaling and Types I already understand, even if it's only rudimetry. What I need to do is study the classes to see what I can do with them.
Thanks again.
Cata
|
|
|
|
|
I've gone through the magic-eye and slipstick and microsoft tutorials on extending office applications, but I am none the wiser, and hoping someone here can point me in the right direction.
How do I add a menu-option to (say) the Tools menu in Outlook?
I know:
* Its a COM Add-in thing
* I'm using an IDT2Extensibility
* I have to do it in the OnConnection event that is fired
I have found examples and plenty of information about adding buttons, but I really want to add a menu option - either within the Tools menu or via a new top level menu.
|
|
|
|
|
Hi,
When I did Copy Text from Word document and I try to paste it into a RichTextBox Control, Text that Contain digit and signs togther are upside down
It go's like this : if in the doc there is text like this "972-363534" when I paste it looks like this "363534-972".
How can I fix this problem by code or some other way?
thnaks
Eran Alshech
|
|
|
|
|
That is weird! Download http://www.codeproject.com/clipboard/clipspy.asp[^] and see what the clipboard formats that are used are. Post them here and maybe this'll help a bit.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Well I try it and I found that to word copy the data to the clipbord very well , It's the richTextBox that flip the text.
again : I copy this text : 054-363534
and when I paste it into RichTextBox it's look like this: 363534-054
|
|
|
|
|
What do I use to represent a C++ Long in C#?
I know DWORD is int, and C# Long is not the same as C++ LONG.
C# uses 8 bytes, C++ uses 4.
So what do I do to wrap one to the other?
Thanks
Cata
|
|
|
|
|
In Visual Basic 6, Integer equals C#'s short , so I think that this may be the case with C++ too (I don't know C++, you see). Thus, int should do the trick.
- Daniël Pelsmaeker
"To survive it is often necessary to fight, and to fight you have to dirty yourself."
- George Orwell
|
|
|
|
|
C++ - C# (Win32)
----------------
int = int
long = int
__int64 = long
DWORD = uint
Regards,
Alvaro
He who laughs last, thinks slowest.
|
|
|
|
|
Actually, be careful with uint . It's not CLS-compliant and you should try to avoid those. I have almost always used int for DWORD with absolutely no problems. Microsoft does the same throughout the BCL, too. While DWORD 's can't be negative, the bit representation is still the same so even passing a negative int to a DWORD in some native function works.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Heath Stewart wrote:
It's not CLS-compliant and you should try to avoid those.
as long as it is not publicly accessable, iow locals, private fields.
one should always use the correct type though, although int will probably work 31/32 times
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
leppie wrote:
although int will probably work 31/32 times
Exactly! As I was saying, though, this usually isn't a problem. The biggest reason I typically use int is because Microsoft does in their BCL. Since they wrote the .NET Framework, seems reasonable to me. Of course, I guess worrying about CLS-compliancy is pretty moot if you're using a uint to P/Invoke a native call, huh?
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Using Windows XP explorer I just tried to search for some words that I know are in comments within some of my .cs files. All the searches turned up empty! I double checked the directory and the spelling. I checked all of the options to be sure case or some other setting was not the issue. Anyone seen this, know why it doesn't work, or what I might be doing wrong?
>>>-----> MikeO
|
|
|
|
|
Check the Index Server catelog, System, to make sure it indexes files with unknown extensions (you can get to this from the Computer Management MMC snap-in, or by right-clicking on My Computer and clicking Manage).
Also, the Index Server does not index files immediately. It catelogs at certain times, usually when your computer is idle. It doesn't happen immediately.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I thought the file searching features were just buggy. I was close to having a hit put out on that little wizard guy and his puppy dog friend . I had no idea...
I resorted to installing Cygwin32 just so I could use grep.
Any idea how bad the perfomance hit is to have this service constantly indexing all file types (I assume this goes on in the background constantly)?
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
As I said, the Indexing Service runs when your computer is idle. To see this in action, see the Indexing Service snap-in. Clicking on the root node will show you the stats and status for each catalog.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I've been digging throught my large stack of C# books in an effort to find some information on how to get multiple source files to work together and haven't found anything usefull.
For instance, it seems reasonable to me to place a function call in the event handler and place this function (method) in some other file. My knee-jerk reaction is to make a header file but that doesn't fly here.
What keyword do I need to search for? I've looked under scope, modules, visibility, and assemblies and somehow keep missing it.
Are all the static methods global within an assembly?
Is this good practice?
Thanks
Ken Galer
Electrical Engineer
Preferred Utilities Corp.
Danbury, CT 06810
|
|
|
|
|
in this version of c# all parts of a class must be in one file.
in the next version you will be able to split the code up using "Partial Types"...
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Thank you!
Ken Galer
Electrical Engineer
Preferred Utilities Corp.
Danbury, CT 06810
|
|
|
|