visual c++ - In MFC how to increase the time tooltips remain Visible -


i using below code create tooltips.

m_ctrltooltip.create(this, tts_alwaystip|tts_balloon);  m_ti.cbsize = sizeof(toolinfo); m_ti.uflags = ttf_idishwnd|ttf_track|ttf_transparent|ttf_absolute; m_ti.hwnd = m_hwnd; m_ti.hinst = null; m_ti.uid = (uint)1; m_ti.lpsztext = "";; m_ti.rect=crect(0,0,0,0);  m_ctrltooltip.setmaxtipwidth(shrt_max); m_ctrltooltip.setdelaytime(ttdt_autopop,5000); m_ctrltooltip.activate(true);  void cladioview::onmousemove(uint nflags, cpoint point) {     static cpoint prevpoint =0;     static cladremoteiomodule* plastio=null;      cladremoteiomodule* plastio1=plastio;     plastio=null;      bool btooltipset = false;     // go thru each module added     position pos = gobjeztouchapp.m_objladderlogic.m_objsysattr.m_objremoteiomodulelst.getheadposition();     for( ; pos != null; )     {         cladremoteiomodule* pio = gobjeztouchapp.m_objladderlogic.m_objsysattr.m_objremoteiomodulelst.getnext(pos);          // rectangle module         crect rectmodule = getiomodulerect(pio->m_nmoduleposition);         if(!rectmodule.ptinrect(pt)) continue;         plastio=pio;         if(plastio1==pio)  break;                if(!m_bmousedown && !m_bplacinganewmodule && prevpoint != pt)         {                        cstring sdescription, spartnumber, saddressrange;             getiomoduletext2(pio,sdescription, spartnumber, saddressrange);             spartnumber.remove('[');             spartnumber.remove(']');              cstring smoduledetails;             smoduledetails.format(_t("position: m%d\nmodule type: %s\nmodule part no: %s"), pio->m_nmoduleposition+1, sdescription,spartnumber);             if(pio->getipsize() > 0)                 smoduledetails+=_t("\ninput address: ")+ pio->getinputadr()+_t(" - ")+pio->getendinputadr();             if(pio->getopsize() > 0)                 smoduledetails+=_t("\noutput address: ")+ pio->getoutputadr()+_t(" - ")+pio->getendoutputadr();              cpoint pp = pt-getscrollposition();             clienttoscreen(&pp);              m_ctrltooltip.updatetiptext(smoduledetails,this,1);             m_ctrltooltip.sendmessage(ttm_trackposition, 0, (lparam)makelparam(pp.x, pp.y+16));//+16 move tooltip stem down             m_ctrltooltip.sendmessage(ttm_trackactivate, true, (lparam)&m_ti);               //to track mouse leave abd there can remove tooltip             trackmouseevent tk;             tk.cbsize = sizeof(tk);             tk.dwflags = tme_leave;             tk.hwndtrack = m_hwnd;             _trackmouseevent(&tk);              prevpoint = pt;              btooltipset = true;         }         btooltipset = true;         break;     }   if(!btooltipset) {     m_ctrltooltip.sendmessage(ttm_trackactivate, false, (lparam)&m_ti);     m_ctrltooltip.updatetiptext("",this,1);     m_ctrltooltip.pop(); } 

the tooltip remains visible few seconds , disappear. find time short read of longer tooltips. there way increase time remain visible?

i tried increase time using setdelaytime function doesn't me.

thanks in advance.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -