CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2014
    Posts
    2

    Exclamation Draggin and dropping functionality in windows 8 environment

    Hi,

    i have developed an application in which i have icons in left side pane of application which can be dragged and dropped in client screen. Application is working fine with all the resolution except 1920x1080.

    when setting the resolution to 1920x1080 while dragging icons to client area, icon is not attach to mouse pointer. instead there is a gap between the mouse pointer and the icon. i wrote code to identify the screen resolution but it does not seem to recognize 1920x1080 resolution. below code is giving incorrect resolution for 1920x1080 setting.

    RECT actualDesktop;
    GetClientRect(GetDesktopWindow(),&actualDesktop);

    value of 'actualDesktop' variable is {top=0 bottom=783 left=0 right=1536} which is incorrect. according to current resolution size value should be {top=0 bottom=1080 left=0 right=1920}. Due to this, all the icons while dragging are adjusting according to incorrect resolution setting.

    Can someone help me to identify the issue and let me know if there is any limitation with respect to screen resolution in VC++ 6.0 with windows 8 environment.

    I am getting same issue when compiling in VS2012 in windows 8. Code does not seem to recognize 1920x1080 resolution setting and downgrading my application look and feel by setting it to lower resolution.

    Any help would be appreciated. If require i will place more detailed code about the drag and drop functionality.

    Regards,
    Aniket

  2. #2
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: Draggin and dropping functionality in windows 8 environment

    RECT actualDesktop;
    GetClientRect(GetDesktopWindow(),&actualDesktop);
    The code works just fine for any desktop resolutions.
    Name:  FullHD-Desktop.jpg
Views: 87
Size:  13.7 KB Name:  Under-FullHD-Desktop.jpg
Views: 149
Size:  13.4 KB
    Attached Files Attached Files
    Best regards,
    Igor

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured