none
GradientFill API is not working with multi-monitor (extended monitor) on WEC7 RRS feed

  • Question

  • GradientFill ( https://msdn.microsoft.com/en-us/library/ee499729.aspx ) API is not working with multi-monitor setup.

    The other GDI functions such as CreateSolidBrush etc are working fine on multi-monitor also. GDI tests on CETK also writing patterns on screen (on whole extended monitor).

    But GradientFill API is not working. It's not filling the region.

    The same code is working with single monitor setup.

    Below is the code:

    void gradient_test(HWND ghWnd)
    {
    	TRIVERTEX vert[2];
    	GRADIENT_RECT gRect;
    
    	HDC hDCb, hDCd;
    	RECT rect;
    	PAINTSTRUCT ps;
    
    	rect.left = 0;
    	rect.top = 0;
    	rect.right = GetSystemMetrics(SM_CXSCREEN);
    	rect.bottom = GetSystemMetrics(SM_CYSCREEN);
    
    	vert[0].x = rect.left;
    	vert[0].y = rect.top;
    	vert[0].Red = 0x0000;
    	vert[0].Green = 0x0000;
    	vert[0].Blue = 0x0000;
    	vert[0].Alpha = 0x0000;
    
    	vert[1].x = rect.right;
    	vert[1].y = rect.bottom;
    
    	vert[1].Red = 0x0000;
    	vert[1].Green = 0x0000;
    	vert[1].Blue = 0xff00;
    
    	vert[1].Alpha = 0x0000;
    
    	gRect.LowerRight = 1;
    	gRect.UpperLeft = 0;
    
    	hDCb = BeginPaint(ghWnd, &ps);
    	hDCd = GetDC(ghWnd);
    
    	GradientFill(hDCd,vert, 2, &gRect, 1, GRADIENT_FILL_RECT_H);
    
    	EndPaint(ghWnd, &ps);
    
    	ReleaseDC(ghWnd, hDCd);
    }
    

    Please let me know your idea on this..

    Thanks

    GNK

    Tuesday, February 27, 2018 4:20 AM

Answers

  • That is correct, gradient fill is not supported on multi-monitor. In the GuruCE iMX6 BSP we fixed this by cloning the multimon component and implementing the missing functionality.

    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: https://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    NXP Proven Partner
    https://guruce.com
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here: https://guruce.com/imx6

    • Marked as answer by Keshava GN Tuesday, February 27, 2018 7:16 AM
    Tuesday, February 27, 2018 6:22 AM
    Moderator

All replies

  • That is correct, gradient fill is not supported on multi-monitor. In the GuruCE iMX6 BSP we fixed this by cloning the multimon component and implementing the missing functionality.

    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: https://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    NXP Proven Partner
    https://guruce.com
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here: https://guruce.com/imx6

    • Marked as answer by Keshava GN Tuesday, February 27, 2018 7:16 AM
    Tuesday, February 27, 2018 6:22 AM
    Moderator
  • Thanks Michel.

    Is this not supported in multi-mon for any reason? Or is this an issue, and SR can be opened? (Or is there an open SR as of now?)

    Thanks,

    GNK

    Tuesday, February 27, 2018 11:48 AM
  • I'm not sure what the reason is it is not supported. I guess you can open an SR for this issue with MS, but it's quite easy to just clone multimon and implement the solution. Your choice, but opening an SR and waiting for MS to implement a fix and release an update will take eons (as you may know). No SR open (AFAIK; at least we didn't open an SR for this issue).

    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: https://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    NXP Proven Partner
    https://guruce.com
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here: https://guruce.com/imx6

    Tuesday, February 27, 2018 8:34 PM
    Moderator
  • Do you mean multimon from private?

    Thanks for the help, Michel.

    Regards,

    GNK

    Wednesday, February 28, 2018 5:40 AM
  • Yep, from private. Just make sure you don't redistribute your modified code (as it falls under the premium shared source license).

    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: https://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    NXP Proven Partner
    https://guruce.com
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here: https://guruce.com/imx6

    Wednesday, February 28, 2018 9:47 AM
    Moderator
  • Yes. Got it. Thanks Michel.
    Wednesday, February 28, 2018 10:04 AM