Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. NativeWindow? Win32??

NativeWindow? Win32??

Scheduled Pinned Locked Moved Managed C++/CLI
questiongraphicsgame-devhelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Aidoru75
    wrote on last edited by
    #1

    Hello, I'm a bit confused about the difference between: LRESULT CALLBACK WndProc(HWND hWindow, UINT msg, WPARAM wParam, LPARAM lParam); and virtual void WndProc(Message %m); I know that the first is to get message to menage event in win32, but so "WndProc(Message %m)" is the same thing when we are programming a Windows Form project? The last question is: when is better to use NativeWindow methos and when is better to use win32 methods to menage events? My project is a simple window form with a panel, on the Panel i call a window where I can menage OpenGL operations. Could someone help me? Thank you

    L A 2 Replies Last reply
    0
    • A Aidoru75

      Hello, I'm a bit confused about the difference between: LRESULT CALLBACK WndProc(HWND hWindow, UINT msg, WPARAM wParam, LPARAM lParam); and virtual void WndProc(Message %m); I know that the first is to get message to menage event in win32, but so "WndProc(Message %m)" is the same thing when we are programming a Windows Form project? The last question is: when is better to use NativeWindow methos and when is better to use win32 methods to menage events? My project is a simple window form with a panel, on the Panel i call a window where I can menage OpenGL operations. Could someone help me? Thank you

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      The first version is the native unmanaged code version, and the second is the managed one[^]. As to which is better, that depends on the design and structure of your program.

      Veni, vidi, abiit domum

      1 Reply Last reply
      0
      • A Aidoru75

        Hello, I'm a bit confused about the difference between: LRESULT CALLBACK WndProc(HWND hWindow, UINT msg, WPARAM wParam, LPARAM lParam); and virtual void WndProc(Message %m); I know that the first is to get message to menage event in win32, but so "WndProc(Message %m)" is the same thing when we are programming a Windows Form project? The last question is: when is better to use NativeWindow methos and when is better to use win32 methods to menage events? My project is a simple window form with a panel, on the Panel i call a window where I can menage OpenGL operations. Could someone help me? Thank you

        A Offline
        A Offline
        Albert Holguin
        wrote on last edited by
        #3

        Use a native window when you're working with native C/C++/WinAPI code and use the managed version when you're using managed code. Only reason to use native code when you have a managed project is if the managed version doesn't do something you need already (which is hardly ever the case).

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups