IVideoWindow.SetWindowPosition not working
-
hi all i am using directshow lib to capture web cam in my application all is gud capture image is ok but the webcam video screen not display properly i pass icture control handle of form to diaply webcam on my form
Rectangle rc = hControl.ClientRectangle;
ivw.SetWindowPosition(rc.X, rc.Y, rc.Width , rc.Height);
please help me for this. thank
-
hi all i am using directshow lib to capture web cam in my application all is gud capture image is ok but the webcam video screen not display properly i pass icture control handle of form to diaply webcam on my form
Rectangle rc = hControl.ClientRectangle;
ivw.SetWindowPosition(rc.X, rc.Y, rc.Width , rc.Height);
please help me for this. thank
We can't tell - we have no access to the rest of your code, or any idea what is actually happening because we just can't see your screen! But at a guess, it's because you are expecting the coordinates of the ClientRectangle to be directly usable in a different control, and that may not be the case - it'll depend on a huge number of factors including whatever the IVideoWindows interface is doing with the data when you call it's SetWindowPosition method. Chances are that's in absolute terms (so desktop coordinate based) while the ClientRectange returns a position based on the control container. Use the debugger to see exactly what you are getting, and compare that with the actual position your video is being shown at. Sorry, but we can't do any of that for you!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!