|
Create it as a DIBSECTION and you'll get access to the buffer by default. Chris has written a cool DIBSECTION wrapper here on CP.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
I need to write a screen capture utility that runs as fast as possible. Because I'm dealing with notebook computers with relatively slow graphics hardware, I'd like to capture just the portion of the screen that has changed since the last time I did a capture (blt'ing the whole screen takes too long). Does anyone know how I can accumulate all the update regions on the screen that occur between successive screen captures? Thanks!
|
|
|
|
|
Most likely you will have to resort to a virtual video driver the same way that netmeeting does. There is a function called GetBoundsRect that will accumulate changes to a DC, but I have not been able to get it to work with a WindowsDC only memory DCs. So if you can get that to work more poer to you (and I would also like to know what you did to get it to work).
Besides that I have done quite a bit of work to capture the screen and the fastest that I could get my utility was about 800ms on a 1000Mhz machine. The bottleneck is sending the data from the video card memory to system memory.
Once again, look at how netmeeting accomplishes this, they incorporate a virtual video driver so all new screen updates are written to their buffer as well as the screen buffer.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
You might want to have a look at the VNC source code. It's somewhere at AT&T research IIRC, but Google is your friend.
|
|
|
|
|
|
Try wrapping your string in a _bstr_t by including comutils.h. It converts between wide and narrow strings internally.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
is this correct usage?:
_bstr_t test;
test = szCompletePath;
szCompletePath is a null terminated string (char szCompletePath[MAX_PATH]) and then pass test in a function that takes an LPOLESTR parameter?
thanks
|
|
|
|
|
That's fine, but
_bstr_t test(szCompletePath);
is better, because it is more efficient
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
But when i pass the test variable in the IShellFolder::ParseDisplayName function, it returns the error code -2147024809 which, accoring to the Error Lookup means "The parameter is incorrect.". Any ideas?
|
|
|
|
|
Dunno - it looks like it should be OK to me.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
Try casting again the string to const WCHAR* (or const wchar_t*)
when calling ParseDisplayName , since that function need an OLE String.
Good luck!
One good thing about getting older, you don't lose the ages you've been!
|
|
|
|
|
Does anybody know of any articles describing the basics behind drawing lines between nodes. It would be a simple, general CAD tool which could be expanded to make programs for drawing flowcharts, electric circuitry diagrams, etc.
Haakon S.
|
|
|
|
|
are you talking about path-finding techniques to find the shortest path without crossing over your other components in your diagram?
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Yes, that is one essential feature.
Haakon S.
|
|
|
|
|
I found a book called game programming gems that contains a whole set of AI to find those paths.
You may be able to find something on the internet or one of the game programming sites that has a code sample that will do this for you.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Is there a way to get the same effect as TRACE in debug mode but in release mode. I have a program that can trap the messages, I just need to know how to send those messages. It seems that AfxTrace and AtlTrace both disapear in release build.
Thanks,
Clint
|
|
|
|
|
clintsinger wrote:
AfxTrace and AtlTrace both disapear in release build
This is by design. Use OutputDebugString()
John
|
|
|
|
|
|
|
I have a custom control but it doesn't get any mouse messages. I had the same problem with a static control and someone told me to check Notify and that fixed it.
Cathy
Life's uncertain, have dessert first!
|
|
|
|
|
Have you subclassed a static control to make your custom control? If so, then the following code (I copied it out of MSDN) may help:
DWORD dwStyle = ::SetWindowLong(m_hWnd, GWL_STYLE);
if (!(dwStyle & SS_NOTIFY)) {
::SetWindowLong(m_hWnd, GWL_STYLE, dwStyle | SS_NOTIFY);
}
"The laws of nature, the laws of man
This volatile paradox will never stand"
-Plasticity, Front Line Assembly
|
|
|
|
|
The SS_NOFIFY is a static control style. This one is just derived from CWnd. Any other ideas?
Cathy
Life's uncertain, have dessert first!
|
|
|
|
|
If you use spy++ on your control window does it receive mouse messages?
"The laws of nature, the laws of man
This volatile paradox will never stand"
-Plasticity, Front Line Assembly
|
|
|
|
|
no
Cathy
Life's uncertain, have dessert first!
|
|
|
|
|
UINT CClass::OnNcHitTest(CPoint point)
{
return HTCLIENT;
//return CClass::OnNcHitTest(point);
}
i used this in a CStatic subclass, now u can just keep a look out for those mouse messages
hope this works.
|
|
|
|