Questions about cursor functionality

This is a discussion on Questions about cursor functionality within the Windows Programming forums, part of the Platform Specific Boards category; Well, hello everyone. I' m using visual studio and i'm trying to add my own cursor in my project. Till ...

  1. #1
    csd@auth
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    71

    Question Questions about cursor functionality

    Well, hello everyone. I' m using visual studio and i'm trying to add my own cursor in my project.
    Till now, I've added a cursor resource, its ID is IDC_POINTER and in wndclass I've written this
    Code:
    wndclass.hCursor       = LoadCursor (hInstance, MAKEINTRESOURCE(IDC_POINTER)) ;
    The problem is that I also want to change the cursor that appears when for example your write in an edit control ( looks like this " I " )

    And one more question. Is there a way so that my cursor appears when I point somewhere out of the client area? (i.e. the sys menu, when I point there the original cursor appears)

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    This may help in the case of Edit Controls. http://www.codeguru.com/forum/showthread.php?t=380650


    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    csd@auth
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    71
    Well, I forgot to mention something important.
    I'm using win32 api , not MFC.

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by kantze View Post
    Well, I forgot to mention something important.
    I'm using win32 api , not MFC.
    Yes, I sort of understood that from the (small) codesample you posted. But most MFC functionality is fairly well corresponding to Win32 functionality, so I expect that the sample is still valid - however, I think the caret is the wrong type of cursor - that's the flashing black bar that shows where I'm going to type, whilst you want to change the I-shaped mouse-pointer cursor that I'd use to select a bunch of text or some such.

    I think you want to put your LoadCursor in the WM_SETFOCUS message handler for your edit control.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    Registered User
    Join Date
    Mar 2005
    Location
    Mountaintop, Pa
    Posts
    1,059

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. questions....so many questions about random numbers....
    By face_master in forum C++ Programming
    Replies: 2
    Last Post: 07-30-2009, 08:47 AM
  2. A very long list of questions... maybe to long...
    By Ravens'sWrath in forum C Programming
    Replies: 16
    Last Post: 05-16-2007, 05:36 AM
  3. Several Questions, main one is about protected memory
    By Tron 9000 in forum C Programming
    Replies: 3
    Last Post: 06-02-2005, 07:42 AM
  4. Trivial questions - what to do?
    By Aerie in forum A Brief History of Cprogramming.com
    Replies: 23
    Last Post: 12-26-2004, 08:44 AM
  5. questions questions questions.....
    By mfc2themax in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 08-14-2001, 07:22 AM

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