HDC to IntPtr

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • --== Alain ==--

    HDC to IntPtr

    Hi,

    how to convert a HDC to IntPtr ?
    thx.

    Al.
  • Dustin Campbell

    #2
    Re: HDC to IntPtr

    how to convert a HDC to IntPtr ?

    I'm not sure that I understand. There is no HDC type in C#, so most programmers
    just use an IntPtr in place of it. Could you describe the context of the
    problem that you're trying to solve. Perhaps, a little code sample would
    illuminate the issue.

    Best Regards,
    Dustin Campbell
    Developer Express Inc.


    Comment

    • --== Alain ==--

      #3
      Re: HDC to IntPtr

      in fact i take HDC from Win32 namespace

      Dustin Campbell wrote:
      >how to convert a HDC to IntPtr ?
      >
      I'm not sure that I understand. There is no HDC type in C#, so most
      programmers just use an IntPtr in place of it. Could you describe the
      context of the problem that you're trying to solve. Perhaps, a little
      code sample would illuminate the issue.
      >
      Best Regards,
      Dustin Campbell
      Developer Express Inc.
      >
      >

      Comment

      • Willy Denoyette [MVP]

        #4
        Re: HDC to IntPtr

        That means that you are using PInvoke interop to call into unmanaged code,
        right?
        Your function declaration should specify the HDC as IntPtr, the interop
        layer will marshal the HDC (a void*) to IntPtr on return.


        Willy.

        "--== Alain ==--" <nospam@noemail .comwrote in message
        news:%23RsLjNc$ GHA.2128@TK2MSF TNGP03.phx.gbl. ..
        | in fact i take HDC from Win32 namespace
        |
        | Dustin Campbell wrote:
        | >how to convert a HDC to IntPtr ?
        | >
        | I'm not sure that I understand. There is no HDC type in C#, so most
        | programmers just use an IntPtr in place of it. Could you describe the
        | context of the problem that you're trying to solve. Perhaps, a little
        | code sample would illuminate the issue.
        | >
        | Best Regards,
        | Dustin Campbell
        | Developer Express Inc.
        | >
        | >


        Comment

        • Dustin Campbell

          #5
          Re: HDC to IntPtr

          in fact i take HDC from Win32 namespace

          What Win32 namespace? The only Win32 namespace that I am aware of in the
          ..NET Framework is the Microsoft.Win32 namespace but that doesn't contain
          an HDC type. Is this from a third-party library?

          Best Regards,
          Dustin Campbell
          Developer Express Inc.



          Comment

          • --== Alain ==--

            #6
            Re: HDC to IntPtr

            i did like you wrote before and it's ok.
            thx.

            Dustin Campbell wrote:
            >in fact i take HDC from Win32 namespace
            >
            What Win32 namespace? The only Win32 namespace that I am aware of in the
            .NET Framework is the Microsoft.Win32 namespace but that doesn't contain
            an HDC type. Is this from a third-party library?
            >
            Best Regards,
            Dustin Campbell
            Developer Express Inc.
            >
            >
            >

            Comment

            • Willy Denoyette [MVP]

              #7
              Re: HDC to IntPtr

              Seems like you don't even use C#, so I would suggest you to post C++ related
              questions to the vc NG.

              Willy.

              "--== Alain ==--" <nospam@noemail .comwrote in message
              news:enyDFTd$GH A.3928@TK2MSFTN GP03.phx.gbl...
              |i did like you wrote before and it's ok.
              | thx.
              |
              | Dustin Campbell wrote:
              | >in fact i take HDC from Win32 namespace
              | >
              | What Win32 namespace? The only Win32 namespace that I am aware of in the
              | .NET Framework is the Microsoft.Win32 namespace but that doesn't contain
              | an HDC type. Is this from a third-party library?
              | >
              | Best Regards,
              | Dustin Campbell
              | Developer Express Inc.
              | >
              | >
              | >


              Comment

              Working...