Tuesday, May 22nd 2018, 10:08am UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

johanan

Beginner

Date of registration: Sep 11th 2014

Posts: 67

1

Monday, June 1st 2015, 2:25pm

get widget properties?

If I have the window (widget ) handle, how do I get the widget properties (like x,y , name etc.?)
can't fine it...
Thanks
Johanan

Date of registration: May 26th 2009

Posts: 1,022

2

Tuesday, June 2nd 2015, 9:44am

Hello Johanan,

Please note that widgets are enhanced windows. Therefor the WM API can be used with widgets in order to perform general functions.

Best regards,
Adrian

johanan

Beginner

Date of registration: Sep 11th 2014

Posts: 67

3

Wednesday, June 3rd 2015, 7:58am

Thanks,
I wonder if there is a way to get window (widget) name (which is not used by emWin, as far as I understand).
Cant find any WM_GetWindowName().

I need it so for now I am managing a table with hWin and string pairs...

Johanan

Date of registration: May 26th 2009

Posts: 1,022

4

Wednesday, June 3rd 2015, 10:03am

Hello Johanan,

Widgets do not have names by default. This is not required in most cases. Please note that an additional number of bytes can be defined as user data for widgets and windows. Theses could be used to store a string or a pointer to a string.

Best regards,
Adrian

johanan

Beginner

Date of registration: Sep 11th 2014

Posts: 67

5

Wednesday, June 3rd 2015, 1:21pm

I am aware of user data, but wondered if there is a way to get to the name that is assigned in Createindirect as here:


static const GUI_WIDGET_CREATE_INFO _aDialogCreate[] = {
{ FRAMEWIN_CreateIndirect, "Framewin", ID_FRAMEWIN_0, 250, 30, 300, 200, 0, 0x64, 0 },
...
.
.

So is there a way to access the string "Framewin" , given hWin from ID_FRAMEWIN ?
Regards
Johanan

Date of registration: May 26th 2009

Posts: 1,022

6

Friday, June 5th 2015, 9:15am

Hello Johanan,

Yes, the function FRAMEWIN_GetText() can be used for that, but please note that not all widgets store the text which is given in the resource table.

Best regards,
Adrian

Similar threads