|
I thought Paul DiLascia says that code reuse is the Holy Grail ?
Christian
I've learned that you cannot make someone love you. All you can do is stalk them and hope they panic and give in.
The early bird may get the worm, but it's the second mouse that gets the cheese.
|
|
|
|
|
to quote paul: "like - reuse dude"
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Hi all,
I am developing an MDI app using DirectDraw objects. However the following message pops up every time I exit the application:
ASSERT Failed
Executable: myDX.exe Pid 970 Tid a78. Module quartz.dll, 393 objects left active!
At line 341 of d:\nt_chk\multimedia\published\dxmdev\dshowdev\base\dllentry.cpp
Continue?
The variables used (declared as private):
LPDIRECTDRAWSURFACE pDDSPrimarySurface;
bool bFileLoaded;
HWND hWnd;
IDirectDraw *pDD;
IDirectDrawSurface *pOffscreenSurface1;
IMultiMediaStream *pMMStream;
IMediaStream *pPrimaryVidStream;
IDirectDrawMediaStream *pDDStream;
IDirectDrawStreamSample *pSample;
RECT rect;
I declared most of them in OnInitialUpdate.
and here is my ~myDXView()
{
AfxMessageBox("start");
if( pMMStream != NULL )
{
pMMStream->Release();
pMMStream = NULL;
}
if( pSample != NULL )
{
pSample->Release();
pSample = NULL;
}
if( pDDStream != NULL )
{
pDDStream->Release();
pDDStream = NULL;
}
if( pPrimaryVidStream != NULL )
{
pPrimaryVidStream->Release();
pPrimaryVidStream = NULL;
}
if( pDDSPrimarySurface != NULL )
{
pDDSPrimarySurface->Release();
pDDSPrimarySurface = NULL;
}
if( pOffscreenSurface1 != NULL )
{
pOffscreenSurface1->Release();
pOffscreenSurface1 = NULL;
}
if( pDD != NULL )
{
pDD->Release();
pDD = NULL;
}
CoUninitialize();
AfxMessageBox("end");
}
The error message pops up after the AfxMessageBox("end");
I thought it is because I didn't release some objects, but shouldn't the code above takes care of that part?
Anyone has any idea or hints? Thanks a lot in advance.
|
|
|
|
|
What is quartz.dll ? I'm *sure* it's not a Direct Draw component ??
Christian
I've learned that you cannot make someone love you. All you can do is stalk them and hope they panic and give in.
The early bird may get the worm, but it's the second mouse that gets the cheese.
|
|
|
|
|
Quartz.dll is a DirectShow runtime.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
How can I copy files in a folder to a:\
What Windows api's, C++ functions are available?
Gerry.
|
|
|
|
|
Check these API functions:
CopyFile
SHFileOperation
Tomasz Sowinski
http://www.shooltz.com.pl
|
|
|
|
|
Hi,
We use several custom file formats for storing video data in various formats. I want to write a source filter that will allow me to read in the file and output yuv (for example). I have no problem reading in the data or changing the format. I do however need some help on how to write a source filter. Can anyone give me some pointers
Cheers,
Nick
|
|
|
|
|
hi all,
i need to make a start on this project which requires me to draw rectangels and circles in VC++. and i don't a have a CLUE where to start, and HOW to start! anybuddy there to help me out???
imran
help me today, and i'll help YOU out tomorrow...
|
|
|
|
|
CDC::Rectangle
CDC::Ellipse
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
If you're just drawing them ( i.e. they will not change ), you can do this in your OnPaint handler. Just use the methods already mentioned. If you want them to change/move, you will probably want to double buffer them, which means drawing them to another bitmap then copying it across just after creating the paintDC, to avoid flicker. To create a DC you do the following:
CDC dc;
dc.CreateCompatibleDC(NULL); // Creates a device context compatible with the screen
CBitmap bm, *pOldBitmap;
bm.Create(width, height, 1, GetDeviceCaps(dc.m_hDC, BITSPIXEL)); // Create a bitmap to draw onto
pOldBitmap = dc.SelectObject(&bm); // Whenever you select something into a DC, a pointer to the old one is released
// You *must* catch it and put it back in to avoid memory leaks
CPen pen, *pOldPen;
pen.Create(PS_SOLID, 1, RGB(255,0,0)); // Create a red pen, one pixel wide
pOldPen = dc.SelectObject(&pen);
// Now we can draw stuff using DrawREctangle, DrawEllipse, MoveTo, LineTo, etc. To draw filled shapes we need also create and select a brush to fill them. Then you create the paintDC, blt the CDC onto it, select the pointers you grabbed back into the DC and delete it ( using dc.DeleteDC(); )
I hope that helps.
Christian
I've learned that you cannot make someone love you. All you can do is stalk them and hope they panic and give in.
The early bird may get the worm, but it's the second mouse that gets the cheese.
|
|
|
|
|
|
Hello guys,
I'm new to MFC. I made hardware image grabber board and get the digitized image data from it. The one pixel data of it is organized as 4 byte(DUMMY(MSB) + R + G + B(LSB)).
I already made device driver and application code for this grabber board running on Windows 98 and it works fine. I used this routine for display image.
......
CClientDC dc(this);
CBitmap bitmap;
CDC dcMemory;
dcMemory.CreateCompatibleDC(&dc);
bitmap.CreateCompatibleBitmap(&dc, m_Width, m_Height);
memcpy(AppImageBuff, pDmaImage, m_Width*m_Height*m_BytesPerPixel);
bitmap.SetBitmapBits(m_Width*m_Height*m_BytesPerPixel,AppImageBuff);
dcMemory.SelectObject(bitmap);
dc.BitBlt(40, 60, m_Width, m_Height, &dcMemory, 0, 0, SRCCOPY);
...........
AppImageBuff contains image data, array of DWORD.
Now the problem is I have to do the same task in Windows CE where I can't use API function "SetBitmapBits()". How can I display image data without using SetBitmapBits?
Please help.
Morii
|
|
|
|
|
Wow - this sounds SO cool !!!
If you can create a DIBSection instead of a CBitmap, you'll get a pointer to the data which you can then feed your bytes into. There is a DIBSection wrapper by Chris on this site, it's probably a great place to get started. A DIBSection is device independent ( which you want anyway because you need to be able to make and show a 32 bit image regardless of screen depth ). I'm surprised the above worked, I thought you'd need BGRA, and you have it the other way around - did I miss something ?
Christian
I've learned that you cannot make someone love you. All you can do is stalk them and hope they panic and give in.
The early bird may get the worm, but it's the second mouse that gets the cheese.
|
|
|
|
|
If you look at your menu items in the Class Wizard, you have two options to add handlers for. The first is for when a menu item is chosen, the second is OnCommandUI, which handles the menu item. It takes a pointer to the menu item in question, and you can disable it, enable it, etc. there. It is called just before the item is shown, so it always tests the variables you are checking at just the right moment.
Christian
I've learned that you cannot make someone love you. All you can do is stalk them and hope they panic and give in.
The early bird may get the worm, but it's the second mouse that gets the cheese.
|
|
|
|
|
First of all, I am sorry for a stupid question.
I don't like MFC and always write projects without it (but I like Visual C++).
Mostly I work with interfaceless projects, some of which run under several platforms. The only thing I need now is to help to modify the old MFC project ASAP.
Also I am sorry that I have subscribed by the name of my friend (who seats on the machine I am working on now and who is really high-qualified specialist not only in interfaceless projects, but also in GUI). He has already came and helped me, but he didn't like this joke. He has his own login and password on this site and he never worked anonymously. I am sorry, Wassily! My real name is Vladimir
Vladimir
|
|
|
|
|
Well, I'm confused. In the first instance, I am right, unless your question was worded very poorly. Are you not using MFC then ? That's cool, but you should specify. I'm still not sure.
Secondly, do you still need help ? If so, please restate the question.
Christian
I've learned that you cannot make someone love you. All you can do is stalk them and hope they panic and give in.
The early bird may get the worm, but it's the second mouse that gets the cheese.
|
|
|
|
|
I'd like to monitor windows messages (of other application) in order to caught the text and to access to the buttons from my program. I think that I've to use "hooks" but I don't find good information and examples of them. Help me, please!!
Thanks in advance,
Luis.
|
|
|
|
|
Does anyone know how to convert between RTF and HTML?
I'm using VC6 with MFC.
Thanks in Advance.
Robby Diener (RDiener@gsd-software.com)
|
|
|
|
|
Is there a way to load an executable directly from disk into memory, an then tell to windows to execute them from some memory location?
thank you anyone
|
|
|
|
|
ummmm
ShellExecute() or CreateProcess() ...?
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Maybe I've not correctly post previous message.
I miss to tell you that the file have not exe extension or if hit is stored inside another big file like a package!
Thank you for the greatful phrase.
|
|
|
|
|
Hi All
I use WinNT4.0, VC6.0. My requirement is to retrieve all the eventlogged messages of a specific APplication by Name say SampleApplication..., but i see from MSDN that it's possible t o retrieve the evenloged messgaes by classifying System, APplication,.. or so & no t by a specific application name.
Is there any way???
Right now, my approach is retireve all teh application messages of the event log & filter it by searching for my application name which is time consuming & ugly too.
Any help would be very useful.
regards
Sankar
|
|
|
|
|
Please help me. I want to use a CSplitterWnd in a ActiveXControl. Is it possible. How can i do it?
Ricky
|
|
|
|
|
Does anyone know how to create a picture control dynamicly with extended_style property of transparent?
Thanks
|
|
|
|