|
Does anyone have any suggestion, tips, or code snippets on how to do a AutoScroll(automatically scrolling the scroll bar to capture entire client area content) Screen Capture on Client Area Window? Thank you very much.
|
|
|
|
|
Hi there,
I am able to capture pop-up menu using this code.
HWND hPopupMenu = FindWindow("#32768",NULL);
if (hPopupMenu && IsWindowVisible(hPopupMenu))
GetWindowRect(hPopupMenu, &rcMenu);
This doesn't work for Microsoft Office Products and Windows Explore 'cause their menus are not standard menu. For instance, Microsoft Word. I am trying this. I used Spy++ to find out the class name and window caption for the menu bar. I tried FindWindow("MsoCommandBar", "Menu Bar") on Microsoft Word. It doesn't work at all. Could someone give me some pointers how to capture pop-up windows from Microsoft Office Products and Windows Explorer. Thank you very much. Will EnumChildWindows or EnumThreadWindows API functions help for this case? If so, could you gimme some tips. Thank you again.
|
|
|
|
|
whose class name should be "MsoCommandBarPopup"
|
|
|
|
|
Can anyone tell me why the MIDL compiler expands boolean and wchar_t
types to char and short in type libraries instead of unsigned char and
unsigned short as they are declared?
|
|
|
|
|
In an application I'm working on I just got a messagebox with the following:
<br />
The exception Breakpoint<br />
A breakpoint has been reached<br />
(0x80000003) occured in the application at location...<br />
"The exception Breakpoint"???
I have never seen that one before, anyone knows what that is?
Behind that messagebox, another one pops up saying:
Debug Assertion Failed in dbgheap.c
Expression: -pFirstBlock == pOldBlock
Well, the last one I can understand, but again, anyone out there that knows woth the first one meens?
The funny thing is that when it's running under the debugger it never happens, but when I run the debug version, this happens.
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
The code asserted; that exception was caused by an int 3 . That also explains why it only happens in the debug build.
--Mike--
http://home.inreach.com/mdunn/
Sometimes, arming yourself with a big pointy stake just won't do you any good.
|
|
|
|
|
It also happens in the release version.
But why don't it happend under the debugger. I have also tried with Purify NT, and it finds nothing...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
hmm, well there's still an int 3 in there somewhere that's getting hit. VC must be handling the exception itself - watch the Debug window and see if it shows any first-chance exceptions.
You can make VC break when it gets that exception. Start the app under the debugger, click Debug->Exceptions. Add a new handler - Number=800000003, Name=Breakpoint, Action=Stop Always
--Mike--
http://home.inreach.com/mdunn/
Sometimes, arming yourself with a big pointy stake just won't do you any good.
|
|
|
|
|
Thanks Mike, I'll try that.
This one have really bugged me for a couple of days now
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I just found the bug. It was a really stupid one
I'm using several threads, but was linking to the singlethreaded lib's...
Anyway, thanks for your help
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Anders
Are linking the debug build with any release libraries? Possibly a third party lib for which you only have the release version?
|
|
|
|
|
nope, right now the app. only uses windows.h, winsock2.h and tchar.h
It's still in the very erly start of my project, it's only 1.800 lines code right now...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Hello, the codeguru around the world.
I don't think that the debugger is the powerful tool to check the error
of the heap memory allocation in VC++.
You had better check the code if you use the heap allocation function
like alloc by the right library or on the version of Windows OS.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
That's why I also tried running it under Purify NT, but it finds nothing...
- Anders
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Hello !
I have a problem with compiling my ADO connection as release
build
I will get this message as follows (in release build):
error LNK2001: unresolved external symbol "public: void __thiscall CDbAdoDoc::GenerateError(long,unsigned short *)" (?GenerateError@CDbAdoDoc@@QAEXJPAG@Z)
DbAdoView.obj : error LNK2001: unresolved external symbol "public: class CCustomRs * __thiscall CDbAdoDoc::GetRecSet(void)" (?GetRecSet@CDbAdoDoc@@QAEPAVCCustomRs@@XZ)
Release/DbAdo.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
DbAdo.exe - 3 error(s), 6 warning(s).
It seems that its only possible to compile with the debug library.
There is no problem running the program in debug-build.
The header-file only is used in the post class.
I have tryed various settings with the compiler switches
without any positive result.
I created this project in Visual Studio C++ 6.0 enterprise.
The database is access.
The same result with MYSQL and ORACLE.
Is there anybody with an solution
Thankyou in advance
Thomas
|
|
|
|
|
How can I add a new table to an existing Daodatabase?
Thanks.
Richard
|
|
|
|
|
Try to use "createNewTableDef"
function:
BOOL createNewTableDef(CDaoDatabase * pDatabase, CDaoTableDef **ppTableDef,CString strTableName)
{
if (pDatabase == NULL)
return FALSE;
// construct tabledef
*ppTableDef = new CDaoTableDef(pDatabase);
// failed to allocate so exit
if ((*ppTableDef) == NULL)
return FALSE;
// no duplication, so create the tabledef if possible
TRY
{
(*ppTableDef)->Create(strTableName);
}
CATCH (CDaoException, e)
{
// construct a meaningful message
CString strMessage = _T("Couldn't create tabledef--Exception: ");
strMessage += e->m_pErrorInfo->m_strDescription;
AfxMessageBox(strMessage);
// indicate failure
bCreateFailed = TRUE;
// delete the tabledef on failure
if (*ppTableDef != NULL)
{
delete *ppTableDef;
*ppTableDef = NULL;
}
}
AND_CATCH (CMemoryException, e)
{
// output status
AfxMessageBox(_T("Failed to create tabledef--Memory exception thrown."));
// indicate failure
bCreateFailed = TRUE;
// delete the tabledef on failure
if (*ppTableDef != NULL)
{
delete *ppTableDef;
*ppTableDef = NULL;
}
}
END_CATCH
// return TRUE if creation succeeds
return (!bCreateFailed);
}
|
|
|
|
|
What's the difference between Interface and dispInterface?
|
|
|
|
|
A dispatch interface is used mainly so late binding languages can discover and use your objects methods.
|
|
|
|
|
Also for event handling.
Bret Faller
Odyssey Computing, Inc.
|
|
|
|
|
Hi all!
I have a bunch of problems that fall under the general category of video streaming, and since this technology is rapidly advancing I'm hoping that other people are dealing with this too.
I have:
Analog camera -> osprey card -> Real Producer
I would like:
Analog camera -> osprey card -> my little program -> Real Producer
I'm afraid it might not be in the cards, but I've only done VFW stuff so maybe it can be done using DirectShow?
One problem is that I need to monitor the video stream (locally) but since the encoder is connected to the capture device I'm working around the problem by constantly peeking at the DC of the display window ( ) Is there a better way?
Another problem is that I need a _live_ display (to get a reasonably tight feedback loop, as in video conferencing) but the >10 second delay that makes the Real stream so smooth and low bitrate makes the latency too high. Again, I'm working around this by capturing the DC of the Real Producer display, shrinking it, compressing it to a jpeg, then sending it over the net to a receiving program. Very inefficient, but the point is to get improved latency which it does. But it still makes me gag.
By the way, the receiving program I'm using is a windows exe, but I'd like it to display on the web instead (users won't download stuff). I assume that the way to do this would be using java or an ATL control - neither of which I know now, but if this is the way to do it then I will learn. Any suggestions?
To vent another video complaint, my stinky little Real Producer voyeur program saves recent frames in a circular buffer and makes a video file from it upon request. However, it's a pain to use the driver's 'compression dialog' to set the compression parameters manually. I'm working around it by saving the result of the compression structure in a file. As an aside, is it possible to change the video format and source in a more programmatically flexible way than clicking on a radio button in the driver's dialog box? I think I remember DirectShow being able to do this though.
What's the legal status of the divx codec? Personal use? In-house use? Commercial use?
Another video question - There are lots of codecs for transforming (a bunch of raw frames) -> (a video file) but I'm looking for a way to replace sending a 'stream' of jpeg frames (generated on the fly) over the network. Any pointers?
Also I just noticed that versions of windows more recent than 95 have built-in JPEG support! My question is how compatible is this with other programs that read jpegs? Does the pointer to the bits contain a real jpeg, or do you have to do some header shuffling in order to get a bona fide jpeg from it? Any pointers? I'm sure looking forward to not having to deal with the IJG library.
Finally, I'm looking to replace the (analog video camera -> osprey card) with a digital video camera. Does anyone have any suggestions?
Much thanks to anyone who takes the time to reply!
|
|
|
|
|
I'm starting to develop some applications and considering 3rd party controls. I am use to developing in-house applications that use the default controls that come with Visual Studio Enterprise.
I have noticed this though, that most activeX controls advertised, are advertised heavily for Visual Basic. I thought all ActiveX controls where to work in all ActiveX compliment development enviornments? Also, I have downloaded some sample Active X controls and they really don't work in Visual C++. I tried adding it to a VC project, and got the COM wrapper class that C++ develops, and it would through a ton of erros. Thinking it was just how I used them I contacted the support company for one, and they emailed me a wrapper class for the ActiveX control?!?! Isn't it suppose to work in VC? This one expierence has left me exploring my options of using 3rd party controls for awhile.
For all of you expierenced in using 3rd party controls, is this common? Why doesn't all ActiveX controls work seamlessly between enviornemnts? Also, if anyone has links and suggestions for good GUI controls for VC please post them here, as I'm looking to build my library.
I already have Marbry, Sheridan(Infragistics), Component One, and Programmer's Paradise, any other companies and your personal recommendation would be greatly appreciated.
Sam C
----
Systems Manager
Hospitality Marketing Associates
|
|
|
|
|
I need to create an ActiveX digital clock that would switch to an analog face when clicked. A sample code would be very helpful...
Thanks!
Bok III
|
|
|
|
|
I want to start and run another program(.exe file) from my Visual c++ project by just click the menu item. what should I do,if there is any command like system(".....")to easily achieve that?
looking forward to your help!
jason
|
|
|
|
|
The easiest way is ShellExecute();
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|