|
I have tried
Image *bmpTemp;<br />
Graphics gr(bmpTemp);<br />
.... stitching here
but result to following error,
bmpTemp is being used without being defined.
I don't really know how to implement it.
|
|
|
|
|
For instance
CImage bmpTemp;
bmpTemp.Create(640,400,32);
Graphics gr(& bmpTemp);
Bitmap bmpTemp(640,400, PixelFormat32bppRGB);
Graphics gr(& bmpTemp);
Did you follow the link provided by
Sandip?
Have you a good C++ tutorial?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
modified on Tuesday, September 9, 2008 4:41 AM
|
|
|
|
|
Yes, I have tried also
CImage bmpTemp;
but there is no intellisense for .Create()
bmpTemp.Create();
I have tried including altimage.h but it comflicts to other class I'm using.
Or is there other header to include?
|
|
|
|
|
TooShy2Talk wrote: CImage bmpTemp;
I dont know if CImage is derived from Image.
But you can use
Image *bmpTemp = new Image(iWidth,iHeight);
Did you try this??
I don't know why are you facing so much trouble in this
Previously you were using hDC directly to draw your bitmaps on.
Now you just have to replace this hDC with temporary bitmap..
and once you finish all your operations do following
Graphics gr(hDC);
gr.RotateTransform(..);
gr.DrawImage(bmpTemp);
Is it clear?
Regards,
Sandip.
|
|
|
|
|
SandipG wrote: But you can use
Image *bmpTemp = new Image(iWidth,iHeight);
I received an error on this,
I think there is no constructor available.
|
|
|
|
|
TooShy2Talk wrote: Image *bmpTemp = new Image(iWidth,iHeight);
I am nt sure if constructor is available for the Image class but it is surely there for Bitmap.
What is the problem you facing in following code.
Bitmap *bmpTemp = new Bitmap(iWidth,iHeight);
Graphics gr(bmpTemp);
If you still have problems
Please Look at this section on CP GDI+[^]
I hope it will help you..
Regards,
Sandip.
modified on Tuesday, September 9, 2008 4:40 AM
|
|
|
|
|
You're right: I made confusion, I'm sorry about.
I've modified my previous post. Hope it helps.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Finally, it WORKS.
Thank you very much.
It's a big help.
Till my next question.
|
|
|
|
|
I'm very sorry for the delay due to my mistakes.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I have successfully created the following lines
CPallini wrote: CImage bmpTemp;
bmpTemp.Create(640,400,32);
But encountered an error on the line below.
CPallini wrote: Graphics gr(& bmpTemp);
Error is "Cannot convert CImage* to HDC".
|
|
|
|
|
Dear All,
My project requirement is MFC application need to create setup package.I have created the setup package using Inno setup. Im using filters and equipment driver in my applicaion. so i need to connect filter(.bat file) and then driver should be install.
I have connected the filter using below code...
[Files]
Source: "C:\Program Files\Inno Setup 5\reg.bat" ;DestDir: "{app}"
[Run]
Filename: "{app}reg.bat"; Parameters: "/WHATEVER_PARAMS_YOU_NEED"; StatusMsg: "Installing driver..."
But now i want to install .inf (driver)file.How to install the driver in .iss file.
Plz helpme.....
It will be much helpful to me to give some advice on this..
Thank you very much,
Regards
Anitha
|
|
|
|
|
does this link [^] help ?
Regards,
Sandip.
|
|
|
|
|
I installed VS 2005 Pro on a new machine and went to debug an existing application. The ADO calls to query the SQL server DB are taking a REALLY long time, where they run instantly on the old installs. Are there any global settings that will change the debugger performance? I have all the patches installed, right data sources, same connection string, etc. but it won't run quickly.
|
|
|
|
|
Hi all
I am copy file data from source to destination.It is working only for .txt file.Code is here
USES_CONVERSION;
CString FileName;
CString cs;
CString CStrfilename=FileName;
char* charfilename;
charfilename=CStrfilename.GetBuffer();
LPCTSTR lp;
lp=CStrfilename;
PathSkipRoot(lp);
cs = "\\BackUp\\";
cs += PathSkipRoot(lp);
CopyFile(FileName, cs,TRUE);
But when i use
AfxMessageBox(cs) then it is working for .exe. So can any one tell me where i am wrong?
Plz help me
|
|
|
|
|
|
vcprog wrote: I am copy file data from source to destination.It is working only for .txt file
What happens with other file types?
vcprog wrote: CopyFile(FileName, cs,TRUE);
Why don't you check the return value (and call GetLastError on failure?)?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
What happens with other file types?
.txt,.doc is copy successfully. And other file is not copy..
Plz help me
|
|
|
|
|
What about my second question (i.e. did you check CopyFile return value? Did you call GetLastError on failure?)?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
When i am useing GetLastError then i am geting Assertion fail..
File f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\appui1.cpp
Line 163
Plz help me
|
|
|
|
|
Actually GetLastError returns a number.
Please post the code wherein the error occurs and report the error exactly as it stands.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
USES_CONVERSION;
CString FileName;
cs;
CString CStrfilename=FileName;
char* charfilename;
charfilename=CStrfilename.GetBuffer();
LPCTSTR lp;
lp=CStrfilename;
PathSkipRoot(lp);
cs = "\\BackUp\\";
cs += PathSkipRoot(lp);
DWORD dwError = GetLastError();
CopyFile(FileName, cs,TRUE);
AfxMessageBox(dwError);
|
|
|
|
|
vcprog wrote: DWORD dwError = GetLastError();
You should call this after
vcprog wrote: CopyFile(FileName, cs,TRUE);
And then check error code why Copy fails??
Is it right?
Regards,
Sandip.
|
|
|
|
|
vcprog wrote: // CopyFile(st, cs,TRUE); DWORD dwError = GetLastError(); CopyFile(FileName, cs,TRUE); AfxMessageBox(dwError);
Please replace the above sequence with the following
if ( CopyFile(FileName, cs, TRUE) != TRUE)
{
DWORD dwError = GetLastError();
CString szMsg;
szMsg.Format("Error number %d", dwError);
AfxMessageBox(szMsg);
}
else
{
AfxMessageBox("Success");
}
and post the output.
<div class="ForumSig"><small>If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.<br>
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
</br></small><small><a href="http://www.codeproject.com/script/Articles/MemberArticles.aspx?amid=1778670">[My articles]</a></small></div>
|
|
|
|
|
Error no. 32 for .exe file and Error no. 3 for .txt file. But .txt file is copy file is Success.
Plz help me
|
|
|
|
|
haha~ The error number is exactly the same as that we have expected.
Click Tools >> error Lookup,enter the error number,
then you may have the answer.
You know some birds are not meant to be caged, their feathers are just too bright.
|
|
|
|