|
Hello,
I have added a Microsoft Data Grid Control to my app. By default it only displays 2 columns. Does anyone know how do I display more than 2 columns?
Thanks,
Rob
|
|
|
|
|
Hi all,
I made a isapi extension to be a chat.
There in it a infinity do-while which do a select in my sql database and send the result to the screen. But I have a problem. When the user close his browser, the isapi holds send select's to the server. Then the cpu usage raises up and the server crashes. So, I need to check in the each loop, if the browser it's open. If not, then I break the loop. Somebody can help me?
-=)Yuki(=-
|
|
|
|
|
You can get a handle to the CWnd of the browser, then check through that if the Window is visible, or valid. I'm not sure if ::IsWindowVisible will work, because I'm not sure if the handle could be recycled to a new window in the meantime, I guess it depends on how often you check, as well as obvious some internal Windows stuff I have only vague ideas about.
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 am using the CFileDialog class and would like the user to only be able to open and save from certain folders.
I can stop the user from changing folders with some help from Shanker Chandrabose report on Customizing the Windows Common File Open Dialog.
|
|
|
|
|
Hello, the codegurus around the world.;) (Copy Right 2001 Masaaki Onishi)
Your question seems to be interesting.
1) We make something for this if we derive our own CMyFileDialog from CFileDialog.
I used to take a look at some sample code of Wrox book, but I don't have this book now.
Or
2) As Paul DiLascia often tell us, write our own code.
We can use FindFistFile like Window Explorer sample code to find the directroy or file,
,we can write some code to filter the name, and show only the dirctory which you want.
Or someone else has a good idea?
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
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
|
|
|
|
|