AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 20.06.2012, 06:12   #1  
Blog bot is offline
Blog bot
Участник
 
25,617 / 848 (80) +++++++
Регистрация: 28.10.2006
ax-erp: Get screen width, height etc. in X++ code
Источник: http://microsoft-dynamics-ax-erp.blo...in-x-code.html
==============


I took me a bit longer than expected to Google the solution for this Dynamics AX X++ coding question, as I was did not have the keyword “system metrics” in mind. Maybe this post will help someone to be 2 minutes faster in finding the solution.
static void test_WinAPI_getSystemMetrics(Args _args)
{
#WinAPI
int screenWidth, screenHeight;
;
screenWidth = WinAPI::getSystemMetrics(#SM_CXSCREEN);
screenHeight = WinAPI::getSystemMetrics(#SM_CYSCREEN);
info(strfmt("Screen resolution: %1 x %2",screenWidth, screenHeight));

//other parameters:
//SM_CXSCREEN = 0 ‘ Width of screen
//SM_CYSCREEN = 1 ‘ Height of screen
//SM_CXFULLSCREEN = 16 ‘ Width of window client area
//SM_CYFULLSCREEN = 17 ‘ Height of window client area
//SM_CYMENU = 15 ‘ Height of menu
//SM_CYCAPTION = 4 ‘ Height of caption or title
//SM_CXFRAME = 32 ‘ Width of window frame
//SM_CYFRAME = 33 ‘ Height of window frame
//SM_CXHSCROLL = 21 ‘ Width of arrow bitmap on
// ‘ horizontal scroll bar
//SM_CYHSCROLL = 3 ‘ Height of arrow bitmap on
// ‘ horizontal scroll bar
//SM_CXVSCROLL = 2 ‘ Width of arrow bitmap on
// ‘ vertical scroll bar
//SM_CYVSCROLL = 20 ‘ Height of arrow bitmap on
// ‘ vertical scroll bar
//SM_CXSIZE = 30 ‘ Width of bitmaps in title bar
//SM_CYSIZE = 31 ‘ Height of bitmaps in title bar
//SM_CXCURSOR = 13 ‘ Width of cursor
//SM_CYCURSOR = 14 ‘ Height of cursor
//SM_CXBORDER = 5 ‘ Width of window frame that cannot
// ‘ be sized
//SM_CYBORDER = 6 ‘ Height of window frame that cannot
// ‘ be sized
//SM_CXDOUBLECLICK = 36 ‘ Width of rectangle around the
// ‘ location of the first click. The
// ‘ second click must occur in the
// ‘ same rectangular location.
//SM_CYDOUBLECLICK = 37 ‘ Height of rectangle around the
// ‘ location of the first click. The
// ‘ second click must occur in the
// ‘ same rectangular location.
//SM_CXDLGFRAME = 7 ‘ Width of dialog frame window
//SM_CYDLGFRAME = 8 ‘ Height of dialog frame window
//SM_CXICON = 11 ‘ Width of icon
//SM_CYICON = 12 ‘ Height of icon
//SM_CXICONSPACING = 38 ‘ Width of rectangles the system
// ‘ uses to position tiled icons
//SM_CYICONSPACING = 39 ‘ Height of rectangles the system
// ‘ uses to position tiled icons
//SM_CXMIN = 28 ‘ Minimum width of window
//SM_CYMIN = 29 ‘ Minimum height of window
//SM_CXMINTRACK = 34 ‘ Minimum tracking width of window
//SM_CYMINTRACK = 35 ‘ Minimum tracking height of window
//SM_CXHTHUMB = 10 ‘ Width of scroll box (thumb) on
// ‘ horizontal scroll bar
//SM_CYVTHUMB = 9 ‘ Width of scroll box (thumb) on
// ‘ vertical scroll bar
//SM_DBCSENABLED = 42 ‘ Returns a non-zero if the current
// ‘ Windows version uses double-byte
// ‘ characters, otherwise returns
// ‘ zero
//SM_DEBUG = 22 ‘ Returns non-zero if the Windows
// ‘ version is a debugging version
//SM_MENUDROPALIGNMENT = 40
// ‘ Alignment of pop-up menus. If zero,
// ‘ left side is aligned with
// ‘ corresponding left side of menu-
// ‘ bar item. If non-zero, left side
// ‘ is aligned with right side of
// ‘ corresponding menu bar item
//SM_MOUSEPRESENT = 19 ‘ Non-zero if mouse hardware is
// ‘ installed
//SM_PENWINDOWS = 41 ‘ Handle of Pen Windows dynamic link
// ‘ library if Pen Windows is
// ‘ installed
//SM_SWAPBUTTON = 23 ‘ Non-zero if the left and right
// ‘ mouse buttons are swapped
}








Источник: http://microsoft-dynamics-ax-erp.blo...in-x-code.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
ax-erp: X++ Code to get the Ranges / Criteria from Query Blog bot DAX Blogs 0 12.06.2012 12:11
ax-erp: Get File Encoding in Dynamics AX using X++ Blog bot DAX Blogs 0 27.04.2012 22:11
emeadaxsupport: New Content for Microsoft Dynamics AX 2012 : October 2011 Blog bot DAX Blogs 0 27.10.2011 17:11
axinthefield: Dynamics AX Event IDs Blog bot DAX Blogs 0 01.03.2011 22:11
daxdilip: Whats New in Dynamics AX 2012 (A brief extract from the recently held Tech Conf.) Blog bot DAX Blogs 7 31.01.2011 12:35

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 06:12.