锘??xml version="1.0" encoding="utf-8" standalone="yes"?>C++鍗氬-澶笅http://www.9087120.com/aaxron/璁板綍淇?#29723;?#37928;?#37719;?#29825;? zh-cnTue, 26 Mar 2019 14:30:04 GMTTue, 26 Mar 2019 14:30:04 GMT60spring 瀹樻柟?#31493;?#27975;鍦板潃锛圫pring Framework 3.2.x&Spring Framework 4.0.x锛?/title><link>http://www.9087120.com/aaxron/archive/2019/02/12/216238.html</link><dc:creator>澶笅</dc:creator><author>澶笅</author><pubDate>Tue, 12 Feb 2019 03:44:00 GMT</pubDate><guid>http://www.9087120.com/aaxron/archive/2019/02/12/216238.html</guid><wfw:comment>http://www.9087120.com/aaxron/comments/216238.html</wfw:comment><comments>http://www.9087120.com/aaxron/archive/2019/02/12/216238.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.9087120.com/aaxron/comments/commentRss/216238.html</wfw:commentRss><trackback:ping>http://www.9087120.com/aaxron/services/trackbacks/216238.html</trackback:ping><description><![CDATA[<p>spring 瀹樻柟?#31493;?#27975;鍦板潃锛圫pring Framework 3.2.x&Spring Framework 4.0.x锛?br />2017骞?2鏈?4鏃?15:53:59 </p> <p>SPRING瀹樻柟缃戠珯鏀圭増鍚?#38171;?#23524;?#29825;?#38318;芥槸閫氳繃 Maven鍜孏radle?#31493;?#27975;锛屽涓嶄娇鐢Maven鍜孏radle寮鍙戦?#22317;鐨?#38171;屼笅?#27975;?#27688;闈炲父楹荤儲锛屼笅缁欏嚭Spring Framework jar瀹樻柟鐩存帴?#31493;?#27975;璺緞:</p> <p><a href="http://repo.spring.io/libs-release-local/org/springframework/spring/">http://repo.spring.io/libs-release-local/org/springframework/spring/</a></p> <p> </p> <p>spring 4.0.x(Spring Framework 4.0.5)?#31493;?#27975;</p> <p><a href="http://repo.spring.io/libs-release-local/org/springframework/spring/4.0.5.RELEASE/spring-framework-4.0.5.RELEASE-dist.zip">http://repo.spring.io/libs-release-local/org/springframework/spring/4.0.5.RELEASE/spring-framework-4.0.5.RELEASE-dist.zip</a></p> <p> </p> <p>spring 3.2.x锛圫pring Framework 3.2.9锛変笅?#27975;锛?/p> <p><a href="http://repo.spring.io/libs-release-local/org/springframework/spring/3.2.9.RELEASE/spring-framework-3.2.9.RELEASE-dist.zip">http://repo.spring.io/libs-release-local/org/springframework/spring/3.2.9.RELEASE/spring-framework-3.2.9.RELEASE-dist.zip</a></p> <p> </p> <p> </p> <p>spring 3.2.x锛圫pring Framework 3.2.4锛変笅?#27975;锛?/p> <p><a href="http://repo.springsource.org/libs-release-local/org/springframework/spring/3.2.4.RELEASE/spring-framework-3.2.4.RELEASE-dist.zip">http://repo.springsource.org/libs-release-local/org/springframework/spring/3.2.4.RELEASE/spring-framework-3.2.4.RELEASE-dist.zip</a></p> <p><br /> </p> <p>鍙spring security?#31493;?#27975;璺緞锛?/p> <p><a href="http://repo.spring.io/libs-release-local/org/springframework/security/spring-security/">http://repo.spring.io/libs-release-local/org/springframework/security/spring-security/</a></p> <p><a href="http://repo.spring.io/libs-release-local/org/springframework/security/spring-security/3.2.4.RELEASE/spring-security-3.2.4.RELEASE-dist.zip">http://repo.spring.io/libs-release-local/org/springframework/security/spring-security/3.2.4.RELEASE/spring-security-3.2.4.RELEASE-dist.zip</a></p><img src ="http://www.9087120.com/aaxron/aggbug/216238.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.9087120.com/aaxron/" target="_blank">澶笅</a> 2019-02-12 11:44 <a href="http://www.9087120.com/aaxron/archive/2019/02/12/216238.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇?#29825;?/a></div>]]></description></item><item><title>spring婧愮爜鍒嗘瀽锛?锛堿nnotationMethodHandlerAdapterhttp://www.9087120.com/aaxron/archive/2018/04/11/215585.html澶笅澶笅Wed, 11 Apr 2018 08:40:00 GMThttp://www.9087120.com/aaxron/archive/2018/04/11/215585.htmlhttp://www.9087120.com/aaxron/comments/215585.htmlhttp://www.9087120.com/aaxron/archive/2018/04/11/215585.html#Feedback0http://www.9087120.com/aaxron/comments/commentRss/215585.htmlhttp://www.9087120.com/aaxron/services/trackbacks/215585.htmlpublic class AnnotationMethodHandlerAdapter extends WebContentGenerator
        
implements HandlerAdapter, Ordered, BeanFactoryAware {
    
//

    
public ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        
return invokeHandlerMethod(request, response, handler);
    }

    
