SHCameraCapture development RRS feed

  • Question

  • I am trying to develop a custom camera control, to use in my application.  I access the camera with the SHCameraCapture api, however, this seems to give access to other functions within this dialog that I don't want the potential user to have access to, for example, changing the image resolution, saving the image to a location and sending via an SMS etc.

    What I am after is a way to lock out all the other stuff that the camera api has, so that all the user can do is have access to 3 buttons, 'take picture', 'cancel' & 'ok'. How do I do this please, I have scoured the internet and all I can find is that there maybe a possibility to do it by having a C++ library using DirectShow within my C# application, which is most undesirable.
    Monday, March 30, 2009 1:46 PM


  • Hi CraigW1,

    As far as I know, we can't implement it via SHCameraCapture API. As a workaround, we can use directshow to capture video or image via camera, which can embed capture dialog view to dialog. ICaptureGraphBuilder:RenderStream, set first parameter to PIN_CATEGORY_PREVIEW. Like the code:

    m_pCaptureGraphBuilder->RenderStream(&PIN_CATEGORY_PREVIEW, &MEDIATYPE_Video, m_pVideoCaptureFilter, NULL, NULL);

     There is a sample in sdk:

    D:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Samples\CPP\Win32\Cameracapture 

    Also find a real time preview sample:



    Best regards,
    Guang-Ming Bian - MSFT

    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Wednesday, April 1, 2009 3:21 AM