Posts by Pmjagtap

    Hello All,

    Following is code gets excuted upon calling GUI_Delay() function..

    Code
    void GUI_X_Delay(int ms) { 
      int tEnd = OS_TimeMS + ms;
      while ((tEnd - OS_TimeMS) > 0);
    }

    Considering above code would fail to give requested delay on certain condition.
    Condition is when "OS_TimeMS" would wrap from +ve to -ve side on every ~48 days(24 from system power up).

    Now consider variable "OS_TimeMS" is just/near on edge of +ve range on signed int(0x7FFF FFFF) and then if GUI_X_Delay() gets called then vaiable "tEnd " would contain -ve value but "OS_TimeMS" has +ve value this is where "((tEnd - OS_TimeMS) > 0)" becomes false and "GUI_X_Delay()" quits straight
    away.

    Is this would happen ? ?(

    Use following table(signed int 8) to do quick calculation..

    Update..

    I should correct its StemWin 1.2 that hosts EmWin 5.32 and StemWin 1.1.2 Hosts Emwin 5.22.

    Well I found old liberary Emwin 5.26 and VNC server works with scrollbar of widget. But I observed it had put classic look for scrollbar.

    So did I for Emwin 5.32 using "SCROLLBAR_SetDefaultSkinClassic();" and it worked :) . Hope if its bug next version of EmWin OR StemWin will be fixed.

    Joy

    Hello all,

    I have come across odd problem with VNC server for StemWin 5.32(presumebally with Emwin 5.32 too), I have tested with StemWin 5.22 works fine.

    Bug is when I create Treeview Or Listbox big enough so it shows scroll bar and then use VNC viewer to scroll list VNC server crashes.
    Although if I have small list for either widget with no scroll bar apearing VNC server/viewer works fine.

    Can any one reproduce this problem?

    Note: With RTOS it would not even open window having widget program gets to hardfault at time of opening window.

    With non RTOS(Standard C prog) it would still open window with widget having treeview and allow 2-3 scroll to happen then it would crash.
    Yes, you hear correctly VNC server without RTOS !! :P Im emulating TCP Socket requirement for VNC server.

    Quick work around is ..

    Just before child winow gets deleted make its parent Modal again..

    Put following code in modal child's call back routine..


    case WM_DELETE:
    hItem = WM_GetParent(pMsg->hWin);
    WM_MakeModal(hItem);
    break;

    ^^

    But will not work if "MESSAGEBOX_Create("This is Modal type", "Error",GUI_MESSAGEBOX_CF_MODAL);" was called from parent. Upon its closure parent will still loose modality.

    Hello All,

    I am experiencing problem with Modal functionality on STemwin 1.2 (emwin 5.32) as well on STemwin 1.1.2 (emwin 5.22).

    Problem is when I close top(child) modal window I loose Modal behaviour of bottom(Parent of top child) window. And then I am able to touch background window .

    Although If I dont create another child from parent window parent window sustains its modality throughout its life time.

    Its only when I create another child with modal(Or even MESSAGEBOX_Create("xxx","Error",GUI_MESSAGEBOX_CF_MODAL);) and close that child window parent win looses modality.

    My code is a follows could some buddy recreate this issue?


    //----------------Parent win creation----------------------------------------------
    hWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, hWin, 0, 0);
    WM_MakeModal(hWin );

    //---------------Call Back Routine-------------------------------------------------
    static void _cbDialog(WM_MESSAGE * pMsg) {

    switch (pMsg->MsgId) {
    WM_HWIN hItem;
    int NCode;
    int Id;

    case WM_NOTIFY_PARENT:
    Id = WM_GetId(pMsg->hWinSrc);
    NCode = pMsg->Data.v;
    switch(Id) {

    case ID_BUTTON_0:
    switch(NCode) {
    case WM_NOTIFICATION_RELEASED:
    //-----------------------------------------------------------------------Try one of following block ------------------------------------------------------
    //--------------Another Modal Child creation on top of parent-------------------------------
    hItem= GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0); //Child win creation
    WM_MakeModal(hItem);

    //-------------OR evenModal Msgbox()--------------------------------------------------------
    MESSAGEBOX_Create("This is Modal type", "Error",GUI_MESSAGEBOX_CF_MODAL);


    break;
    }
    break;
    }

    }

    Just recheked today code behaviour but I am getting WM_NOTIFICATION_RELEASED notification in both cases with and without use of WM_MakeModal();

    I do not recall what change made it to work it right !

    Hello there,

    I have successfully created VNC server on "Stm32F407G-Disc1"(with its Ethernet daughter board) with help of "Free RTOS 7.1.1" + "LWIP 1.3.1". + "STEmWin522"

    Everything is working fine although On PC(Viewer side) I get blurred/distorted image, edges of windows and text fonts are unreadable please see attachment/image.

    Does any one has any idea what im I doing wrong?

    Thanks in advance


    [Blocked Image: http://i67.tinypic.com/2l6z3m.jpg]

    Hello there,

    I am facing some issue with setting default skin for multipage widget.

    When I use "MULTIPAGE_SetDefaultSkin(MULTIPAGE_SKIN_FLEX);" after GUI_Init() in main; My program create hardfault after changing page.
    without default skinflex setting(Classic skin) widget works fine and allows to change page.


    Although MULTIPAGE_SetSkin(hItem,MULTIPAGE_SKIN_FLEX); does set skin and it dosen't crash either. For now it helped..

    But would like to know if this is known bug? Can somebuddy try to recreate this fault?

    I am using STemWinLibrary522

    Thanks

    dialogHandle = CreateFramewin(); Return window handle/handle of frame window
    In call back routine I was using pMsg->hWin; handle .. which would be same as returned by CreateFramewin();

    WM_MakeModal(); Needs hParent and not window handle.

    following code inserted in initialisation of dialog works..
    _cbDialog(WM_MESSAGE * pMsg) {
    WM_HWIN hItem;

    switch (pMsg->MsgId)
    {
    case WM_INIT_DIALOG:
    hItem = WM_GetDialogItem(pMsg->hWin, ID_LISTVIEW_0); // ID_LISTVIEW_0 is ID of child on created window
    hItem = WM_GetParent(hItem);
    WM_MakeModal(hItem);

    break;
    }

    }

    //-------------------------------------------------------------------------------------
    This brings to question on user manual.. ?( Should it be Parent handle and not Window handle?

    WM_MakeModal()
    Description
    This function makes the window work in modal mode. This means pointer device
    input will only be sent to the modal window or a child window of it if the input position
    is within the rectangle of the modal window.
    Prototype
    void WM_MakeModal(WM_HWIN hWin);

    Parameter Description
    hWin Window handle.

    Hello,

    I am afraid I did not get an answer from ST by now. So the problem will likely still exist.

    Best regards,
    Adrian

    Hello

    I have come across same issue I don't receive WM_NOTIFICATION_RELEASED events when WM_MakeModal() is used. On contrary I do get WM_NOTIFICATION_RELEASED notification without use of WM_MakeModal() property.

    I am using "STemWin_Library_V1.1.2" version from ST and it has "STemWinLibrary522"(Segger 5.22) version of Segger.

    Current wayaround 8) I am using is when using GUI_CreateDialogBox for creating dialog/pop up window is to use correct parent window handle. By default(if using GUI builder) it uses WM_HBKWIN macro to get background window.

    hWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, hParentWin, 0, 0); // 4th Arg"WM_HBKWIN" replace with your current window handle "hParentWin" on top of wthich you want to create pop up win

    This way even if I touch window in background my pop up does not get behind it floats on top, which is serving me for now well..

    Regards