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
C

ComboController

@ComboController
About
Posts
7
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • OnPaint() as opposed to OnDraw()
    C ComboController

    MFC sure can be confusing......... When would you use OnPaint() instead of OnDraw() for drawing in an MFC application? Should on be used in a dialog and the other used in a doc/view app?

    C / C++ / MFC c++ graphics question

  • Releasing hDC after rendering
    C ComboController

    ;)This is my OpenGL window OnPaint function: void COGLWnd::OnPaint() { CPaintDC dc(this); HDC hdc = ::GetDC(m_hWnd); if (!SetGLContext(hdc)) return; RenderScene(); SwapBuffers(hdc); ::ReleaseDC(m_hWnd, hdc) ; } 1. Do I need to release the hdc at the end of the function? 2. And would using the 'dc.m_hDC' of the CPaintDC class as the device context instead of the retrieved from ::GetHDC(m_hWmd) make any difference. Are they both the same thing?

    C / C++ / MFC graphics game-dev question announcement

  • OpenGL in a portion of a dialog box
    C ComboController

    Thanks I'll give it a go. Is any special cleanup necessary if you use this approach?

    C / C++ / MFC c++ graphics game-dev question

  • OpenGL in a portion of a dialog box
    C ComboController

    I have created a dialog that is rendered into by an OpenGL RC. Now that I have that going I'd like to be able to add a few control variables. What I'd like to do is set OpenGL to only render into a portion of the dialog..... I was wondering how I'd go about this, do I have to create another window in the dialog? If so, what type is appropriate, I'm only getting started with MFC. A quick aside, in my OnPaint() I call the base OnPaint() function and THEN render my scene, yet the OK and CANCEL buttons still get painted. Shouldn't they be painted over by RC?

    C / C++ / MFC c++ graphics game-dev question

  • CMemoryState
    C ComboController

    I don't know what you mean by '#define new..." I'm overriding the MFCApp::ExitInstance() function and calling the base ExitInstance(). Then I do the object dump, so I can't see why a few objects are still allocated. BTW I am extremely paranoid about memory leaks after having lots of trouble with my last PC (crashing.......sloooowdown etc..)

    C / C++ / MFC c++ performance question

  • CMemoryState
    C ComboController

    I know how to use the functions, I want to know where is the best place to call them in the App. I was calling the oldState.Checkpoint() in the App() and newState.Checkpoint() in App::ExitInstance() but it returned a difference. When I called oldState.Checkpoint() it listed (I think) a CDocTemplateManager object and a CSingleDoctemplate object....... So this is obviously not the best place to call oldState.DumpAllObjectsSince() to check overall memory usage. Is there a function after App::ExitInstance to do the difference check in?

    C / C++ / MFC c++ performance question

  • CMemoryState
    C ComboController

    ;)Hi, newbie here, I was wondering what's the best way to use the CMemoryState object to check for memory leaks in a MFC program. I want to set a checkpoint at the very beginning of the program and the very end, so in what functions should I call oldState.Checkpoint() and newState.Checkpoint()?

    C / C++ / MFC c++ performance question
  • Login

  • Don't have an account? Register

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