Click here to Skip to main content
15,919,132 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to copy the bitmap data to clipboard? Pin
Hamid_RT11-Jan-07 18:29
Hamid_RT11-Jan-07 18:29 
GeneralRe: how to copy the bitmap data to clipboard? Pin
Rockone12-Jan-07 2:20
Rockone12-Jan-07 2:20 
GeneralRe: how to copy the bitmap data to clipboard? Pin
Hamid_RT12-Jan-07 3:03
Hamid_RT12-Jan-07 3:03 
Questionneed help in window media SDK Pin
amitmistry_petlad 10-Jan-07 17:59
amitmistry_petlad 10-Jan-07 17:59 
AnswerRe: need help in window media SDK [modified] Pin
Mark Salsbery10-Jan-07 19:11
Mark Salsbery10-Jan-07 19:11 
GeneralRe: need help in window media SDK Pin
amitmistry_petlad 10-Jan-07 20:00
amitmistry_petlad 10-Jan-07 20:00 
GeneralRe: need help in window media SDK Pin
Mark Salsbery10-Jan-07 20:12
Mark Salsbery10-Jan-07 20:12 
GeneralRe: need help in window media SDK Pin
amitmistry_petlad 10-Jan-07 20:37
amitmistry_petlad 10-Jan-07 20:37 
well actully in the doc i have read the following.

Calling this method removes any previously set header attribute information.

Changes to the profile object made after this method is called do not take effect until SetProfile is called again.

so i think might be used previosly set. is it neccessary to set ? becasuse before it. it works fine then i have little change in the GUI and now its not worked.
i have setprofile in the createwrite function which call from compress function
Please check the function(Compress) with the previos code which call from their.
you might forget the link.


<br />
<br />
HRESULT Encoder::CreateWriter( const WCHAR * pwszOutputFile, IWMProfile * pProfile )<br />
{<br />
	Log log;<br />
	HRESULT hr = S_OK;<br />
    <br />
	// Create a writer<br />
    hr = WMCreateWriter( NULL, &m_pWriter );<br />
    if( FAILED( hr ) )<br />
    {<br />
		log.LogEntry("Encoder::CreateWriter() - Unable to create the writer object.");<br />
        return( hr );<br />
    }<br />
    // Get the IWMHeaderInfo interface of the writer<br />
    hr = m_pWriter->QueryInterface( IID_IWMHeaderInfo, (void **)&m_pWriterHeaderInfo );<br />
    if( FAILED( hr ) )<br />
    {<br />
		log.LogEntry("Encoder::CreateWriter() - Unable to get the pointer of IWMHeaderInfo interface.");<br />
        return( hr );<br />
    }<br />
<br />
    // Set the profile of the writer<br />
    hr = m_pWriter->SetProfile( pProfile );<br />
    if( FAILED( hr ) )<br />
    {<br />
		log.LogEntry("Encoder::CreateWriter() - Unable to set the profile for the writer.");<br />
        return( hr );<br />
    }<br />
<br />
	//Protect File:<br />
	/*WORD wStreamNum = 0;<br />
	ProtectFile(m_pWriter, wStreamNum);*/<br />
    <br />
	// Set the output file of the writer<br />
    hr = m_pWriter->SetOutputFilename( pwszOutputFile );<br />
    if( FAILED( hr ) )<br />
    {<br />
		log.LogEntry("Encoder::CreateWriter() - Unable to set the output file name.");<br />
        return( hr );<br />
    }<br />
    return( hr );<br />
}<br />


//here is the function below

