how send a message with WM_DRAWITEM message?
heres my actual code on parent window:

case WM_DRAWITEM:
                {
                    DRAWITEMSTRUCT *test=(DRAWITEMSTRUCT*) lParam;
                    /*if(test->CtlType==ODT_MENU)
                    {
                        MENUITEMINFO menuInfo;
                        menuInfo.cbSize = sizeof(MENUITEMINFO);
                        menuInfo.fMask=MIIM_DATA;
                        if(GetMenuItemInfo((HMENU)test->hwndItem,(UINT) test->itemID, TRUE, &menuInfo )!=0)
                        {
                            Menu *mMenu = (Menu *) menuInfo.dwItemData;
                            if(mMenu!=NULL)
                                if(mMenu->DrawItem!=NULL)
                                    //mMenu->DrawItem();
                                else
                                {

                                }
                        }

                    }
                    else
                    {
                        SendMessage(test->hwndItem, WM_DRAWITEM, wParam, lParam);
                    }*/
                    if(test->hwndItem!=inst->hwnd)
                        SendMessage(test->hwndItem, WM_DRAWITEM, wParam, lParam);
                    return TRUE;
                }
                break;

i did some tests and i notice if i take off these message, the timer works normaly. so, maybe, i have mistake something here.
i need some advices

i did another test. if i comment all message, the error never happens. so i'm doing some error on sending the WM_DRAWITEM message.
is there another way for send it?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.