Window::ClientToScreen

Description

Converts the client coordinates of a given RECT structure pointer on the display to screen coordinates.

Syntax

void ClientToScreen( RECT * lpRect )

Parameters

lpRect
[modify] Pointer to a POINT structure that contains the client coordinates to be converted.
The new screen coordinates are copied into this structure if the function succeeds.

Return

Examples

EX1

//Please make sure you have a worksheet window exist when you run the example
int Window_ClientToScreen_ex1()
{
    WorksheetPage testWks = Project.WorksheetPages(0);
    Window testWin = testWks.GetWindow();
    testWin.ShowWindow(SW_NORMAL);
    
    RECT rect;
    testWin.GetClientRect(&rect);
    testWin.ClientToScreen(&rect);
    printf("upper-left position on screen, x:%d, y:%d\n", rect.left, rect.top);
    printf("lower-right position on screen: x:%d, y:%d\n", rect.right, rect.bottom);
    return 1;
}

Remark

See Also

Header to Include

origin.h