Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

to display data

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,
I must make a MDI application based on CEditView.
This application use files with binary data just '0' and '1'.
When the user presses another key which '0' and '1', I would like that the data don't display in the window.
the data are just displaing when it's '0' or '1'.
if someone can help me, it's cool.
thanks
 
override the WM_CHAR message handler into your view class, modify the code as follows. You get it!
void CTestSDIView::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
if (nChar == '0' || nChar == '1')
CEditView::OnChar(nChar, nRepCnt, nFlags);
}
 
Thanks, it works !!
But i have another problem, I need the keys BACKSPACE and RETURN.
For these keys '->' '<-' 'Ctrl' 'Shift' 'Alt' , I have found in the &quot;Key Scan Codes&quot; in the MSDN but I don't know for RETURN and BACKSPACE

Thanks
 
check the virtual-code of MSDN, return and backspace should be VK_RETURN and VK_BACK.
 
or simly the ascII code 13 for return and 8 for backspace.
 
Ok
Thanks for your help Jeffray
I have lot of difficulties with Visual C++ and it's cool to help me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top