Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++
|
Visual C++ Questions specific to Microsoft's Visual C++. For questions not specific to this Microsoft version, use the C++ Programming forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 10th, 2005, 11:57 PM
ck ck is offline
Authorized User
 
Join Date: Dec 2004
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to clear image,pls help...thx...

hi, do any1 know how to clear image from the window frame?? means i display my image in the rectangle...so when i click clear button, the image will be clear, so the rectangle/window will be empty. below is my window frame code:

cvvNamedWindow( "Original Image", 0);
HWND hWnd = (HWND)cvGetWindowHandle("Original Image");
HWND hParent = ::GetParent(hWnd);
::SetParent(hWnd,GetDlgItem(IDC_1)->m_hWnd);
::ShowWindow(hParent,SW_HIDE);

cvvNamedWindow( "Image Processing", 0);
HWND hWnd2 = (HWND)cvGetWindowHandle("Image Processing");
HWND hParent2 = ::GetParent(hWnd2);
::SetParent(hWnd2,GetDlgItem(IDC_2)->m_hWnd);
::ShowWindow(hParent2,SW_HIDE);

code above is for my image display on tat...my display image code is:
cvvShowImage("Image Processing", img);

coz i using OpenCV...now i wanna clear/empty my frame...how to do it?? thanks a lot....hear from u soon & afap....

best regards,

ck.
__________________
ck.
 
Old March 14th, 2005, 09:04 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Ankur_Verma Send a message via MSN to Ankur_Verma
Default

you can invalidate the window to get it repainted. Use the function InvalidateRect.

Regards
Ankur Verma
 
Old March 15th, 2005, 05:30 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Ankur_Verma Send a message via MSN to Ankur_Verma
Default

Just wanna ask you, have you tried cvReleaseImage.

Regards
Ankur Verma





Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I extract text from a GIF image? Pls help! superjas Excel VBA 2 March 7th, 2018 11:16 PM
Clear the Clipboard vb certified VB.NET 0 July 11th, 2006 07:31 PM
how to use 'Enter' button to trigger a button, thx raybristol ASP.NET 1.0 and 1.1 Basics 1 December 16th, 2005 06:56 AM
do not clear dataset kasper General .NET 1 October 27th, 2004 05:41 AM
Datatable/DataView --> DataAdapter - ThX ! ank2go ADO.NET 4 April 28th, 2004 09:32 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.