15,896,522 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by J.Surjith Kumar (Top 125 by date)
J.Surjith Kumar
1-Mar-14 6:55am
View
Yes i checked the filters by installing in my system, the filter which works as i expected is not free. I got only the trial version. Do i get any free filters of it?
J.Surjith Kumar
6-Feb-14 10:37am
View
I want a transform filter to have 4 input pin to capture the feed from the 4 different source filters and have one output pin which i may use for render and file writer.
source1 -------->
source2 --------> Transformfilter ---->smart tee [prev] --------> renderer
source3 --------> [cap] --------> filewriter
source4 -------->
J.Surjith Kumar
30-Aug-13 3:45am
View
Ya got it thank you Griff
J.Surjith Kumar
29-Aug-13 8:45am
View
Can you give me an example of that [work around the limitations] I tried but i couldn't get it.
J.Surjith Kumar
29-Aug-13 7:42am
View
Thank you,
J.Surjith Kumar
29-Aug-13 7:41am
View
I gone through this link before i ask this question.
J.Surjith Kumar
29-Aug-13 7:40am
View
Have you heard about mp4box which is a command tool if you want to merge more than 100 videos at the same time this scenario will come, the path of the video is larger you can't change that.
J.Surjith Kumar
26-Aug-13 8:43am
View
The video was cutting at every 5th second even though i try to cut in the middle. For example if i give 3rd second as the starting position to cut the video its cutting the video from the 5th second like wise if i give 8th second as the starting position its cutting the video from the 10th second. I don't know why it is happening. can you help me!
J.Surjith Kumar
23-Aug-13 12:13pm
View
Thank you for your solution. I hope you have an experience with working in ffmpeg, can you tell me how to check out the time stamp frequency in the source video and how to increase the frequency of it. Do you have any direct command to execute this!?
J.Surjith Kumar
2-Jul-13 1:30am
View
How i can get the format of the video!?
J.Surjith Kumar
11-Jun-13 10:22am
View
I tried by creating the glass panel for each and every drawings dynamically but when i play the video, the shapes which i drawn over the glass panel was flickering.
J.Surjith Kumar
11-Jun-13 10:14am
View
Thanks for your valuable reply.. Can you give me any link or sample codes regarding this, it will be more useful for me to proceed further.
J.Surjith Kumar
19-Apr-13 4:40am
View
It won't work in the windowless mode right!?
J.Surjith Kumar
19-Apr-13 4:11am
View
Ya but am not getting the result. It's returning E_NoInterface.
J.Surjith Kumar
5-Apr-13 3:14am
View
This is not the good attitude to reply for the expert comments. They are asking you to elaborate what you exactly want. I think you need an edit box which has to look like an image am i right!?
J.Surjith Kumar
1-Apr-13 1:57am
View
Thank you Maxim :)
J.Surjith Kumar
26-Mar-13 10:59am
View
ya i got the source code. I'll go through that.
J.Surjith Kumar
26-Mar-13 7:28am
View
From where i can download the ffdshow source code.
J.Surjith Kumar
26-Mar-13 7:25am
View
FFDShow is the 3rd party filter.
J.Surjith Kumar
25-Mar-13 5:41am
View
Deleted
Can you brief the second point you mentioned in the solution.
J.Surjith Kumar
25-Mar-13 5:39am
View
For Video Mixing renderer there are interfaces which is consists of methods to configure the properties. But i don't know for this decoder.
J.Surjith Kumar
25-Mar-13 5:37am
View
Is there any specific interface for ffdshow video decoder!?
J.Surjith Kumar
25-Mar-13 5:29am
View
There is all about the description of the FFDShowVideoDecoder Configuration. Am not getting how to access it from the application.
J.Surjith Kumar
25-Mar-13 5:06am
View
This is that property image link "http://ffdshow-tryout.sourceforge.net/wiki/_detail/devel:remote_api.png?id=devel%3Acontrolling" in that i need to select and edit the crop field from my application itself.
J.Surjith Kumar
25-Mar-13 5:00am
View
I don't know whether any specific interface was there to configure the ffdshow filter properties.
J.Surjith Kumar
25-Mar-13 4:58am
View
I know the interface guid and am using FFDShowVideoDecoder filter in this i need to edit the crop field values.
J.Surjith Kumar
22-Mar-13 10:17am
View
Why you posted this as the solution???
J.Surjith Kumar
19-Mar-13 9:48am
View
Still waiting for the solution!!
J.Surjith Kumar
16-Mar-13 8:28am
View
MPEG4(AVC)
J.Surjith Kumar
16-Mar-13 8:20am
View
my 5.
J.Surjith Kumar
16-Mar-13 8:09am
View
Thank you for your comment, Still not getting what i want.
J.Surjith Kumar
16-Mar-13 8:04am
View
Thanks for your comment. Can you give me any reference!?
J.Surjith Kumar
16-Mar-13 8:00am
View
my 5.
J.Surjith Kumar
16-Mar-13 7:57am
View
my 5.
J.Surjith Kumar
16-Mar-13 7:44am
View
Are you using Directshow?
J.Surjith Kumar
16-Mar-13 7:43am
View
why are you posting the same question again and again?
J.Surjith Kumar
15-Mar-13 8:34am
View
Thank You Maxim I got the value:)
J.Surjith Kumar
15-Mar-13 8:31am
View
Deleted
Ya i got it what is the value for the UNITS?
J.Surjith Kumar
15-Mar-13 8:17am
View
Deleted
Where i need to call this method?
J.Surjith Kumar
15-Mar-13 4:30am
View
I am explicitly configure the VMR for the windowless mode so am not getting the Average time per frame. How to solve this?
J.Surjith Kumar
26-Feb-13 9:11am
View
using directshow?
J.Surjith Kumar
26-Feb-13 8:57am
View
How to achieve that by using directshow!?
J.Surjith Kumar
26-Feb-13 8:28am
View
Its all about bitmaps. How to play the video in a memory dc!?
J.Surjith Kumar
26-Feb-13 8:07am
View
Can you give me any reference regarding your solution.
J.Surjith Kumar
26-Feb-13 0:39am
View
Ya got it, I did a mistake now i changed it but rather than display the image which was loaded, it displays the screen shot. Dont know how it came.
J.Surjith Kumar
25-Feb-13 4:46am
View
That is IVMRMixerBitmap9 interface.
http://msdn.microsoft.com/en-us/library/windows/desktop/dd390451(v=vs.85).aspx
J.Surjith Kumar
25-Feb-13 0:09am
View
pMixerBmp->SetAlphaBitmap(&alphaBitmap);//Exception throws here
J.Surjith Kumar
2-Feb-13 8:33am
View
Explain in detail. Improve question is there to edit the question.
J.Surjith Kumar
2-Feb-13 8:31am
View
Try google..
J.Surjith Kumar
1-Feb-13 8:16am
View
Good Explanation my 5.
J.Surjith Kumar
30-Jan-13 0:37am
View
Why you'r posting the same thing again and again in different question name.
J.Surjith Kumar
29-Jan-13 5:13am
View
Be specific about what you want.
J.Surjith Kumar
29-Jan-13 5:12am
View
Don't expect anyone to read the entire code and create the test cases for your code. Be specific about what you want.
J.Surjith Kumar
29-Jan-13 4:56am
View
If you have any trouble with your code post here and tell where you'r getting trouble.
J.Surjith Kumar
28-Jan-13 4:10am
View
ya i know that, i just checked whether the video was played in the picture box or not.
J.Surjith Kumar
28-Jan-13 3:31am
View
Thanks for your solution it helps me to get the result.
J.Surjith Kumar
28-Jan-13 3:30am
View
Maxim Kartavenkov solution helped me to resolve from this. Very thankful to him :)
J.Surjith Kumar
28-Jan-13 2:38am
View
May i know where it went wrong??
J.Surjith Kumar
28-Jan-13 2:38am
View
Definition of InitwindowLessVMR:
HRESULT InitWindowlessVMR(
HWND hwndApp, // Window to hold the video.
IGraphBuilder* pGraph, // Pointer to the Filter Graph Manager.
IVMRWindowlessControl** ppWc // Receives a pointer to the VMR.
)
{
if (!pGraph || !ppWc)
{
return E_POINTER;
}
IBaseFilter* pVmr = NULL;
IVMRWindowlessControl* pWc = NULL;
// Create the VMR.
HRESULT hr = CoCreateInstance(CLSID_VideoMixingRenderer, NULL,
CLSCTX_INPROC, IID_IBaseFilter, (void**)&pVmr);
if (FAILED(hr))
{
return hr;
}
// Add the VMR to the filter graph.
hr = pGraph->AddFilter(pVmr, L"Video Mixing Renderer");
if (FAILED(hr))
{
pVmr->Release();
return hr;
}
// Set the rendering mode.
IVMRFilterConfig* pConfig;
hr = pVmr->QueryInterface(IID_IVMRFilterConfig, (void**)&pConfig);
if (SUCCEEDED(hr))
{
hr = pConfig->SetRenderingMode(VMRMode_Windowless);
pConfig->Release();
}
if (SUCCEEDED(hr))
{
// Set the window.
hr = pVmr->QueryInterface(IID_IVMRWindowlessControl, (void**)&pWc);
if( SUCCEEDED(hr))
{
hr = pWc->SetVideoClippingWindow(hwndApp);
if (SUCCEEDED(hr))
{
*ppWc = pWc; // Return this as an AddRef'd pointer.
}
else
{
// An error occurred, so release the interface.
pWc->Release();
}
}
}
pVmr->Release();
return hr;
}
J.Surjith Kumar
28-Jan-13 2:36am
View
It works when i tested in new mfc application but not in c#.
J.Surjith Kumar
28-Jan-13 2:05am
View
Before the video was played in the separate window which is the windowed mode now am trying to play the video in the window less mode. So that i added the IVMRWindowlessControl interface to write the video in the picture box. hr = InitWindowlessVMR(hwnd, pGraph, &pWc); is used to initialize the vmr. GetClientRect(hwnd,&rcDest); rcDest is consists of the picture box rectangle coordinates. I am clear with the code but am asking whether this idea will work or not!? If not what i have to do!?
J.Surjith Kumar
28-Jan-13 1:56am
View
I pasted the code from my program.
J.Surjith Kumar
28-Jan-13 1:28am
View
That dll having this c++ function:
#include "RenderVideoFile.h"
void RenderFile(WCHAR *strFilename,HWND hwnd)
{
.
.
.
.
}
Calling that function from c#:
[DllImport("C:\\RenderVideoFile.dll",CharSet=CharSet.Unicode)]
public static extern void RenderFile(string strFilename,IntPtr hwnd);
.
.
.
RenderFile("C:\\123.avi",pictureBox1.Handle);
J.Surjith Kumar
28-Jan-13 1:26am
View
But the video was not played in the picture box i have passed the picture box handle as the parameter but it doesn't work. What i have to do
J.Surjith Kumar
25-Jan-13 0:53am
View
Deleted
Put the above comment in the solution it will be helpful for others.
J.Surjith Kumar
25-Jan-13 0:51am
View
Ya now it's playing.. Thank you Maxim..
J.Surjith Kumar
24-Jan-13 10:21am
View
I tried this. But getting the same "Error-could not initialize the com library".
J.Surjith Kumar
24-Jan-13 8:38am
View
And am doing it in windows application not in web.
J.Surjith Kumar
24-Jan-13 8:35am
View
I am asking to play the video using c# by accessing the function from dll.
J.Surjith Kumar
24-Jan-13 8:29am
View
Put the dll inside the c# file and give that location in the dllimport and execute it.
J.Surjith Kumar
24-Jan-13 8:19am
View
Is that possible to play the video like this?
J.Surjith Kumar
24-Jan-13 6:59am
View
I executed this program it shows that "Error-could not initialize the com library". I dont know why the CoInitialize() was failed.
J.Surjith Kumar
24-Jan-13 5:18am
View
Ok i posted that in new question.
J.Surjith Kumar
24-Jan-13 1:15am
View
Can you tell me reason for the 2nd question!!
J.Surjith Kumar
24-Jan-13 1:14am
View
Deleted
I got the solution for the question 1 by that link which is given in the solutions. can any one tell me the solution for the question 2.
J.Surjith Kumar
21-Jan-13 7:10am
View
The link of the articles which is in the solution helped me to get more knowledge regarding my question and it helped me to got the result.
J.Surjith Kumar
21-Jan-13 7:07am
View
Got it.. Thankyou
J.Surjith Kumar
21-Jan-13 7:07am
View
This article helps me a lot.. Thankyou
J.Surjith Kumar
21-Jan-13 7:07am
View
This article helps me a lot.. Thankyou
J.Surjith Kumar
18-Jan-13 7:42am
View
Deleted
Ok what i have to do
J.Surjith Kumar
18-Jan-13 7:29am
View
Deleted
Ok i understood what i have to do.
J.Surjith Kumar
18-Jan-13 7:28am
View
I have to create the dll using c++ which consists of many classes and their functions. How to use that classes and function in c#.
J.Surjith Kumar
18-Jan-13 7:21am
View
By that code i created lib and dll files. I can access that class in mfc application.
J.Surjith Kumar
8-Jan-13 7:31am
View
Am doing it in MFC.
J.Surjith Kumar
7-Jan-13 7:00am
View
Thanks for the valuable information.
J.Surjith Kumar
7-Jan-13 6:28am
View
Thank You. Got the result
J.Surjith Kumar
2-Jan-13 6:02am
View
The code which is above is the right code. I found out small mistake in my code and now it works as i expected.
J.Surjith Kumar
11-Dec-12 5:46am
View
Thanks Richard Its working :)
J.Surjith Kumar
11-Dec-12 5:13am
View
now im trying to save only the CArray object ptAr but it shows the same kind of error.
J.Surjith Kumar
11-Dec-12 5:05am
View
ok can you give me some example.
J.Surjith Kumar
11-Dec-12 4:48am
View
i included this header
J.Surjith Kumar
11-Dec-12 4:34am
View
help me out to resolve from these errors.
J.Surjith Kumar
11-Dec-12 3:27am
View
I got the result by using CArray.
here is my code..
CArray<cpoint,cpoint> ptAr;
ptAr.Add(CPoint(0,0));
ptAr.Add(CPoint(10,10));
CPoint *pCp = (CPoint*)ptAr.GetData();
pDC->Polyline( pCp, ptAr.GetSize() );
I got this working to draw the lines dynamically.
but in the serialization im getting an error.
void CserializationTest3Doc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
// TODO: add storing code here
ar<<pCp<<ptAr;
}
else
{
// TODO: add loading code here
ar>>pCp>>ptAr;
}
}
error C2678: binary '<<' : no operator found which takes a left-hand operand of type 'CArchive' (or there is no acceptable conversio)
error C2679: binary '>>' : no operator found which takes a right-hand operand of type 'CPoint *' (or there is no acceptable conversion)
warning C4800: 'CPoint *' : forcing value to bool 'true' or 'false' (performance warning)
J.Surjith Kumar
11-Dec-12 2:08am
View
atlast it shows the only error C2248: 'CObject::CObject' : cannot access private member declared in class 'CObject'
J.Surjith Kumar
11-Dec-12 1:57am
View
ok now it shows only list is undeclared.
J.Surjith Kumar
11-Dec-12 1:55am
View
ok finally it shows only list as undeclared
J.Surjith Kumar
11-Dec-12 0:28am
View
It shows an error as undeclared it,iteration,list and vector.
J.Surjith Kumar
10-Dec-12 9:52am
View
I need to know how to collectively store the points and draw the lines using moveto and lineto functions. For every OnLButtonDown and OnLButtonUp one line have to be drawn. Finally collections of lines will be drawn how to store all the lines and how to use serialize concept according to that.
J.Surjith Kumar
10-Dec-12 6:15am
View
How the serialize function knows that the object ar is for storing or loading. Can u explain how it works internally in the doc/view architecture without creating the CFile object and CArchive object.
J.Surjith Kumar
10-Dec-12 5:29am
View
If i give Invalidate(FALSE) in the OnLButtonUp function. Multiple lines can be drawn but when i resize the window the lines which is drawn last is only shown.
J.Surjith Kumar
10-Dec-12 5:16am
View
Have u given any example code anywhere regarding this issues.
J.Surjith Kumar
10-Dec-12 5:12am
View
There is no error but the value of that variable was not retrieved when i open the file.
J.Surjith Kumar
10-Dec-12 5:10am
View
Im using that variables in the view class..
void CserializationTestView::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
l[0]=point.x;
l[1]=point.y;
flag=1;
CView::OnLButtonDown(nFlags, point);
}
void CserializationTestView::OnLButtonUp(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CClientDC dc(this);
PtLine=CPoint(point.x,point.y);
/*if(flag==1)
{
dc.MoveTo(l[0],l[1]);
dc.LineTo(PtLine);
}*/
Invalidate();
CView::OnLButtonUp(nFlags, point);
}
void CserializationTestView::OnDraw(CDC* pDC)
{
CserializationTestDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
pDC->MoveTo(l[0],l[1]);
pDC->LineTo(PtLine);
// TODO: add draw code for native data here
}
J.Surjith Kumar
10-Dec-12 3:20am
View
I used Invalidate() in the OnLButtonUp() function which invalidates the entire client area for every time it has been called. So that i cant draw multiple lines for that i need a solution.
J.Surjith Kumar
10-Dec-12 3:11am
View
will u give me some practical example.
J.Surjith Kumar
7-Dec-12 0:00am
View
When i click the '+' its showing (65 L'A').
J.Surjith Kumar
6-Dec-12 23:54pm
View
In that it showing m_hWnd unused. error:expression cannot be evaluated.
J.Surjith Kumar
6-Dec-12 9:49am
View
Thank you Jochen Arndt for responding from the beginning. Im doing all corrections what ur telling in my program but am still getting that "Debug assertion failed".
J.Surjith Kumar
6-Dec-12 8:18am
View
This is my OnMove() function code:
void CTickCounterDlg::OnMove(int x, int y)
{
CDialog::OnMove(x, y);
// TODO: Add your message handler code here
CRect dialogRect;
GetWindowRect(&dialogRect);
wchar_t *a=new wchar_t[50];
wsprintf(a,L"After move: x = %d, y = %d, width = %d, height = %d",
dialogRect.left, dialogRect.top, dialogRect.Width(), dialogRect.Height());
m_PointSize.SetWindowTextW(a);
}
I pressed the retry button.
Its pointing to the winocc.cpp
void CWnd::SetWindowText(LPCTSTR lpszString)
{
ENSURE(this);
ENSURE(::IsWindow(m_hWnd) || (m_pCtrlSite != NULL));
if (m_pCtrlSite == NULL)
::SetWindowText(m_hWnd, lpszString);
else
m_pCtrlSite->SetWindowText(lpszString);
}
How to find out the solution for that problem.
J.Surjith Kumar
6-Dec-12 7:02am
View
The application runs well when i press the ignore button at that "Debug assertion failed" dialog box.
J.Surjith Kumar
6-Dec-12 6:49am
View
Im using static control(Label). I changed the member variable from CString to CStatic.
J.Surjith Kumar
6-Dec-12 6:40am
View
I clearly understood, everything was fine but im getting "Debug assertion failed" when im executing it.
J.Surjith Kumar
6-Dec-12 6:01am
View
And i should not use the UpdateData(FALSE) because it will refresh all other controls at the same time. For this case what should i do.
J.Surjith Kumar
6-Dec-12 5:59am
View
If i use UpdateData(FALSE) at the end of the statement it shows debug assertion failed.
J.Surjith Kumar
6-Dec-12 5:58am
View
Ok i got it. The only problem is that the value is not updating in the controls what im using to display in the dialog box.
J.Surjith Kumar
6-Dec-12 5:33am
View
my dialog box is at the center but it showing x and y position as 0. And the value is not updated.
J.Surjith Kumar
5-Dec-12 9:43am
View
ThankYou BadJerry its working :)
J.Surjith Kumar
5-Dec-12 8:43am
View
If i add UpdateData(TRUE) at the beginning of OnTimer the message box will popup automatically even the start button was not pressed.
J.Surjith Kumar
5-Dec-12 8:33am
View
I have to enter the value at the run time. To make only that text control not to refresh what i have to do.
J.Surjith Kumar
3-Dec-12 0:18am
View
no its not working dude..
J.Surjith Kumar
3-Dec-12 0:13am
View
UpdateData(); is same as UpdateData(TRUE);
J.Surjith Kumar
3-Dec-12 0:09am
View
By default UpdateData() is TRUE.
J.Surjith Kumar
3-Nov-12 7:41am
View
Bro i almost created but i need to know that how to pass the content from one rectangle to another.. I tried to this level.. Here is my code.. tell me where i should improve that will be useful for me to proceed further..
code:
#include <windows.h>
//#define MAXPOINTS 1000
LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
static TCHAR szAppName[] = TEXT ("Checker1") ;
HWND hwnd ;
MSG msg ;
WNDCLASS wndclass ;
wndclass.style = CS_HREDRAW | CS_VREDRAW ;
wndclass.lpfnWndProc = WndProc ;
wndclass.cbClsExtra = 0 ;
wndclass.cbWndExtra = 0 ;
wndclass.hInstance = hInstance ;
wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION) ;
wndclass.hCursor = LoadCursor (NULL, IDC_ARROW) ;
wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;
wndclass.lpszMenuName = NULL ;
wndclass.lpszClassName = szAppName ;
if (!RegisterClass (&wndclass))
{
MessageBox (NULL, TEXT ("Program requires Windows NT!"),
szAppName, MB_ICONERROR) ;
return 0 ;
}
hwnd = CreateWindow (szAppName, TEXT ("Checker1 Mouse Hit-Test Demo"),
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
NULL, NULL, hInstance, NULL) ;
ShowWindow (hwnd, iCmdShow) ;
UpdateWindow (hwnd) ;
while (GetMessage (&msg, NULL, 0, 0))
{
TranslateMessage (&msg) ;
DispatchMessage (&msg) ;
}
return msg.wParam ;
}
LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
static int cxBlock, cyBlock ;
static POINT pt ;
static int iCount ;
HDC hdc ;
int x, y, i, j ;
PAINTSTRUCT ps ;
RECT rect ;
int *SrcRect,*DestRect ;
switch (message)
{
case WM_SIZE :
cxBlock = LOWORD (lParam) ;
cyBlock = HIWORD (lParam) ;
return 0 ;
case WM_LBUTTONDOWN:
iCount = 0 ;
rect.left = 0 ;
rect.top = 0 ;
rect.right =cxBlock ;
rect.bottom =cyBlock ;
InvalidateRect (hwnd, &rect, TRUE) ;
return 0 ;
case WM_MOUSEMOVE:
if (wParam & MK_LBUTTON)
{
pt.x = LOWORD (lParam) ;
pt.y = HIWORD (lParam) ;
hdc = GetDC (hwnd) ;
SetPixel (hdc, LOWORD (lParam), HIWORD (lParam), 0) ;
ReleaseDC (hwnd, hdc) ;
}
return 0 ;
case WM_LBUTTONUP:
CopyRect (&DestRect, &SrcRect) ;
InvalidateRect (hwnd, NULL, TRUE) ;
return 0 ;
case WM_PAINT :
hdc = BeginPaint (hwnd, &ps) ;
SrcRect=Rectangle (hdc, 0, 0, cxBlock, cyBlock) ;
SetCursor (LoadCursor (NULL, IDC_WAIT)) ;
ShowCursor (TRUE) ;
MoveToEx (hdc, pt.x, pt.y, NULL) ;
LineTo (hdc, pt.x, pt.y) ;
ShowCursor (TRUE) ;
SetCursor (LoadCursor (NULL, IDC_ARROW)) ;
DestRect=Rectangle(hdc,0,0,200,200);
EndPaint (hwnd, &ps) ;
return 0 ;
case WM_DESTROY :
PostQuitMessage (0) ;
return 0 ;
}
return DefWindowProc (hwnd, message, wParam, lParam) ;
}
J.Surjith Kumar
19-Oct-12 10:33am
View
Thankyou!:) If the me class has member data and functions then how to do it!?
J.Surjith Kumar
19-Oct-12 9:58am
View
I got this question in the interview and they told that there is a technique to solve this.
Show More