Click here to Skip to main content
15,921,793 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionOnIdle() not getting focus Pin
rp_suman18-Jul-07 22:05
rp_suman18-Jul-07 22:05 
AnswerRe: OnIdle() not getting focus Pin
Mark Salsbery19-Jul-07 5:21
Mark Salsbery19-Jul-07 5:21 
GeneralRe: OnIdle() not getting focus Pin
rp_suman19-Jul-07 14:40
rp_suman19-Jul-07 14:40 
GeneralRe: OnIdle() not getting focus Pin
Mark Salsbery19-Jul-07 14:56
Mark Salsbery19-Jul-07 14:56 
GeneralRe: OnIdle() not getting focus [modified] Pin
rp_suman19-Jul-07 17:46
rp_suman19-Jul-07 17:46 
GeneralRe: OnIdle() not getting focus Pin
Mark Salsbery19-Jul-07 20:14
Mark Salsbery19-Jul-07 20:14 
GeneralRe: OnIdle() not getting focus [modified] Pin
rp_suman19-Jul-07 20:57
rp_suman19-Jul-07 20:57 
GeneralRe: OnIdle() not getting focus Pin
Mark Salsbery20-Jul-07 5:05
Mark Salsbery20-Jul-07 5:05 
This shouldn't have anything to do with idle processing.

It doesn't make sense that you are missing a message between OnInitDialog and the displaying of
the dialog since you would have needed a valid HWND to get the message in the first place.

What window handle are you passing when you call midiInOpen()?
When are you calling midiInOpen()?

You may get better performance if you use a callback function instead of window messages.

If you choose to use window messages, you should be able to get them just like any other
window message - for example:
// Add to the dialog's .h file:
  
afx_msg LRESULT OnMIMLongData(WPARAM wp, LPARAM lp);
 
 
// Add to the dialog's .cpp file:
 
// Add to the dialog's message map
ON_MESSAGE(MM_MIM_LONGDATA, &CMyDlg::OnMIMLongData)
 
LRESULT CMyDlg::OnMIMLongData(WPARAM wParam, LPARAM lParam)
{
   HMIDIIN MIDIDeviceHandle = (HMIDIIN)wParam;
   MIDIHDR *pMIDIHdr = (MIDIHDR *)lParam;
 ...
   return 0;
}

Mark


Mark Salsbery
Microsoft MVP - Visual C++


"Remember the five Ds of dogeball: Dodge, Dip, Duck, Dive, and Dodge."
"If you can dodge a wrench, you can dodge a ball."

GeneralRe: OnIdle() not getting focus Pin
rp_suman22-Jul-07 19:09
rp_suman22-Jul-07 19:09 
GeneralRe: OnIdle() not getting focus Pin
Mark Salsbery23-Jul-07 5:08
Mark Salsbery23-Jul-07 5:08 
GeneralRe: OnIdle() not getting focus Pin
rp_suman26-Jul-07 18:44
rp_suman26-Jul-07 18:44 
GeneralRe: OnIdle() not getting focus Pin
rp_suman19-Jul-07 22:46
rp_suman19-Jul-07 22:46 
GeneralRe: OnIdle() not getting focus Pin
Mark Salsbery20-Jul-07 5:08
Mark Salsbery20-Jul-07 5:08 
GeneralRe: OnIdle() not getting focus Pin
rp_suman22-Jul-07 18:48
rp_suman22-Jul-07 18:48 
QuestionChecking a valid pointer Pin
Electronic7518-Jul-07 21:37
Electronic7518-Jul-07 21:37 
AnswerRe: Checking a valid pointer Pin
James R. Twine19-Jul-07 1:01
James R. Twine19-Jul-07 1:01 
QuestionRe: Checking a valid pointer Pin
David Crow19-Jul-07 2:53
David Crow19-Jul-07 2:53 
AnswerRe: Checking a valid pointer Pin
Mike Dimmick19-Jul-07 3:04
Mike Dimmick19-Jul-07 3:04 
AnswerRe: Checking a valid pointer Pin
DevMentor.org19-Jul-07 11:22
DevMentor.org19-Jul-07 11:22 
QuestionUsing ADODC.. Pin
indray2j18-Jul-07 21:32
indray2j18-Jul-07 21:32 
AnswerRe: Using ADODC.. Pin
Karismatic19-Jul-07 0:42
Karismatic19-Jul-07 0:42 
Questionhelp me in removing these warnings Pin
neha.agarwal2718-Jul-07 21:31
neha.agarwal2718-Jul-07 21:31 
AnswerRe: help me in removing these warnings Pin
CPallini18-Jul-07 21:51
mveCPallini18-Jul-07 21:51 
GeneralRe: help me in removing these warnings Pin
rp_suman18-Jul-07 21:59
rp_suman18-Jul-07 21:59 
GeneralRe: help me in removing these warnings Pin
CPallini18-Jul-07 22:10
mveCPallini18-Jul-07 22:10 

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.