Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CTwain : With ActiveX control. It does not working ! . Help me please.

CTwain : With ActiveX control. It does not working ! . Help me please.

Scheduled Pinned Locked Moved C / C++ / MFC
comhelpc++designquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anand for every one
    wrote on last edited by
    #1

    see this link first : http://www.codeproject.com/audio/twaintest.asp I used CTwain from there. I included CTwain with my ActiveX control. When i call selectSource it worked. When i call Acquire , the source's user interface is displayed. But the following condition in ProcessMessage(MSG msg) is not become true when clicking on Close(Cancel or Exit) , Ok (or Scan). if(GetRC() != TWRC_NOTDSEVENT) { AfxMessageBox(_T("In TWRC_NOTDSEVENT in ProcessMessage" )); // it not executed always TranslateMessage(twEvent); } Thus TranslateMessage is not called. I subclassed my control class from CTwain. and in OnCreate i included the following line. InitTwain(m_hWnd); if(!IsValidDriver()) { AfxMessageBox("Unable to load Twain Driver."); } and in PreTranslateMessage (BOOL CImgAnnCtrl::PreTranslateMessage(MSG* pMsg)) i included the following line. ProcessMessage(*pMsg); Plese help me. What is the problem. I followed the same procedure in a stand alone(exe (mfc)) application it worked well.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups