I am trying to Overlap an image (bitmap, jpg, whatever) onto a live video stream. The idea is that a user is supposed to line up the camera with known lines to make future calculations eaiser. What the intent is that the user will see a transparent (ghost) image of what the camera SHOULD be pointing at and line up the camera to match this ghost image. I find this idea better than simply displaying this image on the side. An overlay would be ideal. Has anyone done something like this or have any clue how I would do this? Would I need Direct X? VFW? Thank you in advance!
tlerner
Posts
-
Overlap Live Video -
Character Counter in MFCYea, it seems that the parent window doesn't get the KEYUP message with me either and that was the problem I was having. I solved this problem by adding a message handler to the IDC_EDIT for EN_CHANGE messages. That worked great. I dont understand how or why it works with a rich edit, but who knows...and at this point who cares. Its done! Thanks for the help.
-
Character Counter in MFCYea, I know the "concept" behind what I need to do, I just cant find any specifics. TEXT_CHANGED is nice, but again, the real name alludes me. I simply cannot find it and I am getting a little frustrated. :((
-
Array of VariablesmyDB.data[0][0][0]
is a void* so if you say*myDB.data[0][0][0]
you should get an illegal indirection. Try(int*)myDB.data[0][0][0]
in your format. Could be wrong. -
Edit Version Info Properties TabI just implemented this...try this... This belongs in your Init for your Help or About Dlg. edit: the tabs didnt come out to well, but you can adjust!
CString szAllRights = _T( "All Rights Reserved." ); CString szAppVersion; CString szComments; CString szCopyright; CString szCopyrightWarning; CString szCompanyName; CString szAppName = _T( "AppName.exe" ); DWORD dwVerInfoSize; // Size of version information block DWORD dwVerHnd = 0; // An 'ignored' parameter, always '0' dwVerInfoSize = GetFileVersionInfoSize( (WCHAR*)(const WCHAR*)szAppName, &dwVerHnd ); if ( dwVerInfoSize ) { HANDLE hMem; if ( ( hMem = GlobalAlloc( GMEM_MOVEABLE, dwVerInfoSize ) ) != NULL ) { LPSTR lpstrVffInfo; lpstrVffInfo = (char *)GlobalLock( hMem ); if ( GetFileVersionInfo( (WCHAR*)(const WCHAR*)szAppName, dwVerHnd, dwVerInfoSize, lpstrVffInfo ) ) { LPWSTR lpVerInfo; // String pointer to version information text UINT lpVerInfoLen; // Version information text string length. // File Version if ( VerQueryValue( (LPVOID)lpstrVffInfo, TEXT( "\\StringFileInfo\\040904B0\\FileVersion" ), (LPVOID*)&lpVerInfo, &lpVerInfoLen ) ) { szAppVersion = _T( "Version "); szAppVersion += lpVerInfo; SendMessage( GetDlgItem( IDC_VER ), WM_SETTEXT, NULL, (LPARAM)szAppVersion.GetBuffer(MAX_PATH) ); } else SendMessage( GetDlgItem( IDC_VER ), WM_SETTEXT, NULL, (LPARAM)_T("") ); } } GlobalUnlock( hMem ); GlobalFree( hMem );
You need a IDC_VER in your dialog that you want to display that information into. You can also get the strings from other parts of the versioning by using the following:// Copyright VerQueryValue( (LPVOID)lpstrVffInfo, TEXT( "\\StringFileInfo\\040904B0\\LegalCopyright" ), (LPVOID*)&lpVerInfo, &lpVerInfoLen ) VerQueryValue( (LPVOID)lpstrVffInfo, TEXT( "\\StringFileInfo\\040904B0\\CompanyName" ), (LPVOID*)&lpVerInfo, &lpVerInfoLen )
Hope this helps -
Character Counter in MFCIf anyone can help me with a character counter, I would be very appreciative. I have a Rich Text Edit box in an MFC app. I would like to limit the number of characters a user enters by having a "Characters Left" count box below my edit box indicating how many additional characters the user has left. This counter chould be dynamic enough so users would actually see the number decrement by one for each character typed, and if they deleted a 5 letter word, it should go up by 5. In addition, when the counter is 0, the edit box should not allow any more input. This should be similar to the java script done on many HTMLs. Anyone ever done this before in C++ MFC? Can anyone provide me with a suggestion on where to begin? Thank you!!!