|
you mean it is working in vc6 and not in .net 2003.
|
|
|
|
|
When I am checking the .Wav file using mmioDescend(hSrc ,&mmckInfoParent,NULL,MMIO_FINDRIFF ); , it is returning MMIOERR_OUTOFMEMORY in debug mode. But Release mode works well.
What could be the reason for this?
Thanks & Regards,
Suman
|
|
|
|
|
In release mode it is working surely because your code isn't automatically checked as in debug mode, but this doesn't means that there isn't an error.
You have to fiind it in debug mode!
Russell
|
|
|
|
|
The problem resolved after I moved some variables from inside class of header file to .cpp file as file level variable.(like MMIOINFO variables)
Thanks for your suggestion.
Best Regards,
Suman
|
|
|
|
|
Russell
|
|
|
|
|
can any body suggest me some code snippet to delete a file programatically,
something like,
DeleteFile("C:\\myfolder\\myfile");
please suggest.
thanks.
-- modified at 5:01 Tuesday 4th September, 2007
|
|
|
|
|
chandu004 wrote: DeleteFile("C:\\myfolder\\myfile");
Whats problem with the above code?
|
|
|
|
|
WOV IS DELETEFILE REALLY AVAILABLE?
I JUST TRIED TO SPECIFY THE PROTO.
I WILL JUST TRY IT OUT AND GET BACK TO YOU.
THANK YOU.
|
|
|
|
|
He need some sample code...
- NS -
|
|
|
|
|
yes naveen i got it.
and my sincere sorry for posting without verifying it.
|
|
|
|
|
I really enjoyed that...
|
|
|
|
|
|
You can also use of SHFileOperation .
|
|
|
|
|
Which is the latest version of VC++ ???
|
|
|
|
|
Microsoft Visual C++ 2005.
Microsoft Visual C++ 2008 Beta.
Maxwell Chen
|
|
|
|
|
The latest verion of vc++ currently available is with the visual studio 2005. Another version called "Orcas" is expected to release on 2008. It is now available as RC .
|
|
|
|
|
ThankXXX
There Is Nothing Right & Wrong
|
|
|
|
|
Hi,
On my Dialog I've got a "picture control" element. It is assigned with a var "m_pictureControl" in the code.
I draw an image inside the border of the picture control with GDI+. The problem that occurs is, that the image overpaints the border of the picture control (only when zoomed, otherwise I can shrink it, so that it can fit inside).
I get the area where the image will be drawed like that:
CClientDC dc(&m_pictureControl);
Graphics graphics(dc);
So it will have the dimension of the picture control, but unfortunately with the borders. Is there a way to somehow shrink the "graphics" object/area?
Thx, Shi
|
|
|
|
|
|
you can use the Graphics::SetClip() function to clip the border.
What I mean is, get the client rect of the picture control. Deflate it by the width of the border( 1 or 2 pixel ), then apply this rect to SetClip() function.
|
|
|
|
|
Hi, thanks for your answer.
I tried following (a Method that gives me back a Graphics object with whom I can work with for drawing the images into):
Graphics CmyDialog::GetGraphicsObj()
{
CClientDC dc(&m_pictureControl);
Graphics graphicObj(dc);
CRect rc = GetImageArea(&m_pictureControl);
CPoint topLeft;
topLeft = rc.TopLeft();
int rcWidth = rc.Width();
int rcHeight = rc.Height();
Rect gdiRect(topLeft.x, topLeft.y, rcWidth, rcHeight);
graphicObj.SetClip(gdiRect, CombineModeUnion);
return graphicObj;
}
It says it has an error at the return line:
error C2248: "Gdiplus::Graphics::Graphics": Kein Zugriff auf private Member, dessen Deklaration in der Gdiplus::Graphics-Klasse erfolgte.
( no access to private memember, see declaration in the Graphics-Class)
1) Is this a good way, how I try to clip the rectangle/graphics area?
2) why does this error pop up?
Thx for ur help, Shi
|
|
|
|
|
You cannot return a Graphics object.
BTW I dont understand whats the purpose of the above function
what I mean is to do as follows..
CClientDC dc(&m_pictureControl); <br />
Graphics graphics(dc);<br />
CRect rc = GetImageArea(&m_pictureControl);<br />
re.DeflateRect(2,2);<br />
Rect gdiRect(topLeft.x, topLeft.y, rcWidth, rcHeight); graphicObj.SetClip(gdiRect, CombineModeUnion);<br />
do your drawings here.
TheShihan wrote: error C2248: "Gdiplus::Graphics::Graphics": Kein Zugriff auf private Member, dessen Deklaration in der Gdiplus::Graphics-Klasse erfolgte.
( no access to private memember, see declaration in the Graphics-Class)
Sorry I dont know the above language.
|
|
|
|
|
well, I'm stuck... first I show my code:
void xy::DrawPicture()
{
CClientDC dc(&m_pictureControl);
Graphics graphics(dc);
CRect rc = GetImageArea(&m_pictureControl);
CPoint topLeft;
topLeft = rc.TopLeft();
int rcWidth = rc.Width();
int rcHeight = rc.Height();
Rect gdiRect(topLeft.x, topLeft.y, rcWidth, rcHeight);
graphics.SetClip(gdiRect, CombineModeUnion);
m_nPanX = 0;
m_nPanY = 0;
int x = 0,
y = 0;
int size_x = rc.Width();
int size_y = rc.Height();
graphics.DrawImage(m_image, x, y, size_x, size_y);
enableImageManipulation(true);
}
and to make things clearer (hopefully ):
CRect xy::GetImageArea(CWnd * windowElement)
{
CRect rc;
windowElement->GetWindowRect(&rc);
ScreenToClient(&rc);
rc.DeflateRect(2, 2);
return rc;
}
Sooo.. what I don't get or what it's not working is: I don't see any change at all with "CombineModeUnion". I have the "graphics" which is from the "dc", which has the dimensions of the picture control with borders. Then and I have the "rc" (a CRect) which has been deflated 2 pixel on each side.
So in my mind, when I take the UNION of the both "shapes" it should clip the "graphics" object and it should have the dimensions of the smaller "rc", also it should be positioned inside the picture control, spacing 2px on each side and not TOP: 0 LEFT: 0 (as it seems to me it is).
What am I doing wrong, any Ideas?
Thx, Shi
|
|
|
|
|
try using the CombineModeIntersect flag instead of CombineModeUnion
|
|
|
|
|
Can anybody tell me how much area of A4 size paper
we can use for printing???
Is possible to use total area???
ThankXXX...
|
|
|
|