|
hope you saved the image like the code below
_image.Save( _T("c:\\abcd2.bmp"), Gdiplus::ImageFormatBMP );
|
|
|
|
|
thanks naveen ...i never forget this help
i would like say ..please add my name to your friends list please .
~~~~~~~~~~~~~Raju~~~~~~~~~~~~~
|
|
|
|
|
rajugis wrote: thanks naveen
Your are welcome.
|
|
|
|
|
hi Naveen ..is that any possible for create the rectangle in Color??
~~~~~~~~~~~~~Raju~~~~~~~~~~~~~
|
|
|
|
|
Yes. check MSDN[^]. It says, "The current pen outlines the rectangle and the current brush fills it. ".
so create the brush of desired color, select it to the DC and then draw
|
|
|
|
|
one small doubt naveen ....
i want to show only the cutting image portion ..but the output image contains only the except cutting image portion.
??
~~~~~~~~~~~~~Raju~~~~~~~~~~~~~
|
|
|
|
|
What? I didnt understand..
|
|
|
|
|
u assume ...that
one image file contains 5 buildings ..i want to cut and save only the 5th building ,other buildings are not shown in the image.
but when we are save the image 5th building not shown other four buildings are shown in the image...
~~~~~~~~~~~~~Raju~~~~~~~~~~~~~
|
|
|
|
|
When I'm working with DC's and Bitmaps, and BitBlts, I like to use the following utility from PJ Arends.
Image Viewer Utility[^]
It lets you debug your code, and see the results of image changes like a variable in a watch window.
Very handy, and a shame PJ isn't around CP anymore. (OK, hardly ever)
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
The following code can run correct in VC6.0,but in VC2005 it can not show the text.
Who can tell me why.
//m_pResult is a CEdit pointer
if(!m_pResult->IsWindowVisible())
{
CRect rect;
this->GetClientRect(rect);
m_pResult->MoveWindow(rect);
m_pResult->ShowWindow(SW_SHOW);
m_pResult->SetWindowTextA("aaaa\r\nbbbbb");
}
else
m_pResult->ShowWindow(SW_HIDE);
be my girl , OK?
|
|
|
|
|
liu3p wrote: m_pResult->SetWindowTextA("aaaa\r\nbbbbb");
May be the project is unicode. Use SetWindowText instead of SetWindowTextA
m_pResult->SetWindowText( _T("aaaa\r\nbbbbb"));
|
|
|
|
|
That is correct.
In VC 6.0 all projects are by default non-unicode.
In VS2005 all projects are by default unicode.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Done.Thank you.
be my girl , OK?
|
|
|
|
|
#include<stdio.h>
#define abs(x) ((x<0)?(-(x)):(x))
#define epsilon .000000000001
#define size 5
double multiply(a,m,product)
double a[size][size],product [size][size];
int *m;
{
int test=0;
int count,i,j,k,l;
double olda[size][size],diff;
for(i=0;i<*m;i++)
for(j=0;j(* m;j++)
olda[i][j]=a[i][j];
for(count=1;count<=1000;count++)
{
for(i=0;i<*m;i++)
for(j=0;j<*m;j++)
product[i][j]=0;
for(i=0;i<*m;i++)
for(j=0;j<*m;j++)
for(k=0;k<*m;k++)
product[i][j]=product[i][j]+a[i][k]*olda[k][j];
for(i=0;i<*m;i++)
for(j=0;j<*m;j++)
{
diff=abs(product[i][j]-olda[i][j]);
if(diff>epsilon)
{
test=1;
for(k=0;k<*m;k++)
for(l=0;l<*m;l++)
olda[k][l]=product[k][l];
}
break;
if(test<1)
{
printf("\nThe numberof iterations is:");
printf("\n");
printf("\n %d",count);
break;
}
test=0;
}
return(0);
}
main()
{
static double a[size][size]={{0.1,1.0,0.0,0.0,0.0},
{0.0,0.0,0.3,0.7,0.0},
{0.0,0.0,0.0,0.2,0.8},
{0.0,0.0,0.1,0.0,0.9},
{1.0,0.0,0.0,0.0,0.0}};
double product[size][size],pi[size],diff;
int test;
int m=size;
int i j;
multiply(a,&m,product);
printf("\n");
printf((" \nThe product is:");
printf("\n");
for(i=0;i<m;i<m;i++)
{
printf("\n");
for(j=0;j<m;j++)
printf(" %15.12f", product[i][j]);
}
printf("\n");
printf("n");
return(0);
}
I got the following error messages when I tried to compile it.
Error 1 error C2065: 'a' : undeclared identifier
Error 2 error C2065: 'm' : undeclared identifier
Error 3 error C2065: 'product' : undeclared identifier
Error 4 error C2448: 'multiply' : function-style initializer appears to be a function definition
Error 5 fatal error C1004: unexpected end-of-file found
Please help me I have been trying to figure out how to fix it.
Thanks
|
|
|
|
|
line #5 needs a semi-colon at the end.
|
|
|
|
|
There's several things wrong.
1/ You didn't read the posting guidelines, and put your code in pre tags, so there's no way on earth that I can be bothered to work may way through that wall of code.
2/ 1st error, as you've seen is a missing semi colon.
3/ 3rd error... When putting in tot prototype for your multiply function, you don;t say what kind of things a and m are. ints? doubles? struct Froobles?
OK, done now.
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Hello Team ;
I have a library file (.LIB) with Password protect it. I'm looking for a recovery software or application or anyway to recover the password.
Any thought....
Please reply...
Thanks for all of your help.
|
|
|
|
|
Password? A LIB file? Naaaaa. Unless you mean a LIB file that isn't an object library.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
That is correct. I do have a.Lib file and it is password protected. We would like to recover the password. so we can view the Lib ...
|
|
|
|
|
It's still doesn't make any sense...
As Stuart pointed out, a .lib file is not password protected. So, if you really want some help, I suggest you try to explain your problem in a much better way.
By the way, does it have anything to do with C++ ?
|
|
|
|
|
Its probably done by some package that encrypts the file and decrypts it on giving the right password.
I remember writing one during the old DOS days.
Now, will that work here...
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
DallasProgrammer wrote: I do have a.Lib file and it is password protected.
By what?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
(oh please say "a license key"! oh please oh please oh please)
|
|
|
|
|
Are the functions inside the lib file protected at runtime ? i.e. do they need a license to run?
This signature was proudly tested on animals.
|
|
|
|
|
Hi,
Am getting to grips with the g++ compiler...
I have my main cpp file containing the main function in
/home/alfred/Public/Test/
I have my header file in
/home/alfred/Public/Test/header/
I have my src file for the header in
/home/alfred/Public/Test/src/
I used the command
g++ -c -Wall -I/home/alfred/Public/Test/header/ myclass.cpp
to generate my myclass.o object file and then the archiver to create the library
ar rc mylib.a myclass.o
which was fine but now I am having problems compiling and linking the main.cpp file to get my exe. I am trying to use the command
g++ -L/home/alfred/Public/Test/src -I/home/alfred/Public/Test/header/ main.cpp -o a.out
but I am being returned the error
/tmp/ccmZLiDt.o: In function `main':
main.cpp text+0x59): undefined reference to `myclass::myclass(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
collect2: ld returned 1 exit status
meaning that it cannot see the constructor for the class myclass. I thought the -L flag is to tell it where your library is which has the constructor definition? Ummm, am I getting confused with the -l flag?
Thanks for any information.
|
|
|
|