<br />
<br />
<br />
HRESULT Encoder::Compress(WCHAR *pwszInputFile,WCHAR * pwszOutputFile,<br />
                                    IWMProfile * pProifle,<br />
                                    BOOL fMultiPass,<br />
                                    BOOL fMultiChannel,<br />
                                    BOOL fSmartRecompression,string Host,string UserID,string InitPackageRequest,string ScriptFile,INTERNET_PORT Port, HWND hwndParent, WCHAR *w_KeyID )<br />
{<br />
	Log log;<br />
	HRESULT hr = S_OK;<br />
<br />
    //<br />
    // Initialize the pointers<br />
    //<br />
    m_hEvent = NULL;<br />
    m_pReader = NULL;<br />
    m_pReaderAdvanced = NULL;<br />
    m_pReaderHeaderInfo = NULL;<br />
    m_pReaderProfile = NULL;<br />
    m_pWriter = NULL;<br />
    m_pWriterPreprocess = NULL;<br />
    m_pWriterHeaderInfo = NULL;<br />
    m_pdwPreprocessPass = NULL;<br />
    m_pdwOutputToInput = NULL;<br />
    m_pdwOutputToStream = NULL;<br />
<br />
    if( NULL == pwszInputFile || NULL == pwszOutputFile || NULL == pProifle )<br />
    {<br />
        return E_INVALIDARG;<br />
    }<br />
	do<br />
	{<br />
		m_hEvent = CreateEvent( NULL, FALSE, FALSE, NULL );<br />
		if( NULL == m_hEvent )<br />
        {<br />
            hr = HRESULT_FROM_WIN32( GetLastError() );<br />
            log.LogEntry("Encoder::Compress() - Create Event failed");<br />
            break;<br />
        }<br />
		hr = CreateReader( pwszInputFile );<br />
        if( FAILED( hr ) )<br />
        {<br />
            log.LogEntry("Encoder::Compress() - Could not create the reader for the file.");<br />
            break;<br />
        }<br />
		hr = CreateWriter( pwszOutputFile, pProifle );<br />
        if( FAILED( hr ) )<br />
        {<br />
            log.LogEntry("Encoder::Compress() - Could not create the writer for the file.");<br />
            break;<br />
        }<br />
<br />


then how shoud i set my profile can u help me ?
and send me the link please.
GeneralRe: need help in window media SDK Pin
Mark Salsbery10-Jan-07 20:14
Mark Salsbery10-Jan-07 20:14 
GeneralRe: need help in window media SDK [modified] Pin
amitmistry_petlad 10-Jan-07 22:05
amitmistry_petlad 10-Jan-07 22:05 
GeneralRe: need help in window media SDK Pin
Mark Salsbery11-Jan-07 4:47
Mark Salsbery11-Jan-07 4:47 
GeneralRe: need help in window media SDK Pin
amitmistry_petlad 11-Jan-07 22:45
amitmistry_petlad 11-Jan-07 22:45 
GeneralRe: need help in window media SDK Pin
amitmistry_petlad 12-Jan-07 16:55
amitmistry_petlad 12-Jan-07 16:55 
GeneralRe: need help in window media SDK Pin
Mark Salsbery12-Jan-07 6:10
Mark Salsbery12-Jan-07 6:10 
GeneralRe: need help in window media SDK [modified] Pin
amitmistry_petlad 12-Jan-07 17:05
amitmistry_petlad 12-Jan-07 17:05 
QuestionRe: need help in window media SDK Pin
Mark Salsbery13-Jan-07 7:07
Mark Salsbery13-Jan-07 7:07 
AnswerRe: need help in window media SDK Pin
amitmistry_petlad 15-Jan-07 18:33
amitmistry_petlad 15-Jan-07 18:33 
AnswerRe: need help in window media SDK Pin
amitmistry_petlad 15-Jan-07 22:02
amitmistry_petlad 15-Jan-07 22:02 
GeneralRe: need help in window media SDK Pin
Mark Salsbery16-Jan-07 7:03
Mark Salsbery16-Jan-07 7:03 
GeneralRe: need help in window media SDK Pin
amitmistry_petlad 16-Jan-07 16:38
amitmistry_petlad 16-Jan-07 16:38 
QuestionMoving my C++ / MFC project from VS 2003 to VS 2005 Pin
AlexEvans10-Jan-07 17:22
AlexEvans10-Jan-07 17:22 
Questioni need some opinion on displaying fonts in dialog box. Pin
cyn810-Jan-07 16:27
cyn810-Jan-07 16:27 
AnswerRe: i need some opinion on displaying fonts in dialog box. Pin
Rajesh R Subramanian10-Jan-07 19:19
professionalRajesh R Subramanian10-Jan-07 19:19 
GeneralRe: i need some opinion on displaying fonts in dialog box. Pin
James R. Twine11-Jan-07 13:43
James R. Twine11-Jan-07 13:43 
QuestionRe: i need some opinion on displaying fonts in dialog box. Pin
Rajesh R Subramanian11-Jan-07 20:04
professionalRajesh R Subramanian11-Jan-07 20:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.