protected ModelAndView invokeHandlerMethod(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        ServletHandlerMethodResolver methodResolver 
= getMethodResolver(handler);
        Method handlerMethod 
= methodResolver.resolveHandlerMethod(request);
        ServletHandlerMethodInvoker methodInvoker 
= new ServletHandlerMethodInvoker(methodResolver);
        ServletWebRequest webRequest 
= new ServletWebRequest(request, response);
        ExtendedModelMap implicitModel 
= new BindingAwareModelMap();

        Object result 
= methodInvoker.invokeHandlerMethod(handlerMethod, handler, webRequest, implicitModel);
        ModelAndView mav 
=
                methodInvoker.getModelAndView(handlerMethod, handler.getClass(), result, implicitModel, webRequest);
        methodInvoker.updateModelAttributes(handler, (mav 
!= null ? mav.getModel() : null), implicitModel, webRequest);
        
return mav;
    }

    
public ModelAndView getModelAndView(Method handlerMethod, Class<?> handlerType, Object returnValue,
            ExtendedModelMap implicitModel, ServletWebRequest webRequest) 
throws Exception {}
}


鍏朵粬
public final class Method extends Executable {
    
public Object invoke(Object obj, Object args)
    
throws IllegalAccessException, IllegalArgumentException,InvocationTargetException
    {
        
if (!override) {
            
if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
                Class
<?> caller = Reflection.getCallerClass();
                checkAccess(caller, clazz, obj, modifiers);
            }
        }
        MethodAccessor ma 
= methodAccessor;             // read volatile
        if (ma == null) {
            ma 
= acquireMethodAccessor();
        }
        
return ma.invoke(obj, args);
    }
}
public class ModelMap extends LinkedHashMap<String, Object> {}

public abstract class AbstractView extends WebApplicationObjectSupport implements View, BeanNameAware {
    
/**
     * Prepares the view given the specified model, merging it with static
     * attributes and a RequestContext attribute, if necessary.
     * Delegates to renderMergedOutputModel for the actual rendering.
     * 
@see #renderMergedOutputModel
     
*/
    @Override
    
public void render(Map<String, ?> model, HttpServletRequest request, HttpServletResponse response) throws Exception {
        
if (logger.isTraceEnabled()) {
            logger.trace(
"Rendering view with name '" + this.beanName + "' with model " + model +
                
" and static attributes " + this.staticAttributes);
        }

        Map
<String, Object> mergedModel = createMergedOutputModel(model, request, response);
        prepareResponse(request, response);
        renderMergedOutputModel(mergedModel, getRequestToExpose(request), response);
    }
}
浠爜锛?br />

澶笅 2018-04-11 16:40 鍙戣璇?#29825;?/a>
]]>
spring婧愮爜鍒嗘瀽锛?锛塂ispatcherServlethttp://www.9087120.com/aaxron/archive/2018/04/11/215584.html澶笅澶笅Wed, 11 Apr 2018 08:39:00 GMThttp://www.9087120.com/aaxron/archive/2018/04/11/215584.htmlhttp://www.9087120.com/aaxron/comments/215584.htmlhttp://www.9087120.com/aaxron/archive/2018/04/11/215584.html#Feedback0http://www.9087120.com/aaxron/comments/commentRss/215584.htmlhttp://www.9087120.com/aaxron/services/trackbacks/215584.htmlpublic class DispatcherServlet extends FrameworkServlet {
    
private List<HandlerMapping> handlerMappings;

    
protected void doService(HttpServletRequest request, HttpServletResponse response) throws Exception {
        doDispatch(request, response);
    }
    
    
protected void doDispatch(HttpServletRequest request, HttpServletResponse response) throws Exception {
        HttpServletRequest processedRequest 
= request;
        HandlerExecutionChain mappedHandler 
= null;
        
boolean multipartRequestParsed = false;
        
try {
            ModelAndView mv 
= null;
            Exception dispatchException 
= null;
            
try {
                processedRequest 
= checkMultipart(request);
                multipartRequestParsed 
= (processedRequest != request);

                
// Determine handler for the current request.  //鏄犲皠澶勭悊鍣?/span>
                mappedHandler = getHandler(processedRequest); //HandlerExecutionChain
                if (mappedHandler == null || mappedHandler.getHandler() == null) {
                    noHandlerFound(processedRequest, response);
                    
return;
                }

                
// Determine handler adapter for the current request. //閫傞厤澶勭悊鍣?/span>
                HandlerAdapter ha = getHandlerAdapter(mappedHandler.getHandler());

                
if (!mappedHandler.applyPreHandle(processedRequest, response)) {
                    
return;
                }

                
// Actually invoke the handler. 
                mv = ha.handle(processedRequest, response, mappedHandler.getHandler());

                applyDefaultViewName(processedRequest, mv); 
                mappedHandler.applyPostHandle(processedRequest, response, mv);
            }

            
//娓叉煋瑙嗗浘
            processDispatchResult(processedRequest, response, mappedHandler, mv, dispatchException); 
        }
        
catch (Exception ex) {
            triggerAfterCompletion(processedRequest, response, mappedHandler, ex);
        }
        
finally {
        }
    }
    
private void processDispatchResult(HttpServletRequest request, HttpServletResponse response,
        HandlerExecutionChain mappedHandler, ModelAndView mv, Exception exception) 
