|
Manfred Staiger wrote: the .NET dll needs to implement a COM interface to fit my purposes
Not entirly true. VC++ .NET compilers support "mixed mode". Use can use the /clr compiler switch to give your C++ project access to the .NET platform including components authored in nasty VB.NET Now it's not quite that simple but that is basically the idea. There are plenty of MSDN resources about project settings etc.
Manfred Staiger wrote: The problem is that the dll doesn't export any functions like a common dll does.
Correct, everything in .NET is a class. Using "mixed mode" you can create an instance and call the methods, or call the "static" methods of the class of course without an instance.
The Code Project (Managed) C++/CLI forum is dedicated to using the VC++ product with the .NET platform so your future questions on this subject should go there.
hope that helps
|
|
|
|
|
Hello all,
I am sure this is simple to do but I can't find it anywhere.
How do you do mutally exclusive toolbar buttons?
I mean you know the kind of toolbar buttons that when pressed stay pressed and at the same time, deselects all other toolbar buttons in the same grop?
You know in Microsoft Word, you can align you test to the left, center, right or justified. When you press one of those buttons the button stay pressed and also only one of those buttons can be pressed at any given time.
How do you achieve that?
Thanks.
Ciao
Giulio
|
|
|
|
|
I think you have to deal with button styles.
In your OnCreate handler for main frame, you can add a fragment like this:
mMyToolbar.SetButtonStyle(mMyToolbar.CommandToIndex(ID_BUTTON_1), TBBS_CHECKGROUP);
mMyToolbar.SetButtonStyle(mMyToolbar.CommandToIndex(ID_BUTTON_2), TBBS_CHECKGROUP);
mMyToolbar.SetButtonStyle(mMyToolbar.CommandToIndex(ID_BUTTON_3), TBBS_CHECKGROUP);
In this case three buttons will act like radio-buttons.
In addition, in order to make the buttons enabled, you have to provide event handlers for them.
See also: http://www2.cs.uregina.ca/~peckham/cs230b/source/Myword/toolbar.htm[^].
|
|
|
|
|
Hi again guys
i have this simple question
i have a string that holds some text
string text;
i want to search the string and replace any ("&nbs" with a space)
if i use the string.replace("&nbs"," ") it doesn't work what else do i need to specify for the function to work?
Any other ways to do it?
Thanks a lot
|
|
|
|
|
something like this:
find the first "&nbs"
copy the left part of the string (ie. before the &nbs) to a temp string
add a " " to the temp
in a loop:
find the next "&nbs" in the remaining (right side) string
if none found, add the remaing string to temp, and return temp
add the left part to the temp
add a " " to the temp
repeat the loop
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
Thanks a lot Chris Losinger
good clear steps thanks a lot
|
|
|
|
|
antonaras wrote:
if i use the string.replace("&nbs"," ") it doesn't work
What dosn't work? Does the compiler/linker complain? Is an exception thrown? Do any replacements happen?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
What does memory leak mean?
Fortitudine Vinsinues!
|
|
|
|
|
It's unnecessarily using memory when it is no longer needed and we didn't free it or the program doesn't free it.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Basically its a bug in a program where memory cant be freed up (in my experience, it happend mostly with dynamically allocated memory cells). The program will continue taking up more and more memory until it eventually crashes:
a)Your computer
b)Your program
c)Your computer (You'll crash your computer into a wall once you realize that a program crashed windows and destroyed the 100 page thesis you were writing and didnt save :P)
Hope that helps
Robbie
|
|
|
|
|
How does one know that a memory leak is happening? Or how does one find out where the memory keak is taking place?
Fortitudine Vinsinues!
|
|
|
|
|
See Here[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thank you.
Fortitudine Vinsinues!
|
|
|
|
|
|
|
A memory leak is caused when an area of memory no longer has any pointers pointing to it, but it has not been freed. For example:
int *ptr = new int[10];
ptr = new int[5]; The second allocation causes a memory leak, because the memory allocated in the first line cannot be reference, but has not been freed. There is no way you can go back and reference the first memory block, so it has been "leaked".
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
What is the best way to communicate between Threads?
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
threads share the same memory amounts, so there no need to build communication between them (such as pipe, locked tmp files, etc...).
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
PostThreadMessage or SendMessageTimeout according to your ease.
Regards,
FarPointer
Blog:FARPOINTER
|
|
|
|
|
What's the best way to build a house?
There are many ways, ranging from thread messages (PostThreadMessage etc...) through shared memory, mailslots, pipes and shared variables (with appropriate mutexes/critical sections). Read up on them all and pick the one most suited to your application.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Can anyone tell me how to find out whether a disectory with a given path exits on the local disk or not?
Thanks and Regards,
Anil
|
|
|
|
|
if (access("c:\\tmp"), 0) != 0)
{
}
|
|
|
|
|
|
Try pathisdirectory/getfileattributes apis
|
|
|
|
|
See Here[^] maybe it is some helpful to you
whitesky
|
|
|
|