A couple things...

This is a discussion on A couple things... within the Windows Programming forums, part of the Platform Specific Boards category; I have an edit control on my dialog, and I can't seem to capture the escape key whenever the control ...

  1. #1
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361

    A couple things...

    I have an edit control on my dialog, and I can't seem to capture the escape key whenever the control is in focus. I tried using Spy++ but I didn't see any relevant messages being sent when I presses escape. All that was showing up was a WM_COMMAND message with a wParam of 2 and an lParam of 0.

    Secondly, how can I remove my programs entry in the taskbar? My dialog doesn't have a titlebar, and there's no sense in having a blank entry in the taskbar... that just looks silly.

  2. #2
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    I don't know about removing the taskbar entry, but for the escape capture, I fear something is wrong with your program. I did as you did, with Spy++, and pressing escape registered WM_KEYDOWN, WM_CHAR, and WM_KEYUP messages, for single and multiline edit controls. Post your code.
    benforbes@optusnet.com.au
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  3. #3
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    The RegisterServiceProcess function registers or unregisters a service process. A service process continues to run after the user logs off.

    DWORD RegisterServiceProcess(DWORD dwProcessId,
    DWORD dwType);

    Parameters

    dwProcessId

    Specifies the identifier of the process to register as a service process. Specifies NULL to register the current process.

    dwType

    Specifies whether the service is to be registered or unregistered. This parameter can be one of the following values.

    Value Meaning
    RSP_SIMPLE_SERVICE Registers the process as a service process.
    RSP_UNREGISTER_SERVICE Unregisters the process as a service process.
    Return Value

    The return value is 1 if successful or 0 if an error occurs.

  4. #4
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    Could you explain a little more about that function? What I read on MSDN didn't tell me anything. As far as I can tell, Registering a ServiceProcess will stop it being closed when the user logs off. Is it also supposed to remove the taskbar entry?
    benforbes@optusnet.com.au
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  5. #5
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    Services are not listed as apps in the task manager. However, they are listed as processes.

  6. #6
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    RegisterServiceProcess and RSP_SIMPLE_SERVICE are both undefined in my program. What do I have to include? I use MS VC++ 6.0.
    benforbes@optusnet.com.au
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  7. #7
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    Well, it is for 9x systems. For non 9x systems, check out the following page:

    http://msdn.microsoft.com/library/de..._functions.asp

  8. #8
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    The attached program is a quicky which demonstrates the capture of ESC, CR and TAB for a single line edit control.
    Attached Files Attached Files
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. a couple of questions about System.String
    By Elkvis in forum C# Programming
    Replies: 5
    Last Post: 02-17-2009, 01:48 PM
  2. Suggestions for things to study
    By Mastadex in forum Windows Programming
    Replies: 5
    Last Post: 08-18-2008, 09:23 AM
  3. Replies: 12
    Last Post: 03-27-2008, 10:41 AM
  4. 2 things at once?
    By bradszy in forum C++ Programming
    Replies: 7
    Last Post: 02-20-2008, 12:19 PM
  5. Help with these three things...
    By face_master in forum C++ Programming
    Replies: 2
    Last Post: 08-26-2001, 07:05 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21