throws Exception {
        
// Did the handler return a view to render?
        if (mv != null && !mv.wasCleared()) {
            render(mv, request, response);
        }
        
else {
            
if (logger.isDebugEnabled()) {
                logger.debug(
"Null ModelAndView returned to DispatcherServlet with name '" + getServletName() +
                        
"': assuming HandlerAdapter completed request handling");
            }
        }
        
if (mappedHandler != null) {
            mappedHandler.triggerAfterCompletion(request, response, 
null);
        }
    }
    
    
protected void render(ModelAndView mv, HttpServletRequest request, HttpServletResponse response) throws Exception {
        
// Determine locale for request and apply it to the response.
        Locale locale = this.localeResolver.resolveLocale(request);
        response.setLocale(locale);

        View view;
        
if (mv.isReference()) {
            
// We need to resolve the view name.
            view = resolveViewName(mv.getViewName(), mv.getModelInternal(), locale, request);
            
if (view == null) {
                
throw new ServletException("Could not resolve view with name '" + mv.getViewName() +
                        
"' in servlet with name '" + getServletName() + "'");
            }
        }
        
else {
            
// No need to lookup: the ModelAndView object contains the actual View object.
            view = mv.getView();
            
if (view == null) {
                
throw new ServletException("ModelAndView [" + mv + "] neither contains a view name nor a " +
                        
"View object in servlet with name '" + getServletName() + "'");
            }
        }

        
// Delegate to the View object for rendering.
        if (logger.isDebugEnabled()) {
            logger.debug(
"Rendering view [" + view + "] in DispatcherServlet with name '" + getServletName() + "'");
        }
        
try {
            view.render(mv.getModelInternal(), request, response);
        }
        
catch (Exception ex) {
            logger.debug(
"Error rendering view [" + view + "] in DispatcherServlet with name '" +    getServletName() + "'", ex);
            
throw ex;
        }
}


澶笅 2018-04-11 16:39 鍙戣璇?#29825;?/a>
]]>MoveWindow() SetWindowPos()鐨勫尯鍒?#28051;?#38001;旂郴http://www.9087120.com/aaxron/archive/2017/05/17/214944.html澶笅澶笅Wed, 17 May 2017 10:56:00 GMThttp://www.9087120.com/aaxron/archive/2017/05/17/214944.htmlhttp://www.9087120.com/aaxron/comments/214944.htmlhttp://www.9087120.com/aaxron/archive/2017/05/17/214944.html#Feedback0http://www.9087120.com/aaxron/comments/commentRss/214944.htmlhttp://www.9087120.com/aaxron/services/trackbacks/214944.htmlMoveWindow() SetWindowPos()鐨勫尯鍒?#28051;?#38001;旂郴
杞嚜

