Article View: borland.public.cppbuilder.nativeapi
Article #2321Multi-Thread HDC and video display
From: Robert G. Hoover
Date: Mon, 12 Mar 2007 19:40
Date: Mon, 12 Mar 2007 19:40
36 lines
2443 bytes
2443 bytes
Hi Jon, Sorry this had morphed into a video app discussion.... I commented out the Display() routine and there is no noticeable lag. :) But, now how do I display my video without using SendDIBitsToDevice(ShellForm->Handle)? I use GetDC to get the DC of the window instead of using ShellForm->Canvas->Handle. Can I get the handle to the window in such a way that gets around the TApplication like this? This Display() function is just for quick splashing of video, meant to be as fast as possible. That's why I'm calling low-level Win32 API call SendDIBitsToDevice instead of using something like ShellForm->Canvas->Draw(0, 0, MyTBitmap). Should I be doing this instead? Many thanks, Rob Jonathan Benedicto wrote: > Robert G. Hoover wrote: >> Display() uses... >> >> HDC hDC = GetDC(hWindow); >> >> hWindow is passed in as ShellForm->Handle which I assume is the handle >> to the >> window? (ShellForm is my main window, built from TCustomForm by BDS) > > Try commenting out the call to Display() and see if that cures the mouse > lag. If it does, then it is highly likely that there is a sync issue in > Display() causing the video to hiccup. > > > Jon
Technical Details
Message-ID:
<45f5aca4@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45f57403@newsgroups.borland.com> <45f59433$1@newsgroups.borland.com> <45f5973e$1@newsgroups.borland.com> <45f598bf$1@newsgroups.borland.com> <45f59c41$1@newsgroups.borland.com> <45f59e8e$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,411b13b57e2ea81a X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Mon, 12 Mar 2007 15:40:57 -0400 From: "Robert G. Hoover" <not.a.real.address@anywhere.sorry> User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Multi-Thread HDC and video display References: <45f57403@newsgroups.borland.com> <45f59433$1@newsgroups.borland.com> <45f5973e$1@newsgroups.borland.com> <45f598bf$1@newsgroups.borland.com> <45f59c41$1@newsgroups.borland.com> <45f59e8e$1@newsgroups.borland.com> In-Reply-To: <45f59e8e$1@newsgroups.borland.com> X-Enigmail-Version: 0.94.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 000723-1, 03/12/2007), Outbound message X-Antivirus-Status: Not-Tested NNTP-Posting-Host: 68.48.157.44 Message-ID: <45f5aca4@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1173728420 68.48.157.44 (12 Mar 2007 12:40:20 -0800) Lines: 36 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail