LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Maximum panel width

Solved!
Go to solution

Hi Luis,

Thanks for your reply.

GetSystemMetrics (SM_CXVIRTUALSCREEN) return 1920

GetSystemMetrics (SM_CYVIRTUALSCREEN) return 1080

They return the setting resolution of my graphic card (the same of my monitor).

Do you have tryed the sample code attached previous?

0 Kudos
Message 11 of 15
(1,251 Views)

... for completeness, in my case GetSystemMetrics (SM_CXVIRTUALSCREEN) returns 1600.

0 Kudos
Message 12 of 15
(1,248 Views)

Just out of curiosity I made some trials and here are the results.

 

With this code:

DebugPrintf ("Virtual screen size: %d\n", GetSystemMetrics (SM_CXVIRTUALSCREEN));
GetPanelAttribute (panelHandle, ATTR_WIDTH, &pw); DebugPrintf ("Actual panel width: %d\n", pw); SetPanelAttribute (panelHandle, ATTR_WIDTH, 10000); GetPanelAttribute (panelHandle, ATTR_WIDTH, &pw); DebugPrintf ("Max panel width: %d\n", pw);

 

I obtained these results:

Virtual screen size: 1680
Actual panel width: 1024
Max panel width: 3354

 

BTW, 1680 is the actual resolution of my display.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 13 of 15
(1,245 Views)

OK,

From my first post I changed the monitor with a full-HD (1920x1080 mentioned above), so my new limit panel width is 3824, exactly twice my current horizontal resolution.

The maximum panel width is twice the horizontal resolution.

 

0 Kudos
Message 14 of 15
(1,242 Views)
Solution
Accepted by topic author Biccio

I think the maximum width might also depend on the current position of the panel, but I'm not completely sure.

 

I'm sorry that I'm not providing exact details on how the maximum width is computed, but the short answer is that I don't know what they are.

 

Luis

0 Kudos
Message 15 of 15
(1,231 Views)