鍏堢湅MoveWindow()鍑芥暟锛?#37922;?#27996;?#37824;?#37721;樼獥鍙?#37928;?#28003;?#32515;?#37724;屽昂瀵?#38171;屽浜?#26916;跺眰?#29541;鍙?#38171;屾寜鐓睆骞?#28725;?#27067;?#28051;?#23480;?#28051;?#29785;?#38171;屽浜?#28699;愮獥鍙?#38171;屽?#27407;榻?#28051;?#37910;剁獥鍙?#37928;勫乏涓?#29785;掋?br />
BOOL MoveWindow( HWND hWnd,int x, int y, int nWidth, int nHeight,BOOL bRepaint = TRUE);
鍙傛暟hWnd琛?#32448;虹獥鍙?#37721;焺锛?br />鍙傛暟x,y琛?#32448;虹獥鍙?#37928;勫乏涓?#29785;?#29863;风偣锛?br />鍙傛暟nwidth锛宯Height 琛?#32448;虹獥鍙?#26946;樺害鍜?#28729;藉害锛?br />鏈鍚?#28051;涓猙Repaint琛?#32448;烘槸鍚?#32468;?#37719;?#38322;?#32513;?#37510;?#28051;true鏃剁?#33636;?#29110;細绔?#37719;?#37721;?#38315;乄M_PAINT鍒扮獥鍙?#32459;?#25652;?#38171;?#28028;氳皟鐢UpdateWindow()鍑芥暟锛?#38171;?#28051;篺alse鏃?#28051;嶄?#27692;?#25120;敓浠讳綍?#34987;鍨?#37928;?#38322;?#32513;樻?#23940;綔銆?br />
MoveWindow?#32048;缁欑獥鍙?#37721;?#38315;乄M_WINDOWPOSCHANGING锛學M_WINDOWPOSCHANGED锛學M_MOVE锛學M_SIZE鍜學M_NCCALCSIZE娑堟伅銆?br />
?#24116;?#31493;鏉湅SetWindowPos(),杩?#28051;?#37713;芥?#26495;?#23678;牱鐢?#37833;?#28729;炵?#25198;獥鍙?#32457;诲姩鎿嶄綔锛屽彧涓嶈繃鍔熻?#33445;洿澶?#28051;?#20579;銆?br />
BOOL SetWindowPos(HWND hWnd,
const CWnd* pWndInsertAfter, int x, int y,int cx, int cy, UINT nFlags);
绗?#28051;涓?#37721;傛暟?#27128;?#29541;鍙?#37721;焺锛?br />绗?#27996;?#28051;?#37721;傛暟?#27128;?#29541;鍙?#37928;刏 order锛屽氨?#27128;鏈?#28598;?#28051;獥鍙?#37827;?#38171;?#37832;獥鍙?#37828;?#32448;?#37928;?#26916;?#25652;?#38171;?#37832;涓?#38344;?#37812;栬?#37832;?#31493;闈?#38171;屽彲閫?#37721;傛暟鏈?HWND_BOTTOM,HWND_NOTOPMOST,HWND_TOP,HWND_TOPMOST.
HWND_BOTTOM锛氬皢?#29541;鍙?#32515;?#27996;嶼搴?#37928;勫閮?#37510;傚?#20635;灉鍙傛暟hWnd鏍?#29831;?#27996;?#28051;涓?#26916;跺眰?#29541;鍙?#38171;屽?#27409;獥鍙?#28598;?#37720;?#26916;剁骇浣?#32515;?#38171;?#39582;?#28051;?#29722;?#32515;?#37734;?#37711;朵粬?#29541;鍙?#37928;勫閮?#37510;?nbsp; 銆銆 
HWND_NOTOPMOST锛氬皢?#29541;鍙?#32515;?#27996;庢墍鏈?#38344;?#26916;跺眰?#29541;鍙?#28052;?#28051;?#38171;?#37719;?#37734;?#37813;鏈?#26916;跺眰?#29541;鍙?#28052;?#37722;?#38171;?#37510;傚?#20635;?#28357;獥鍙?#23480;?#32513;忔槸闈?#26916;跺眰?#29541;鍙?#37714;?#29831;?#37837;?#36423;?#28051;?#29863;?#28003;?#37922;?#37510;?nbsp; 銆銆 
HWND_TOP:?#30370;?#29541;鍙?#32515;?#27996;嶼搴?#37928;?#26916;?#38318;?#37510;?nbsp; 銆銆 
HWND_TOPMOST:?#30370;?#29541;鍙?#32515;?#27996;庢墍鏈?#38344;?#26916;跺眰?#29541;鍙?#28052;?#28051;?#37510;?#37719;娇?#29541;鍙?#37832;?#29722;縺娲荤獥鍙?#28052;皢淇?#37816;?#26916;剁骇浣?#32515;?#37510;?nbsp;
?#24116;?#31493;鏉洓涓?#37721;傛暟?#27128;?#29541;鍙?#37928;?#28003;?#32515;?#37724;屽昂瀵?#37510;?br />鏈鍚?#28051;涓?#37721;傛暟nFlags?#27128;?#29541;鍙?#37828;?#32448;烘柟寮?#37928;?#37837;?#36423;?#38171;?#26473;?#28051;?#37721;傛?#26495;緢澶?#38171;屽彲浠?#32513;勫悎?#23047;鐢?#38171;?#29831;?#32513;嗗?#20633;笅锛?br />SWP_ASNCWINDOWPOS锛氬?#20635;?#28358;皟鐢?#26473;?#32459;?#28051;?#37815;?#37832;夌獥鍙?#38171;岀?#33636;?#29110;?#27692;鎷?#37832;夌獥鍙?#37928;勭?#36328;鍙戝嚭?#28214;?#30512;銆?#26473;欏氨叉?#30367;鐢?#32510;跨鍦?#37711;朵粬绾跨澶勭悊?#28214;?#30512;鐨?#37827;跺?#37721;戠敓姝婚銆?nbsp; 銆銆
SWP_DEFERERASE锛氶?#21449;浜?#37922;焀M_SYNCPAINT娑堟伅銆?nbsp; 銆銆
SWP_DRAWFRAME锛氬湪?#29541;鍙?#37723;洿鐢?#28051;涓竟妗?#38171;?#28729;氫箟鍦獥鍙被鎻?#26473;?#28051;?#38171;?#37510;?nbsp; 銆銆
SWP_FRAMECHANGED锛?#32513;欑獥鍙?#37721;?#38315;乄M_NCCALCSIZE娑堟伅锛?#37719;娇?#29541;鍙昂瀵告病鏈?#37824;?#37721;?#28052;熶?#27692;彂閫?#29831;?#23057;堟伅銆傚?#20635;灉鏈?#37816;?#28729;氳繖涓?#37837;?#36423;?#38171;屽彧鏈?#37734;?#37824;?#37721;?#27996;嗙獥鍙昂瀵?#37827;?#37813;?#37721;?#38315;乄M_NCCALCSIZE銆?nbsp;
SWP_HIDEWINDOW;闅愯?#24533;獥鍙?#37510;?nbsp;
SWP_NOACTIVATE锛?#28051;縺娲荤獥鍙?#37510;傚?#20635;灉鏈?#29825;?#32515;?#37837;?#36423;?#38171;屽?#27409;獥鍙?#29722;縺娲?#38171;?#39582;?#29722;?#29825;?#32515;?#37714;板?#26421;粬鏈楂樼骇?#29541;鍙?#37812;?#38344;?#37832;楂樼骇缁?#37928;?#26916;?#38318;?#38171;堟牴鎹?#37721;傛暟hWndlnsertAfter璁?#32515;?#38171;?#37510;?nbsp;
SWP_NOCOPYBITS锛?#23059;?#38340;?#28729;?#37812;峰尯鐨?#37813;鏈夊唴瀹?#37510;傚?#20635;灉鏈?#29825;?#32515;?#29831;?#37837;?#36423;?#38171;?#28729;?#37812;峰尯鐨?#37832;?#37825;堝唴瀹?#29722;?#28103;?#28699;?#39582;?#28051;?#37734;獥鍙昂瀵?#37831;存?#26495;拰閲?#28729;?#28003;?#37722;庢嫹璐濆洖瀹?#37812;峰尯銆?nbsp;
SWP_NOMOVE锛?#32513;存?#20344;綋鍓嶄綅缃?#38171;堝?#30028;暐X鍜孻鍙傛暟锛?#37510;?nbsp; 銆銆
SWP_NOOWNERZORDER锛?#28051;?#37824;?#37721;z搴?#28051;?#37928;?#37813;鏈夎呯獥鍙?#37928;?#28003;?#32515;?#37510;?nbsp;
SWP_NOREDRAW:涓?#38322;?#37922;?#37824;?#37721;?#37928;勫唴瀹?#37510;傚?#20635;灉璁?#32515;?#27996;?#26473;?#28051;?#37837;?#36423;?#38171;屽垯涓?#37721;戠敓浠讳綍閲?#37922;诲姩浣?#37510;?#38315;?#37922;?#27996;?#28729;?#37812;峰尯鍜?#38344;?#28729;?#37812;峰尯锛堝?#21614;嫭鏍囬?#27195;鍜屾?#27692;姩鏉?#38171;?#37724;屼换?#32141;鐢?#27996;庣獥鍥炵?#35826;姩鑰?#38343;嚭鐨勭?#21057;獥鍙?#37928;?#37813;鏈?#38318;?#37714;?#37510;傚?#20635;灉璁?#32515;?#27996;?#26473;?#28051;?#37837;?#36423;?#38171;屽簲鐢?#32459;?#25652;?#36423;?#26916;?#37828;庣鍦C娇?#29541;鍙?#37827;?#37825;?#39582;?#38322;?#37922;荤獥鍙?#37928;?#28000;讳綍閮?#37714;?#37724;岀?#21057;獥鍙渶瑕?#38322;?#37922;?#37928;?#38318;?#37714;?#37510;?nbsp;
SWP_NOREPOSITION锛?#28051;SWP_NOOWNERZORDER鏍?#36423;?#37929;?#37722;?#37510;?nbsp; 銆   SWP_NOSENDCHANGING锛氶?#21449;?#29541;鍙帴鏀禬M_WINDOWPOSCHANGING娑堟伅銆?nbsp;
SWP_NOSIZE锛?#32513;存?#20344;綋鍓嶅昂瀵?#38171;堝?#30028;暐cx鍜孋y鍙傛暟锛?#37510;?nbsp;
SWP_NOZORDER锛?#32513;存?#20344;綋鍓峑搴?#38171;堝?#30028;暐hWndlnsertAfter鍙傛暟锛?#37510;?nbsp;
SWP_SHOWWINDOW锛?#37828;?#32448;虹獥鍙?#37510;?br />娉剰浜?#26916;?#38171;?br />?#23047;鐢SetWindowPos()濡傛灉璁?#32515;?#27996;哠WP_SHOWWINDOWS鎴栬匰WP_HIDEWINDOW锛岄偅涔堢獥鍙皢涓嶈兘琚?#32457;诲姩鍜?#37824;?#37721;?#28598;?#28751;?#38171;屾垜?#23047;鐢?#37827;跺氨?#27128;璁?#32515;?#27996;哠WP_SHOWWINDOW,浠庤屽鑷?#28051;嶈兘閲?#32513;?#38003;屾銆?br />
涓?#38000;?#37928;勬?#26055;緝锛?br />涓?#38000;?#38318;兘瀹炵?#25198;?#35826;姩鍜?#37824;?#37721;樼獥鍙?#28598;?#28751;?#37510;?br />
MoveWindow()鍔熻?#33445;?#26055;緝鍗?#28051;锛屽彧?#20824;绉诲姩鍜?#37824;?#37721;樼獥鍙?#28598;?#28751;?#38171;岃孲etWindowPos()鍙?#28000;?#29825;?#32515;?#37831;?#28598;?#37928;勫?#20635;暟锛?#28729;炵幇Zorder鍙?#37828;?#32448;烘柟寮?#37837;?#36423;?#37510;?br />
MoveWindow()鍙?#38315;乄M_WINDOWPOSCHANGING锛學M_WINDOWPOSCHANGED锛學M_MOVE锛學M_SIZE鍜學M_NCCALCSIZE绛?#23057;堟伅鍒扮獥鍙?#38171;孲etWindowPos()鍙?#37721;?#38315;乄M_WINDOWPOSCHANGED娑堟伅鍒扮獥鍙?#37510;傛墍浠?#29831;村?#20635;灉?#28214;瑕?#37721;?#38315;?#37831;?#28598;?#23057;堟伅鏃?#26473;樻槸?#23047;鐢MoveWindow()鐨勫銆?/span>

