tlauren (1) [Avatar] Offline
#1
Hi,

Please help!! I don't know how to display a text inside the OnUserMsg procedure.
My sample test codes belows don't work. It built, and ran without error, but it displays nothing:

LRESULT MyMidiOut::OnUserMsg(WPARAM wParam, LPARAM lParam)
{
// process the user message as needed
// (here, test only, display a string)

CDC* pDC;

pDC = GetDC();
pDC->TextOut(10, 10, "1234567890", 10);
ReleaseDC(pDC);

return 0;
}

Thanks
Tim
Freq (22) [Avatar] Offline
#2
Re: How to display text when the
Well looking at your code quickly you aren't providing the GetDC function with a window handle so it probably doesn't know where to draw. If you're just looking to output something when the function is called, use OutputDebugString("1234567890"); and check the debug output instead. This is probably the wrong list to post a question of that kind though. It has nothing to do with Midi. There are plenty of other resources online that can help you with basic win32 programming.

a.