Posts by johanan

    I find that displaying Arabic is very challenging.
    Every character can have up to 4 different fonts, depending if it is isolated, start of a word, middle or end of word.
    The Arabic fonts in the sample file are only for the isolated fonts.
    Anybody knows how to deal with this?
    Is there any support for that in emWin?
    Thanks
    Johanan

    Hi,
    I need to delete graph data,
    but I need to check that hG24_a is valid something like:

    if( isNotFree(hG24_a))
    GRAPH_DATA_XY_Delete(hG24_a);


    how can this be done (checking for hG24_a == NULL does not work as the handle is not NULL)

    Thanks
    Johanan

    The Calender dialoge has some mixup erros.
    1. The manual:

    Prototype
    void CALENDAR_SetDefaultBkColor(GUI_COLOR Color, unsigned Index);

    but should be probably :

    Prototype
    void CALENDAR_SetDefaultBkColor(unsigned Index, GUI_COLOR Color);
    Also , it looks like CALENDAR_SetDefaultBkColor() is same as CALENDAR_SetDefaultColor()

    Here is my code, and the output with PC simulation:

    CALENDAR_SetDefaultFont(CALENDAR_FI_HEADER, &GUI_Font24B_ASCII);
    CALENDAR_SetDefaultFont(CALENDAR_FI_CONTENT, &GUI_Font24B_ASCII);
    CALENDAR_SetDefaultBkColor(CALENDAR_CI_WEEKEND,GUI_GREEN);
    CALENDAR_SetDefaultBkColor(CALENDAR_CI_WEEKDAY,GUI_GREEN);
    CALENDAR_SetDefaultColor(CALENDAR_CI_WEEKEND, GUI_LIGHTMAGENTA);
    CALENDAR_SetDefaultSize(CALENDAR_SI_HEADER, 50);
    CALENDAR_SetDefaultSize(CALENDAR_SI_CELL_X, 50);
    CALENDAR_SetDefaultSize(CALENDAR_SI_CELL_Y, 50);
    hCalender = CALENDAR_Create(hBuildWin, 20,20,2015,7,4,0,65000,0);

    How to change the background? can give an example callback function to draw a rectangle around the calender?

    Thanks
    Johanan

    I saw a thread from Ana, with same problem.
    When I delete a window that has a GRAPH object, I get the message "gui_alloc.c: block to be deleted is already locked in free()".
    I get this message 2 times, (when I attach 2 graph data, number of times is number of attached data objects) just before the window is deleted:

    h24Data = GRAPH_DATA_XY_Create(GUI_RED,25,d24Points,25);
    h24Data1 = GRAPH_DATA_XY_Create(GUI_GREEN,25,d24Points1,25);
    GRAPH_AttachData(hItem,h24Data);
    GRAPH_AttachData(hItem,h24Data1);


    Whoever, if I manually detach the data, and delete it, there is no problem:
    hItem = WM_GetDialogItem(pMsg->hWin, ID_GRAPH_0);
    GRAPH_DetachData(hItem,h24Data);
    GRAPH_DetachData(hItem,h24Data1);
    GRAPH_DATA_XY_Delete(h24Data);
    GRAPH_DATA_XY_Delete(h24Data1);
    // now no error message box is poped:
    WM_DeleteWindow(mainW);



    This workaround works, but why is it needed?


    Regards
    Johanan

    Unfortunately this did not help.
    //------------

    Control Panel\All Control Panel Items\Fonts\Font settings
    Once the checkbox "Hide fonts based on language settings" is checked, all Windows
    fonts installed on the computer should be shown in the Font dialog.
    //-----------------

    I also tried running the program in WIN 7 compatibility mode, with same result.
    Regards
    Johanan

    When I open font dialogue in font converter there is no "Script" combobox, and many fonts are missing.


    With other programs that use the font dialogue, the font dialogue is full with all available fonts, and the script box is displayed.

    I tried the demo last version, I am using ST font converter version, it is the same.

    What is the problem? ( OS windows 8 )

    Regards
    Johanan

    Hello,
    GUI_MessageBox is a nice little dialogue, but I expected it to use GUI_DEFAULT_FONT, which is not the case.


    Is it true?

    I am aware that I can write my won cb routine and set the font, but that is not what the GUI_MessageBox is meant to be...
    //-------------------------------------------------------
    BTW a small manual error (page 734):

    RADIO_GetValue()
    Description
    Returns the current button selection.
    Prototype
    void RADIO_GetValue(RADIO_Handle hObj); <<<<< should be: >>>>>>>> int void RADIO_GetValue(RADIO_Handle hObj);


    //----------------------
    Thanks
    Johanan

    I try to use simple skin all my CheckBoxes:

    #define WIDGET_USE_FLEX_SKIN 1 // in gui config h


    CHECKBOX_GetSkinFlexProps(&chbProps,CHECKBOX_SKINFLEX_PI_ENABLED);
    chbProps.ButtonSize = 25;
    chbProps.ColorCheck = GUI_GREEN;
    CHECKBOX_SetSkinFlexProps(&chbProps,CHECKBOX_SKINFLEX_PI_ENABLED);
    hBuildWin = GUI_CreateDialogBox(widgetTable, nObj, cbScreen, WM_HBKWIN, 0, 0);

    But it has no effect.

    I am using PC simulation. I assume it is compiled with WIDGET_USE_FLEX_SKIN 1, but not sure.

    What am I missing?
    Thanks
    Johanan

    My application builds the screens dynamically, ans populates a dialogue table at run time, so I need the create indirect. It seems quite easy to do, but the way to set the WINDOW_ID is unclear.
    I now do with a workaround, using MY_GetDialogItem(), and I wonder if you can give a hint on doing it in a more elegant way.
    -------------------

    Thanks
    Johanan

    Hi, I need to create a simple LED widget (just display one of two images according to ON/OFF state, I wonder how such a basic widget is missing...).

    I read the costume widget creation doc, but missing the create_indirect() function template.

    I assume that Create_indirect call <myWidget>_create, but how?

    Is it available anywhere?

    thanks

    Johanan

    I would like to create a transparent dialogue, so the screen behind the window is visible except where there are widgets, so I use:


    static const GUI_WIDGET_CREATE_INFO _aDialogCreate[] = {
    { FRAMEWIN_CreateIndirect, "KeyPad", ID_FRAMEWIN_0, 36, 57, 350, 480, WM_CF_HASTRANS | WM_CF_STAYONTOP, 0, 0 },
    { TEXT_CreateIndirect, "Text", ID_TEXT_0, 58, 53, 200, 64, 0, 0x0, 0 },
    .
    .
    But this is not doing it.
    What am I missing?
    Thanks