澶笅 2017-05-17 18:56 鍙戣璇?#29825;?/a>
]]>Xtreme ToolKit 鏃?#36423;?#37818;?#28000;?/title><link>http://www.9087120.com/aaxron/archive/2017/05/16/214936.html</link><dc:creator>澶笅</dc:creator><author>澶笅</author><pubDate>Tue, 16 May 2017 03:06:00 GMT</pubDate><guid>http://www.9087120.com/aaxron/archive/2017/05/16/214936.html</guid><wfw:comment>http://www.9087120.com/aaxron/comments/214936.html</wfw:comment><comments>http://www.9087120.com/aaxron/archive/2017/05/16/214936.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.9087120.com/aaxron/comments/commentRss/214936.html</wfw:commentRss><trackback:ping>http://www.9087120.com/aaxron/services/trackbacks/214936.html</trackback:ping><description><![CDATA[<img style="border-top-color: ; border-left-color: ; border-bottom-color: ; border-right-color: " border="0" alt="" src="http://www.9087120.com/images/cppblog_com/aaxron/2017-05-16_105919.png" width="490" longdesc="" height="357" /><br /><br /><a style="color: " href="/Files/aaxron/OppoTestX.rar">/Files/aaxron/OppoTestX.rar</a><img src ="http://www.9087120.com/aaxron/aggbug/214936.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.9087120.com/aaxron/" target="_blank">澶笅</a> 2017-05-16 11:06 <a href="http://www.9087120.com/aaxron/archive/2017/05/16/214936.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇?#29825;?/a></div>]]></description></item><item><title>MFC 绾跨浠爜鐗囨http://www.9087120.com/aaxron/archive/2016/12/13/214480.html澶笅澶笅Tue, 13 Dec 2016 02:09:00 GMThttp://www.9087120.com/aaxron/archive/2016/12/13/214480.htmlhttp://www.9087120.com/aaxron/comments/214480.htmlhttp://www.9087120.com/aaxron/archive/2016/12/13/214480.html#Feedback0http://www.9087120.com/aaxron/comments/commentRss/214480.htmlhttp://www.9087120.com/aaxron/services/trackbacks/214480.html璨屼技 鎸?#29863;风?#36328; 蹇?#26916;?#37734;?#28051;荤晫闈?#37928;刄I绾跨?#23338;幓鎿嶄綔

