c++ - MFC Statusbar - Making text a link with button behavior -



c++ - MFC Statusbar - Making text a link with button behavior -

im trying utilize status bar in mfc application described here

i managed add together items status bar described in link. there's nil post here code reference 1:1 in link. want create text link, when clicked, i'll grab callback , something. couldn't find how it, yet i've seen in apps before.

i utilize similar, need derive own class cstatusbar. a) place next code @ top of derived statusbar.cpp

begin_message_map(cmystatusbar, cstatusbar) on_wm_lbuttonup() end_message_map()

b) add together next declaration cmystatusbar in derived statusbar.h

afx_msg void onlbuttonup(uint nflags, cpoint point);

c) place next code later on in derived statusbar.cpp

void cmystatusbar::onlbuttonup(uint nflags, cpoint point) { crect rc; int npaneindex = commandtoindex(id_indicator_time); getstatusbarctrl().getrect(npaneindex, &rc); if (rc.ptinrect(point)) { // } }

c++ mfc statusbar

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -