|
Hello cedric monen this is mcnu
Thanks for the help
and Thanks for your suggestion that is really helpful to me
regards
cnu
Live life happily until your last second
-- modified at 9:28 Thursday 8th September, 2005
|
|
|
|
|
You're welcome
|
|
|
|
|
Hi all,
Can anyone help me? I need to store a windows forms as a bitmap file i.e. when the form closes save the form as an image.
Is this at all possible? I suppose I'm looking for print screen like functionality but I only want to capture the form itself.
Hope it makes sense.
Thanks all.
Richard
|
|
|
|
|
Richard,
I'm surprised that no one responded to this question. It is definitely possible to save a screen display to the bitmap format, as you are probably aware, most games have this capability built in.
There is an article right here on CodeProject that demonstrates this: Screen and Form Capture with Managed C++[^]
You may find that this is not the best possible solution, for a number of reasons. But, if it is adequate for your needs, who cares, it's simple and straightforward.
05
|
|
|
|
|
Hi there.
I downloaded a matrix arithmetic library, Newmat10, and are struggling to get it to work. The author says that it would work fine with MS Visual Studio 2003, which is what I am using.
The library consists of a lot of cpp files which have to be compiled. This part I get right. Then all I have to do is include the main header file >> newmatap.h, in the project where I want to use the matrix functions.
So I include the header file in the project where I want to use the functions and it compiles. But the moment I use one of the functions of the library, I get a lot of error messages that looks like this:
TestNewMat.obj : error LNK2019: unresolved external symbol "public: __thiscall Matrix::Matrix(int,int)" (??0Matrix@@QAE@HH@Z) referenced in function _main.
What am I doing wrong?
The author said something about it being best to store the resulting object files ( the ones you get when you compile the source files of the library) as a library. How does that work?
Any help would be appreciated!!
Thank you.
|
|
|
|
|
BenPage wrote:
The library consists of a lot of cpp files which have to be compiled
Do you compile them as a separate library ? Or do you want to add all the files to your project ?
BenPage wrote:
What am I doing wrong?
It's normal that it doesn't work: you have just included the header files in your project thus the linker doesn't find the 'code' for the functions. You have two solutions: either include the .cpp to your project also OR, if you want to use that in a separate library, go in the project settings (don't remember exactly where) and you have somewhere to tell that your project uses the library you compiled (don't forget to copy it to your project folder).
Hope this helps
|
|
|
|
|
how to convent variables from "String* " to "unsigned char *"?
&
how to convent variables from "unsigned char * " to "String *"?
Thank you very much!
|
|
|
|
|
Did you take a look at the Marshal.StringToPtrAuto and related methods?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
thanks for your prompting,
:(but i can't find the Marshal.StringToPtrAuto In neither Google Search or CP Search,
so can you tell me how to find it ?
Thank you very much.;)
|
|
|
|
|
Hello everyone!
OK, I just got into C++, and I need help with replacing text within a string... I'm looking for something like:
strreplace(charArray, oldValue, newValue);
The replace() function in the string class is hard to understand... Can anybody tell me what to do? Thanks!
BTW: The program I'm making is gonna be awesome when it's done!
And I'm on Borland's compiler. :P
Sulfurik K. Nosferathus (Darth_Sulfur)
www.SulfurMidis.com
www.SulfurSoft.tk
http://www.BeepXtreme.tk
[ftp://][http://][hotline://]tsfc.ath.cx
-- modified at 17:58 Monday 5th September, 2005
|
|
|
|
|
Darth_Sulfur wrote:
he replace() function in the string class is hard to understand... Can anybody tell me what to do?
string& replace(size_type pos, size_type n, const string& str);
Delete a substring from the current string, and replace it with another string.
string str14 = "abcdefghi";
string str15 = "XYZ";
str14.replace (4,2,str15);
cout << str14 << endl; // "abcdXYZghi"
I got that from google. It's pretty clear, you need to know the location and length of the string you want to replace. You could easily write a helper function that finds these things, and does the replace in the manner you're hoping.
Good luck !!
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hard to understand ?
hum, let's see what the MSDN[^] tells us...
as you can see, there are 10 overloads of the function. choose the you you find the best for what you need, then, pass it the parameters it's waiting for (be careful of the type so...
the overload christian show you is the first one :
basic_string& replace(
size_type _Pos1,
size_type _Num1,
const value_type* _Ptr
);
_Pos1
The index of the operand string at which the replacement begins.
_Num1
The maximum number of characters to be replaced in the operand string.
_Ptr
The C-string that is to be a source of characters for the operand string.
i hope you understand better the doc...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
|
Darth_Sulfur wrote:
C# is SOOOOOOOOOO much easier than C++!
nop, C# is better than Managed C++... here is the difference ;P
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
|
I have a C# project that needs to use a C++ SDK, so I'm trying to write a MC++ dll to act between them. At first, this was fine, but the problem is, the SDK defines a number of function pointers for callbacks. The objects I pass through complain that they are __gc type instead of type, and the pointers themselves complain that they are not __stdcall, which I assume means that the .NET stuff has it's own calling convention. However, I'm not that knowledgable when it comes to dlls, and I sure have never used MC++ before. I tried putting __nogc at the head of the class, that fixed all my errors, but gave me a new one, telling me I can't do that. What's the best way for me to proceed here ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
...For those of you who are interested, this inquiry reaches a dramatic conclusion over at the Microsoft Technical Forums. I'm just SO HAPPY that I didn't make a TOTAL ASS out of myself, by attempting to offer some advice about something,...WELL, OK, BYE,...
cgraus[^]
And, More Analysis[^]
-- modified at 19:29 Tuesday 13th September, 2005
|
|
|
|
|
|
There is a AT protocal hardware, on which I want to build a http channel.
How to design?
Thanks!
|
|
|
|
|
#include <iostream>
using namespace std;
class A
{
int i;
public:
A(int ii):i(ii){}
int operator ++()
{
return ++i;
}
int operator ++(int)
{
int ntemp;
ntemp = i;
i++;
return ntemp;
}
int geti(){return i;}
};
int main()
{
A a(2);
cout << ++a << endl << a.geti() << endl;
}
The operator "<<" is evaluated from left to right how can a.geti() gets called first?
|
|
|
|
|
I don't understand the question (you could have placed some punctuation... )
well, if i am not on what you mean, please reformulate.
you're asking for why geti() is called before ++a ?
it isn't...
otherwise, i missed your point.
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
toxcct wrote:
you're asking for why geti() is called before ++a ?
it isn't...
I'm under VC++ 6.0 and saw with my own bear eye geti() is called before ++a.
You can make those member function involved announce themselves, then you'll see the calling sequence!
|
|
|
|
|
The order of evaluation is for the << operator only, not for the operands of the << operator. The left to right associativity of << means that your statement will look like
((((cout << ++a) << endl) << a.geti()) << endl);
That is, cout << ++a will be calculated first, then the result of that will be the LHS and endl will the RHS next time and so on. It doesn't mean that the compiler needs to evaluate ++a before a.geti(). The compiler usually will evaluate ++a and a.geti() (in any order it wishes to, IIRC) before starting to execute the << operator.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi there.
I am working on a project wich requires me to use matrices and do some computations on them. So I downloaded the LINPACK linear algebra library from
http://www.csit.fsu.edu/~burkardt/cpp_src/linpack/linpack.html
The library is very nice, offering a huge collection of very usefull matrix arithmetic.
I downloaded the source for the library which consisted of 2 .h files and 2 .c files. And when I try to compile the c files, using Visual Studio C++ 2003, I get two build errors:
linpack.c
c:\Documents Of I\UP\Year5 Semester2\EPR400\My Programming\TestMatrix\linpack.C(5668) : fatal error C1010: unexpected end of file while looking for precompiled header directive
blas1.c
c:\Documents Of I\UP\Year5 Semester2\EPR400\My Programming\TestMatrix\blas1.C(4532) : fatal error C1010: unexpected end of file while looking for precompiled header directive
So I need help to get the source code to compile on VS C++ 2003. I think I need to change settings for the precompiled headers section of the project properties but I dont have a clue what it all means.
Please help!
Thanks!
Ben
|
|
|
|
|
add to your c files #include "stdafx.h" if u are using then into a visual c++ project with precompiled header project option
NG
|
|
|
|