HWND hWnd 
Author Message
 HWND hWnd

Hi,
I made a class which contains a function wherein I want to use
ClientToScreen(HWND hWnd, LPPOINT lpPoint) but what do I have to use as
HWND? When I use ClientToScreen in the View-class (in MFC), it is not
necessary to use this HWND, it 's enough to use only the second parameter.

I hope somebody can help me out

Greetings

Bert-Belgium



Mon, 22 Apr 2002 03:00:00 GMT  
 HWND hWnd

Quote:

> Hi,
> I made a class which contains a function wherein I want to use
> ClientToScreen(HWND hWnd, LPPOINT lpPoint) but what do I have to use as
> HWND? When I use ClientToScreen in the View-class (in MFC), it is not
> necessary to use this HWND, it 's enough to use only the second parameter.

You need to know the HWND to find do client to screen.  If you're
calling the API functions directly, you must provide it and the point
to be mapped.  If the second case you are using CWnd::ClientToScreen.
The CWnd has the HWND stored inside it, so it can pass it along to
the underlying funciton.


Mon, 22 Apr 2002 03:00:00 GMT  
 HWND hWnd
m_pWnd->m_hWnd, where m_pWnd is a pointer to the control that you want to do
ClientToScreen for. Or GetActiveWindow()->m_hWnd. Or
ClientToScreen(m_hWnd... where m_hWnd is the m_hWnd of the window you set up
the class with from the beginning.

Johan Rosengren
Responsable Informatique
PACTA S.A.



Quote:
> Hi,
> I made a class which contains a function wherein I want to use
> ClientToScreen(HWND hWnd, LPPOINT lpPoint) but what do I have to use as
> HWND? When I use ClientToScreen in the View-class (in MFC), it is not
> necessary to use this HWND, it 's enough to use only the second parameter.

> I hope somebody can help me out

> Greetings

> Bert-Belgium



Mon, 22 Apr 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. DestroyWindow( HWND hWnd ) doesnt kill window

2. retrieving a HWND hWnd from a UINT wParam

3. MyDllFunction (HWND hwnd,...) under VB ??? what's the equivalent for variable parameter

4. How to get HWND in ::GetDlgItem(HWND hDlg,ID_SECTIONS) before dlg.DoModal()

5. Question on HWND hDlg Parameter in ::SetDlgItemText(HWND hDlg, int nIDDlgItem, LPTSTR lpString, int nMaxCount)

6. How to get HWND in ::GetDlgItem(HWND hDlg,ID_SECTIONS) before dlg.DoModal()

7. Question on HWND hDlg Parameter in ::SetDlgItemText(HWND hDlg, int nIDDlgItem, LPTSTR lpString, int nMaxCount)

8. Ever seen debug build HWND != release HWND

9. Retrieving the HWnd of an Explorer window

10. IntPtr --> HWND

11. hWnd and hDC conversions

12. Conversion from System::IntPtr to HWND

 

 
Powered by phpBB® Forum Software