Thread: Loop in dialog app...

  1. #1
    Registered User
    Join Date
    Aug 2006

    WM_KEYDOWN in dialog app...

    I've created a dialog window with a modified "static text" which should show how many times a button (C in this case) is pressed by checking it with a WM_KEYDOWN message by using the OnKeyDown()-function. The problem is that nothing is showed on the dialog screen.

    void CTry_5Dlg::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) 
    	// TODO: Add your message handler code here and/or call default
    	char lsChar;
    	lsChar = char(nChar);
    	if (lsChar == 'C') {
    		m_iCount.Format("%d", count);
    	CDialog::OnKeyDown(nChar, nRepCnt, nFlags);
    Can anyone explain how I should solve this problem?

    (Yes, I'm a newbie in VC++)
    Last edited by xkrja; 11-09-2006 at 06:52 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A somewhat bizzare problem!!! - WHILE LOOP
    By bobthebullet990 in forum C Programming
    Replies: 3
    Last Post: 03-31-2006, 07:19 AM
  2. syntax question
    By cyph1e in forum C Programming
    Replies: 19
    Last Post: 03-31-2006, 12:59 AM
  3. best program to start
    By gooddevil in forum Networking/Device Communication
    Replies: 4
    Last Post: 05-28-2004, 05:56 PM
  4. Getting the position of a dialog without parent on the screen
    By stormbringer in forum Windows Programming
    Replies: 1
    Last Post: 08-27-2003, 02:59 AM
  5. SDI Menu App - MSVC 6
    By Unregistered in forum Windows Programming
    Replies: 7
    Last Post: 10-16-2001, 09:59 PM