怎么取得句柄

如何取得句柄
在C或C++中,怎么样取得自己的句柄呢? 搜索了一下好像没有多少例子啊

ShowWindow(handle,SW_HIDE)

------解决方案--------------------
探讨
引用:

句柄是外部进行访问时使用的

自己的句柄???

自己还需要句柄吗

直接访问就是了


我就是看了个VB 隐藏窗口例子,他有个me.handle ,所以也想知道在C下没有这样类似的

------解决方案--------------------
句柄 这一概念是MFC里的一个类,MFC有专门的函数来获取窗口句柄。
HWND hwnd;
hwnd=CreateWindow("my own windowshandle","jaycnvip",WS_OVERLAPPEDWINDOW,0,0,600,400,NULL,NULL,hInstance,NULL);
这是用一个句柄变量来保存新创建的窗口句柄。

其它如:
通过窗口标题获取窗口句柄
CWnd *pWnd = FindWindow(_T("#32770"), _T("QQ用户登录"));

CWnd有个成员函数 
HWND GetSafeHwnd( ) const; 

在对话框类的成员函数里用 
HWND hwnd = GetSafeHwnd(); 
得到的hwnd就是句柄了
------解决方案--------------------
LZ指这个?
GetCurrentProcess
The GetCurrentProcess function returns a pseudohandle for the current process. 

HANDLE GetCurrentProcess(VOID)
 
Parameters
This function has no parameters. 

Return Values
The return value is a pseudohandle to the current process. 

Remarks
A pseudohandle is a special constant that is interpreted as the current process handle. The calling process can use this handle to specify its own process whenever a process handle is required. Pseudohandles are not inherited by child processes. 


------解决方案--------------------
lz的问题太难琢磨了
!!!!!!!