Click here to Skip to main content
15,901,284 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Can anybody tell me the way of getting this answer Pin
David Crow16-Jan-08 2:50
David Crow16-Jan-08 2:50 
GeneralDialog in Dll Pin
narayanagvs15-Jan-08 18:41
narayanagvs15-Jan-08 18:41 
GeneralRe: Dialog in Dll Pin
_AnsHUMAN_ 15-Jan-08 18:56
_AnsHUMAN_ 15-Jan-08 18:56 
Generalproblem with IHTMLDocument2::write() Pin
Shino C G15-Jan-08 17:32
Shino C G15-Jan-08 17:32 
QuestionMFC VC6 SDI Containing RichEdit50W? Pin
Kyudos15-Jan-08 11:49
Kyudos15-Jan-08 11:49 
AnswerRe: MFC VC6 SDI Containing RichEdit50W? Pin
Kyudos15-Jan-08 13:08
Kyudos15-Jan-08 13:08 
GeneralHelp in MFC Application-SDI Pin
Eyungwah15-Jan-08 10:27
Eyungwah15-Jan-08 10:27 
GeneralRe: Help in MFC Application-SDI Pin
Iain Clarke, Warrior Programmer15-Jan-08 21:55
Iain Clarke, Warrior Programmer15-Jan-08 21:55 
Your question can be broken into a few parts.

Using class wizard, add menu handlers to your CMyDocument casll for (eg) IDM_REGISTER and IDM_WRITEREGISTER. In those handlers, do whatever the hardware thing you want to do is, and store the value that you'll want to display in eg CString m_MyValueToReport.

To then get your CMyView to update and display the new string, just call UpdateAllViews in your menu handler.

Then, in CMyView::OnDraw, just display the new string

void CMyView::OnDraw (CDC *pDC)
{
    CMyDoc *pDoc = GetDocument ();
    ASSERT(pDoc);

    ....

    pDC->TextOut (x,y, pDoc->m_MyValueToReport);

    ....
}


Going back to the hardware stage, the header file doesn't look like there's any call saying "tell me what was recently written", so you're going to have to keep track of the value you write to the register. Beyond that, the help file / documentation that comes with the USB device/SDK should be of more help than us.

Good luck,

Iain.
GeneralWindoze beep is driving me crazy - please help me! Pin
Vaclav_15-Jan-08 8:25
Vaclav_15-Jan-08 8:25 
GeneralRe: Windoze beep is driving me crazy - please help me! Pin
Mark Salsbery15-Jan-08 8:27
Mark Salsbery15-Jan-08 8:27 
GeneralRe: Windoze beep is driving me crazy - please help me! Pin
Vaclav_15-Jan-08 8:33
Vaclav_15-Jan-08 8:33 
JokeRe: Windoze beep is driving me crazy - please help me! Pin
Iain Clarke, Warrior Programmer16-Jan-08 0:14
Iain Clarke, Warrior Programmer16-Jan-08 0:14 
General[Partially solved] Windoze beep is driving me crazy - please help me! Pin
Vaclav_16-Jan-08 9:03
Vaclav_16-Jan-08 9:03 
GeneralPaint on non client area of a window Pin
Miss_F15-Jan-08 6:05
Miss_F15-Jan-08 6:05 
GeneralRe: Paint on non client area of a window Pin
Mark Salsbery15-Jan-08 6:26
Mark Salsbery15-Jan-08 6:26 
GeneralRe: Paint on non client area of a window Pin
Miss_F15-Jan-08 6:40
Miss_F15-Jan-08 6:40 
GeneralRe: Paint on non client area of a window Pin
Mark Salsbery15-Jan-08 6:54
Mark Salsbery15-Jan-08 6:54 
GeneralRe: Paint on non client area of a window Pin
led mike15-Jan-08 8:06
led mike15-Jan-08 8:06 
GeneralRe: Paint on non client area of a window Pin
Mark Salsbery15-Jan-08 8:25
Mark Salsbery15-Jan-08 8:25 
GeneralRe: Paint on non client area of a window Pin
led mike15-Jan-08 8:51
led mike15-Jan-08 8:51 
GeneralRe: Paint on non client area of a window Pin
Miss_F15-Jan-08 8:34
Miss_F15-Jan-08 8:34 
GeneralRe: Paint on non client area of a window Pin
Maximilien15-Jan-08 9:45
Maximilien15-Jan-08 9:45 
GeneralHack two awesome window management apps together? Mouse/Window movement stuff inside Pin
Dee Olutayo15-Jan-08 5:27
Dee Olutayo15-Jan-08 5:27 
Questionprogrammer Pin
razi_Seyyedi15-Jan-08 5:11
razi_Seyyedi15-Jan-08 5:11 
GeneralRe: programmer Pin
toxcct15-Jan-08 5:28
toxcct15-Jan-08 5:28 

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.