UINT UiThreadProcessProtocol(LPVOID lParam)
{
    CCalcPPIView
* view = (CCalcPPIView*)lParam;
    DmcControler
* Dmc = &(view->Dmc);

    
while (1)
    {
        
//AfxTrace("%u \n",GetTickCount());
        Sleep(500);
    } 
    
return 0;
}

CWinThread
* m_ThreadProcessProtocol;
m_ThreadProcessProtocol 
= AfxBeginThread(UiThreadProcessProtocol,this);

void CCalcPPIView::OnBtnRegulate()
{
    
if (m_ThreadProcessProtocol!=NULL) {
        m_ThreadProcessProtocol
->SuspendThread();
        AfxTrace(
"SuspendThread() at %u \n",GetTickCount());
    }
    
    {
        CRegulate dlg(
this);
        dlg.DoModal();
    }
    
if (m_ThreadProcessProtocol!=NULL) {
        m_ThreadProcessProtocol
->ResumeThread();
        AfxTrace(
"ResumeThread() at %u \n",GetTickCount());
    }
}

void CCalcPPIView::CloseDevice(BOOL bUpdateUI )
{
    CCalcPPIView
* view = this;
    AfxTrace(
"CCalcPPIView::CloseDevice() Entry \n");

    Dmc.SetOpened(
0);

    
if (view->m_ThreadProcessProtocol!=NULL) {
        WaitForSingleObject(view
->m_ThreadProcessProtocol->m_hThread,INFINITE);
        view
->m_ThreadProcessPro NULL;
    }
}

 

 



澶笅 2016-12-13 10:09 鍙戣璇?#29825;?/a>
]]>VB Scripthttp://www.9087120.com/aaxron/archive/2016/12/04/214460.html澶笅澶笅Sun, 04 Dec 2016 12:09:00 GMThttp://www.9087120.com/aaxron/archive/2016/12/04/214460.htmlhttp://www.9087120.com/aaxron/comments/214460.htmlhttp://www.9087120.com/aaxron/archive/2016/12/04/214460.html#Feedback0http://www.9087120.com/aaxron/comments/commentRss/214460.htmlhttp://www.9087120.com/aaxron/services/trackbacks/214460.htmlOn Error Resume Next
set oshell = CreateObject("WScript.Shell")
oshell.run 
"http://v.qq.com",0,false
WScript.quit


澶笅 2016-12-04 20:09 鍙戣璇?#29825;?/a>
]]>c++ traits(1)http://www.9087120.com/aaxron/archive/2016/10/14/214333.html澶笅澶笅Fri, 14 Oct 2016 06:18:00 GMThttp://www.9087120.com/aaxron/archive/2016/10/14/214333.htmlhttp://www.9087120.com/aaxron/comments/214333.htmlhttp://www.9087120.com/aaxron/archive/2016/10/14/214333.html#Feedback0http://www.9087120.com/aaxron/comments/commentRss/214333.htmlhttp://www.9087120.com/aaxron/services/trackbacks/214333.html#pragma once
template 
<typename T>  
struct TraitsHelper;

template 
<typename T>  
struct TraitsHelper {  
    
static const bool isPointer = false;  
    
enum {IsPointer = false};
    
bool GetIsPointer()
    {
        
return IsPointer;
    }
};  
template 
<typename T>  
struct TraitsHelper<T*> {  
    
static const bool isPointer = true;  
    
enum {IsPointer = true};
    
bool GetIsPointer()
    {
        
return IsPointer;
    }
};  

//call
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
    
int val = 0;
    
int* pVal = &val;
    TraitsHelper
<int> a;
    TraitsHelper
