当前位置:首页
开发技术指南» 文章正文
    引言:

    摘要: 认识和不认识的朋友们: 中秋快乐! 按钮工厂 ......
    摘要: “今天更新了5部电影”,这个更新几部电影用asp.net怎么动态实现?sql语句怎么写??? ......


如何得到当前窗口的句柄

任何时刻,只有一个当前窗口,那如何得到它的句柄.当前窗口可能不是本进程的窗口.GetActiveWindow行不通吧?

NO.1   作者: i_noname

HWND   hwnd   =   ::GetWindow(NULL);

NO.2   作者: legendhui

GetWindow  
  The   GetWindow   function   examines   the   Z   order   of   the   child   windows   associated   with   the   specified   parent   window   and   retrieves   a   handle   to   the   child   window   at   the   top   of   the   Z   order.    
   
  HWND   GetWindow(  
      HWND   hWnd       //   handle   to   parent   window  
  );  
     
  Parameters  
  hWnd    
  Handle   to   the   parent   window   whose   child   windows   are   to   be   examined.   If   this   parameter   is   NULL,   the   function   returns   a   handle   to   the   window   at   the   top   of   the   Z   order.

NO.3   作者: legendhui

GetForegroundWindow  
  The   GetForegroundWindow   function   returns   a   handle   to   the   foreground   window   (the   window   with   which   the   user   is   currently   working).   The   system   assigns   a   slightly   higher   priority   to   the   thread   that   creates   the   foreground   window   than   it   does   to   other   threads.    
   
  HWND   GetForegroundWindow(VOID)  
   
 

NO.4   作者: yujia120

GetWindow


    摘要: 新建了一个 mfc appwizard 还没加入任何内容,就出现 compiling... 123.cpp e:\我的vc程序\my c++\123\123.cpp(45) : fatal error c1001: internal compiler error (compiler file msc1.cpp, line 1786) please choose the technica......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE