Click here to Skip to main content
15,911,711 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
1)Earlier we are using- a CMIDI Class with an object,
C++
CMidiKeyboard m_Keys;


that object is passed as control to the DDX ,linking with IDC_EDIT1,
C++
DDX_Control(pDX, IDC_EDIT1, m_Keys);


the object is used to initialize the CMIDIKeyboard ,
C++
m_Keys.Initialize(CMIDIKeyboard::LOW_NOTE, CMIDIKeyboard::HIGH_NOTE); 


which is used to draw Keyboard on edit box .


2)For Multitouch- we created CEditPiano which has an object,
C++
CEDitPiano m_Keys1;

which is also linked with another sample edit box through DDX control,
C++
DDX_Control(pDX, IDC_EDIT4, m_Keys1);


which is used to register touch window,
C++
M_Keys1.RegisterTouchWindow();


after detecting WM_TOUCH message, Multitouch is detected on touch, in CEditPaino.cpp Class and Multitouch is printed.

ISSUE-the Object used for Multitouch is initiased Like
C++
CEDitPiano m_Keys1;

and Object for drawing piano is initiased like
C++
CMidiKeyboard m_Keys;


so,to include PianoKeys inside a multitouch EditBox we need to Initialse
C++
m_Keys1.Initialize(CMIDIKeyboard::LOW_NOTE, CMIDIKeyboard::HIGH_NOTE);

But
m_Keys1 is not object for CMIDIKeyboard so due to incompatibility we are
not able to initialise Keyboard.

How to achive Piano Initialization in Multitouch editbox.
Posted
Updated 15-Aug-13 20:10pm
v2

1 solution

You left out an important part, namely the class hierarchy of the objects you list here. What is the relationship between the CMidiKeyboard and CMIDIKeyboard classes (structs? namespaces?) for example? What do they derive from?
 
Share this answer
 
Comments
SaurabSaini 29-Aug-13 7:45am    
CMIDIKeyboard derive from a class CPianoCtrl (which derives from Cwnd) which perform the following function KeyDisplay ,create(),initialise(),getlowNote(),GetHighNote()and CMIDIKeyboard consist of KeyNoteOn,KeyNoteOff,LbuttonDown,LButtonUp,OnMouseMove,OnPianoRecord.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900