none
SBM_GETRANGE message ID is not defined. RRS feed

  • Question

  • Hi,

    I have created a Windows Mobile 6 Professional application, which has a scrollbar control.  In the process of handling the WM_VSCROLL message, I send a SBM_GETRANGE message.  Problem is that while the documentation indicates that this is a valid Mobile 6 message, the compiler complains that the message Id is undefined.  I did a search though all the Window Mobile 6 SDK files and could not find a reference to this message.  I then noticed that with the exception of SBM_GETSCROLLINFO and SBM_SETSCROLLINFO, all other scollbar messages are also not defined

    Can someone please tell me which include file to use to resolve the compiler error.

    Sijmen.
    Tuesday, October 6, 2009 3:22 AM

Answers

  • I didn't find the definition for SBM_GETRANGE either in the winuser.h for WM, while it's available in its desktop counterpart. I also searched the include folder but found nothing. So it's a document error.

    You can either define it yourself (according to the desktop version) or use the GetScrollRange function instead.

    Please mark the post that helps you, and unmark that does not. This benefits our community members.
    • Marked as answer by warrentangModerator Thursday, October 15, 2009 6:10 AM
    • Unmarked as answer by Sijmen Thursday, October 22, 2009 5:42 AM
    • Marked as answer by Sijmen Thursday, October 22, 2009 5:43 AM
    Tuesday, October 13, 2009 9:58 AM
    Moderator
  • You can post the document error to http://connect.microsoft.com.
    Please mark the post that helps you, and unmark that does not. This benefits our community members.
    • Marked as answer by Sijmen Sunday, November 8, 2009 11:35 PM
    Thursday, October 22, 2009 6:01 AM
    Moderator

All replies

  • You can include commctrl.h header file as indicated in the document for SBM_GETRANGE:

    http://msdn.microsoft.com/en-us/library/aa931048.aspx 


    Please mark the post that helps you, and unmark that does not. This benefits our community members.
    • Marked as answer by warrentangModerator Monday, October 12, 2009 2:23 AM
    • Unmarked as answer by Sijmen Monday, October 12, 2009 10:28 PM
    Thursday, October 8, 2009 5:18 AM
    Moderator
  • I already include commctrl.h, but it does not define the defintion.

    For example, using the Windows Mobile 6 SDK, there is a .\PocketPC\Include\Armv4i folder which contains the commctrl.h file.  That file does not define any SBM_* messages.  That same folder also contains a winuser.h file which does define the SBM_SETSCROLLINFO and SBM_GETSCROLLINFO messages as well and other scrollbar related defintions.  However all the other Scollbar message definitions are missing.

    Why?  Is the header file incomplete, or is the documentation incorrect, and how do we ensure it somehow get fixed?

    Regards,
    Sijmen.

    Monday, October 12, 2009 10:36 PM
  • I didn't find the definition for SBM_GETRANGE either in the winuser.h for WM, while it's available in its desktop counterpart. I also searched the include folder but found nothing. So it's a document error.

    You can either define it yourself (according to the desktop version) or use the GetScrollRange function instead.

    Please mark the post that helps you, and unmark that does not. This benefits our community members.
    • Marked as answer by warrentangModerator Thursday, October 15, 2009 6:10 AM
    • Unmarked as answer by Sijmen Thursday, October 22, 2009 5:42 AM
    • Marked as answer by Sijmen Thursday, October 22, 2009 5:43 AM
    Tuesday, October 13, 2009 9:58 AM
    Moderator
  • I didn't try defining SBM_GETRANGE myself, and instead opted to use GetScrollRange.

    How can we ensure that the CE header files get fixed up for future releases so that they match the documentation?

    Sijmen.
    Thursday, October 22, 2009 5:45 AM
  • You can post the document error to http://connect.microsoft.com.
    Please mark the post that helps you, and unmark that does not. This benefits our community members.
    • Marked as answer by Sijmen Sunday, November 8, 2009 11:35 PM
    Thursday, October 22, 2009 6:01 AM
    Moderator