mick和jacen发的一个扩展跳转界面到ide的方法
By
admin
at 2018-04-27 • 0人收藏 • 1397人看过
//我是一个整理群聊精华的小行家 O(∩_∩)O~ import winex; import win.ui; import ide; var hwndStatusBar = winex.findEx(ide.getMainHwnd(),,"Afx\:RibbonStatusBar",""); win.modifyStyle(hwndStatusBar,,0x2000000/*_WS_CLIPCHILDREN*/); /*DSG{{*/ var winform = win.form(text="跳转到指定行";right=175;bottom=23;border="none";exmode="none";max=false;min=false;mode="child";parent=hwndStatusBar) winform.add( button={cls="button";text="跳转";left=120;top=0;right=176;bottom=24;z=2}; edit={cls="edit";left=0;top=0;right=120;bottom=24;edge=1;z=1} ) /*}}*/ winform.button.oncommand = function(id,event){ ide.gotoLine(winform.edit.text) } var cxprev; winform.addtimer( 100,function(hwnd,msg,id,tick){ var x,y,cx,cy = win.getPos(hwndStatusBar) if(cx!=cxprev){ winform.setPos(cx-402,0) cxprev = cx; winform.redraw(); } } ) winform.show() win.loopMessage();
效果就是插入这个界面到ide的底部状态栏里了...
登录后方可回帖