hi gurus, how to detect the sound input and show this like messenger voice chat? Thanks. Ivan Cachicatari Blog[^] www.latindevelopers.com -- modified at 10:48 Thursday 13th July, 2006
Ivan Cachicatari
Posts
-
Sound detection [modified] -
CListCtrl subitem problemHi, I have a problem with the subitem character size. When I insert a subitem (or item) with more of 255 character size, this control only show the first 255 characters. How to insert a subitem with more of 255 character length? Ivan Cachicatari Blog[^] www.latindevelopers.com
-
Savin a bitmap, butHi, I want to save a bitmap in a file. My funcion is the following code, but this save the a inverted bitmap.
BOOL CDXCaptureDlg::SaveBMP(BYTE *Buffer, int width, int height, long paddedsize, char *bmpfile) { // declare bmp structures BITMAPFILEHEADER bmfh; BITMAPINFOHEADER info; // andinitialize them to zero memset ( &bmfh, 0, sizeof (BITMAPFILEHEADER ) ); memset ( &info, 0, sizeof (BITMAPINFOHEADER ) ); // fill the fileheader with data bmfh.bfType = 0x4d42; // 0x4d42 = 'BM' bmfh.bfReserved1 = 0; bmfh.bfReserved2 = 0; bmfh.bfSize = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + paddedsize; bmfh.bfOffBits = 0x36; // number of bytes to start of bitmap bits // fill the infoheader info.biSize = sizeof(BITMAPINFOHEADER); info.biWidth = width; info.biHeight = height; info.biPlanes = 1; // we only have one bitplane info.biBitCount = 24; // RGB mode is 24 bits info.biCompression = BI_RGB; info.biSizeImage = 0; // can be 0 for 24 bit images info.biXPelsPerMeter = 0x0ec4; // paint and PSP use this values info.biYPelsPerMeter = 0x0ec4; info.biClrUsed = 0; // we are in RGB mode and have no palette info.biClrImportant = 0; // all colors are important // now we open the file to write to HANDLE file = CreateFile ( bmpfile , GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL ); if ( file == NULL ) { CloseHandle ( file ); return FALSE; } // write file header unsigned long bwritten; if ( WriteFile ( file, &bmfh, sizeof ( BITMAPFILEHEADER ), &bwritten, NULL ) == FALSE ) { CloseHandle ( file ); return FALSE; } // write infoheader if ( WriteFile ( file, &info, sizeof ( BITMAPINFOHEADER ), &bwritten, NULL ) == FALSE ) { CloseHandle ( file ); return FALSE; } // write image data if ( WriteFile ( file, Buffer, paddedsize, &bwritten, NULL ) == FALSE ) { CloseHandle ( file ); return FALSE; } // and close file CloseHandle ( file ); return TRUE; }
Ivan Cachicatari Blog[^] www.latindevelopers.com -
ConversionThanks! Works fine. Ivan Cachicatari Blog[^] www.latindevelopers.com
-
Conversioncan you show write any code? Ivan Cachicatari Blog[^] www.latindevelopers.com
-
ConversionHow to convert unsigned char * to char *. Thanks. Ivan Cachicatari Blog[^] www.latindevelopers.com
-
CTreeCtrlThanks! Works fine. Ivan Cachicatari Blog[^] www.latindevelopers.com
-
CTreeCtrlHi guys, How can I change the Font for an individual item of a CTreeCtrl? Thanks in advance. Ivan Cachicatari Blog[^] www.latindevelopers.com
-
System InactivityThanks. :) Ivan Cachicatari Blog[^] www.latindevelopers.com
-
System InactivityHi, How to detect system inactivity? Ivan Cachicatari Blog[^] www.latindevelopers.com
-
Printing centimetersHello, How to convert pixels to centimeters using the printer DC? How to save and load the page settings? Ivan Cachicatari Blog[^] www.latindevelopers.com
-
PrintingHi, How to customize the page size before printing. Thanks. Ivan Cachicatari Blog[^] www.latindevelopers.com
-
How to get current directory path in mfc??Try with this code:
CFile file; if(file.Open(".",CFile::modeRead)) { MessageBox(file.GetFilePath()); }
Ivan Cachicatari Blog[^] www.latindevelopers.com
-
Compilation errorThe declaration is:
template <typename TAccessor, typename TRowset=CRowset> class CSypODLRecordBase : public CSypODLError { ... // error C3200: 'int' : invalid template argument for template // parameter 'TRowset', expected a class template : CAccessorRowset<TAccessor, TRowset> *m_pSet; ... }; // error C3203: 'CRowset' : class template invalid as template // argument for template parameter 'TRowset', expected a real type : class CSypODLCommand : public CSypODLRecordBase<CDynamicParameterAccessorEx> { .... };
My code;CSypODLConnection *tmpConn = NULL; try { USES_CONVERSION; tmpConn = new CSypODLConnection(); tmpConn->OpenFromInitializationString(T2OLE(path)); m_Conn = tmpConn; } catch(CSypODLException& e) { if(tmpConn != NULL) { if(tmpConn->IsOpen()) tmpConn->Close(); delete tmpConn; } e.DisplayError(); return false; }
-
Compilation errorHi, I'm using the Express OLE DB Library[^], I have problem when try to build an application in Visual C++ .NET 2003: SypODLCommand.h(27): error C3203: 'CRowset' : class template invalid as template argument for template parameter 'TRowset', expected a real type SypODLCommand.h(27): error C3203: 'CRowset' : class template invalid as template argument for template parameter 'TRowset', expected a real type SypODLRecordBase.h(53): error C3200: 'int' : invalid template argument for template parameter 'TRowset', expected a class template SypODLRecordBase.h(53): error C3200: 'int' : invalid template argument for template parameter 'TRowset', expected a class template SypODLRecordBase.h(53): error C3200: 'int' : invalid template argument for template parameter 'TRowset', expected a class template SypODLRecordBase.h(53): error C3200: 'int' : invalid template argument for template parameter 'TRowset', expected a class template SypODLRecordset.h(25): error C3203: 'CRowset' : class template invalid as template argument for template parameter 'TRowset', expected a real type SypODLRecordset.h(25): error C3203: 'CRowset' : class template invalid as template argument for template parameter 'TRowset', expected a real type How to fix this errors? Ivan Cachicatari Blog[^] www.latindevelopers.com
-
Hiding CMenu itemsHi, How to hide/show items of CMenu in runtime? Thanks in advance. Ivan Cachicatari Blog[^] www.latindevelopers.com
-
Memory for my applicationHi again, How to get the allocate (or used) memory for current application ? Thanks in advance. Ivan Cachicatari Blog[^] www.latindevelopers.com
-
CListCtrl problemHi, How to align the first column of the CListCtrl (report mode) to right. Thanks in advance. Ivan Cachicatari Blog[^] www.latindevelopers.com
-
MFC CMonthCalCtrl problemHi, I'm working with Visual C++ 6.0 SP6 on Win98 and WinXP. I have a problem with MFC CMonthCalCtrl. When I try get the current system tyme with GetCurSel this returns other date. For example: The CMonthCalCtrl is 2005 May 30 as current selected. But GetCurSel returns 2006 Jun 28. Why? This problem is similar in both operative sistems. some suggestion to solving this? Ivan Cachicatari Blog[^] www.latindevelopers.com
-
Exit an applicationTry with this code. PostMessage(WM_COMMAND,ID_APP_EXIT); Ivan Cachicatari Blog[^] www.latindevelopers.com