<int*> b;

    
bool b1 = a.IsPointer;
    
bool b2 = b.IsPointer;

    
bool b3 = a.GetIsPointer();

    
bool b4 = TraitsHelper<int>::IsPointer;
    
bool b5 = TraitsHelper<int*>::IsPointer;


    
return 0;
}


澶笅 2016-10-14 14:18 鍙戣璇?#29825;?/a>
]]>Google Protocol Buffer 瀹夎鍜屼娇鐢?/title><link>http://www.9087120.com/aaxron/archive/2016/09/22/214289.html</link><dc:creator>澶笅</dc:creator><author>澶笅</author><pubDate>Thu, 22 Sep 2016 02:19:00 GMT</pubDate><guid>http://www.9087120.com/aaxron/archive/2016/09/22/214289.html</guid><wfw:comment>http://www.9087120.com/aaxron/comments/214289.html</wfw:comment><comments>http://www.9087120.com/aaxron/archive/2016/09/22/214289.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.9087120.com/aaxron/comments/commentRss/214289.html</wfw:commentRss><trackback:ping>http://www.9087120.com/aaxron/services/trackbacks/214289.html</trackback:ping><description><![CDATA[<div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> -->Google Protocol Buffer 瀹夎鍜屼娇鐢?br /> ?#31493;?#27975;锛?br /> https://codeload.github.com/google/protobuf/<br /> <br /> ?#28229;README.md<br /> <br /> For non-C++ users, the simplest way to install the protocol compiler is to<br /> download a pre-built binary from our release page:<br /> <span style="color: #800000; font-weight: bold; ">[</span><span style="color: #800000; ">https://github.com/google/protobuf/releases</span><span style="color: #800000; font-weight: bold; ">]</span><br /> <br /> <br /> ?#31493;?#27975;C++鐨勭増鏈?#38171;?br /> https://github.com/google/protobuf/releases<br /> <br /> 杩?#37711;?#38171;歱rotobuf-3.0.2\cmake 鐩綍<br /> 鐢cmake 澶勭悊缂?#29831;?br /> <br /> 缂?#29831;戦粯璁?#37928;?#28000;爜鐢?#37812;愭槸MT锛?#28051;槸MD<br /> <br /> 鍙渶瑕?涓?#23480;?#32459;?#38171;?br /> libprotobuf鍜宲rotoc<br /> <br /> 缂?#29831;?#28729;屾?#24874;箣鍚?#38171;氭妸include鐩綍鎷?#29840;濆嚭鏉?br /> <br /> 鏂板缓SearchRequest.proto鏂?#28000;?br /> message SearchRequest <br /> {<br />   required string query = 1<span style="color: #008000; ">;<br /> </span>  optional int32 page_number = 2<span style="color: #008000; ">;</span><span style="color: #008000; ">// Which page number do we want?</span><span style="color: #008000; "><br /> </span>  optional int32 result_per_page = 3<span style="color: #008000; ">;</span><span style="color: #008000; ">// Number of results to return per page.</span><span style="color: #008000; "><br /> </span>}<br /> <br /> protoc.exe --cpp_out ./ SearchRequest.poto</div> <div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->#include "stdafx.h"<br />#include "SearchRequest.pb.h"<br /><br /><span style="color: #008000; ">//</span><span style="color: #008000; ">#pragma comment(lib,"../Debug/MT/libprotobufd.lib")</span><span style="color: #008000; "><br /></span>#pragma comment(lib,"../Debug/MD/libprotobufd.lib")<br /><br /><span style="color: #0000FF; ">int</span> _tmain(<span style="color: #0000FF; ">int</span> argc, _TCHAR* argv[])<br />{<br />    SearchRequest sr;<br /><br />    sr.set_query("abcd",5);<br />    sr.set_page_number(0x1001);<br />    sr.set_result_per_page(0x1002);<br /><br />    std::<span style="color: #0000FF; ">string</span> data  = sr.SerializeAsString();<br /><br />    SearchRequest sr2;<br /><br />    sr2.ParseFromString(data);<br /><br />    <span style="color: #0000FF; ">return</span> 0;<br />}</div> <img src ="http://www.9087120.com/aaxron/aggbug/214289.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.9087120.com/aaxron/" target="_blank">澶笅</a> 2016-09-22 10:19 <a href="http://www.9087120.com/aaxron/archive/2016/09/22/214289.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇?#29825;?/a></div>]]></description></item><item><title>C# invoke,BeginInvoke,EndInvokehttp://www.9087120.com/aaxron/archive/2016/09/08/214261.html澶笅澶笅Thu, 08 Sep 2016 02:16:00 GMThttp://www.9087120.com/aaxron/archive/2016/09/08/214261.htmlhttp://www.9087120.com/aaxron/comments/214261.htmlhttp://www.9087120.com/aaxron/archive/2016/09/08/214261.html#Feedback0http://www.9087120.com/aaxron/comments/commentRss/214261.htmlhttp://www.9087120.com/aaxron/services/trackbacks/214261.html 

