Saturday, December 16th 2017, 7:45pm UTC+1

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.

Mr. Spock

Beginner

Date of registration: May 19th 2009

Posts: 16

1

Tuesday, December 5th 2017, 9:41pm

passing parameters to a callback function

Hi

Is there a way to pass parammeters to a callback function of a blocking dialog without using static allocation ?

Regards

SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 443

2

Wednesday, December 6th 2017, 2:34pm

Hi,

Unfortunately the is no direct way to pass data to a blocking dialog. To set user data it would be necessary to have the handle of the dialog.

You could create your own create-blocking-dialog-function. Attached is an example how this could be done.

After creating a dialog with GUI_CreateDialogBox() you can use the handle to set user data (don't forget to set the number of additional bytes in the create structure). After setting the user data you can call GUI_ExecCreatedDialog() which is blocking and executes the created dialog.

Regards
Sven
SEGGER - Schoenen has attached the following file:

Mr. Spock

Beginner

Date of registration: May 19th 2009

Posts: 16

3

Friday, December 8th 2017, 9:53pm

Thank you again

Similar threads