C# invoke,BeginInvoke,EndInvoke
鍦?#28598;氱?#36328;?#23340;?#26667;涓?#38171;屾垜浠?#32513;忓父瑕?#37734;?#23480;?#28003;?#32510;跨涓?#37720;?#37831;存?#25198;晫闈?#37828;?#32448;?#38171;岃?#37734;?#28598;氱?#36328;涓?#37929;存帴?#30367;鐢?#37923;?#38344;?#37818;?#28000;?#37928;勬柟娉曟槸閿?#29831;?#37928;勫?#27693;硶锛Invoke 鍜?nbsp;BeginInvoke ?#27688;?#27128;涓?#27996;?#29785;?#37712;?#26473;?#28051;?#38338;?#27199;屽嚭?#24135;鐨?#38171;屼娇浣?#37734;?#28598;氱?#36328;涓?#28729;?#37711;?#37928;?#37831;存?#25198;晫闈?#37828;?#32448;?#37510;?br />姝?#32429;?#37928;勫?#27693;?#26335;槸灏嗗伐浣?#32510;跨涓?#23057;?#37721;?#37831;存?#25198;晫闈?#37928;?#28000;爜灏佽涓?#28051;涓柟娉?#38171;?#38315;氳繃 Invoke 鎴栬?nbsp;BeginInvoke 鍘昏皟鐢?#38171;?#28051;?#38000;?#37928;勫尯鍒氨?#27128;涓涓?#28725;?#38007;?#23480;?#28003;?#32510;跨?#23340;?#22794;锛岃屽彟澶?#28051;涓?#37714;?#28051;嶄細銆?br />鍐?#28051;?#28051;畝鍗曚緥瀛?#29831;存?#24221;笅?#23047;鐢柟娉?姣斿浣?#37734;?#37722;姩涓涓?#32510;跨,鍦?#32510;跨鐨勬柟娉?#28051;兂鏇存?#25198;獥浣?#28051;?#37928;?#28051;涓猅extBox.. 

using System.Threading;
//鍚姩涓涓?#32510;跨 
Thread thread=new Thread(new ThreadStart(DoWork)); 
thread.Start(); 
//绾跨?#26591;娉?nbsp;
private void DoWork() 

    
this.TextBox1.Text="鎴戞槸涓涓?#37826;?#37832;?#22935;?/span>"

濡傛灉浣犲儚涓?#38344;?#37823;嶄綔,鍦VS2005鎴?008閲屾槸?#32048;鏈?#23534;傚父鐨?img src="http://www.9087120.com/Images/dot.gif" alt="" /> 


姝?#32429;?#37928;勫?#27693;?#26335;槸鐢Invoke\BeginInvoke
using System.Threading;
namespace test
{
    
public partial class Form1 : Form
    {
        
public delegate void MyInvoke(string str1,string str2);
        
public Form1()
        {
            InitializeComponent();
        }
        
public void DoWork()
        {
            MyInvoke mi 
= new MyInvoke(UpdateForm);
            
this.BeginInvoke(mi, new Object[] {"鎴戞槸鏂?#37832;?#22935;?/span>","haha"});
        }
        
public void UpdateForm(string param1,string parm2)
        {
            
this.textBox1.Text = param1+parm2;
        }
        
private void button1_Click(object sender, EventArgs e)
        {
            Thread thread 
= new Thread(new ThreadStart(DoWork));
            thread.Start();
        }
    }
}


鐩?#37711;?#29863;勬枡锛欼nvoke 鍜?nbsp;BeginInvoke 鐨勭湡姝?#23057;?#28052;?nbsp;銆?#37734;?#28598;氱?#36328;涓?#28641;備綍?#30367;鐢Winform
Control.BeginInvoke ?#26591;娉?nbsp; Visual Studio 2010Visual Studio 
2010 
鍦?#37714;?#23524;?#37818;?#28000;?#37928;勫?#34425;鍙焺鎵鍦?#32510;跨涓?#23534;傛鎵?#29723;屽鎵?#37510;?br />鍏?#37711;辨柟娉?nbsp;BeginInvoke(Delegate) 鍦?#37714;?#23524;?#37818;?#28000;?#37928;勫?#34425;鍙焺鎵鍦?#32510;跨涓?#23534;傛鎵?#29723;屾寚瀹氬鎵?#37510;?nbsp;
鍏?#37711;辨柟娉?nbsp;BeginInvoke(Delegate,Object[])  鍦?#37714;?#23524;?#37818;?#28000;?#37928;勫?#34425;鍙焺鎵鍦?#32510;跨涓?#38171;?#37922;?#37816;?#28729;?#37928;勫?#20635;?#26495;?#20635;鎵?#29723;屾寚瀹氬鎵?#37510;?nbsp;
public Object EndInvoke(IAsyncResult asyncResult)
鍙傛暟锛歛syncResult ?#34987;鍨?#38171;歋ystem.IAsyncResult 
IAsyncResult锛?#29723;?#32448;虹壒瀹?#37928;勮皟鐢?#23534;傛鎿嶄綔锛?#37734;皟鐢?nbsp;BeginInvoke 鏃?#26473;斿洖銆?nbsp;

 



澶笅 2016-09-08 10:16 鍙戣璇?#29825;?/a>
]]>
տ3
<center id="iceyg"><tr id="iceyg"></tr></center>
<noscript id="iceyg"></noscript>
<center id="iceyg"></center>
<noscript id="iceyg"></noscript>
<noscript id="iceyg"></noscript>
<center id="iceyg"><tr id="iceyg"></tr></center>
<noscript id="iceyg"></noscript>
<center id="iceyg"></center>
<noscript id="iceyg"></noscript>
<noscript id="iceyg"></noscript>