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
G

genush

@genush
About
Posts
14
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • GetHeaderCtrl returns null
    G genush

    As what often happens, I found my problem after posting. In the words of Emily Latella, "never mind" (I think that was Emily, wasn't it?)

    C / C++ / MFC question

  • GetHeaderCtrl returns null
    G genush

    I have a multidoc app based on CFormView. I have a dialog using CListCtrlEx. Everything works fine. I moved the CListCtrlEx object from the dialog to the view (CFormView). Now it doesn't work. The call to GetHeaderCtrl() for the CListCtrlEx object now returns NULL whereas it didn't when that object was in the dialog. Anyone know why that should be and how I can get the call to GetHeaderCtrl() to return the CHeaderCtrl() when it's in the view instead of the dialog? Thanks in advance.

    C / C++ / MFC question

  • CMDIChildWnd changing size unexpectedly
    G genush

    Thank you for the response. I tried that by overriding OnSize in both the child frame I want to keep maximized and the others I want to cascade. But the ones I want to cascade still come up maximized. I'll keep fiddling around with it.

    C / C++ / MFC question

  • CMDIChildWnd changing size unexpectedly
    G genush

    I have a multidoctemplate app, call it MyApp. For the default doc-view-frame of MyAppDoc-MyAppView-CChildFrame, I override the frame ActivateFrame to show the frame maximized. I added another doc-view-frame set, NewDoc-NewView-NewFrame, NewFrame derived from CMDIChildWnd. I override NewFrame ActivateFrame to show it normal. When I create and show a NewDoc object, it displays correctly but now my MapAppView is no longer maximized but cascaded with the NewView object. Why would anything I do with NewView affect anything I had done with MyAppView? I want MyAppView to continue to be maximized but NewView to be normal since I may create a lot of NewView objects and I want them cascaded when they are first shown. Thanks in advance.

    C / C++ / MFC question

  • how to properly display buttons over an image
    G genush

    I did something similar. After the drawing procedure, I have each button redraw itself, and this appears to be working. Thanks to all for your time and help! :)

    C / C++ / MFC graphics tutorial question

  • how to properly display buttons over an image
    G genush

    I'm sorry, I don't understand. Do you mean call SetFocus() for the buttons?

    C / C++ / MFC graphics tutorial question

  • how to properly display buttons over an image
    G genush

    Oops, I was a little hasty. I also show static text below the button. I call OnCtlColor(*) and set the hbr (HBRUSH) returned to a hollow brush. The text is then displayed over the image. After setting WS_CLIPCHILDREN, the text background is no longer transparent but light gray.

    C / C++ / MFC graphics tutorial question

  • how to properly display buttons over an image
    G genush

    That worked! Thanks!!

    C / C++ / MFC graphics tutorial question

  • how to properly display buttons over an image
    G genush

    I call the functions to draw in the OnDraw(CDC* pDC) function of the CFormView The buttons are put on the form with the resource editor, then I assigned names with class wizard. The image is displayed correctly so it looks like the image is overwriting the buttons. Interestingly, when the cursor is moved to the title bar, the OnDraw gets called, and the buttons disappear. I put in code to detect when the cursor is in the title bar and call Invalidate() in the form to cause OnDraw to be called again, then the buttons are displayed.

    C / C++ / MFC graphics tutorial question

  • how to properly display buttons over an image
    G genush

    I have a CFormView where I want to display an image and show some buttons over the image. I get the device context for the view, create a compatible bitmap, use the LPPICTURE Render(*) function to display the image file into the DC, then use BitBlt(*) of CDC to display the image. The buttons are placed onto the form. This kind of works, although if I display another window over the form, or move the cursor into the title bar or the system status bar, all the buttons disappear. I would like to place the buttons dynamically, and tried to use SetWindowPos(*) for one of the buttons. But when I called SetWindowPos(*) for that button, everything (image and other buttons) disappeared. Is there a proper way to display buttons over an image so they don't disappear, and also to do so dynamically?

    C / C++ / MFC graphics tutorial question

  • can one use vectors of subclasses in a parameter list?
    G genush

    Thanks for the responses everyone. I'll go with the template function.

    C / C++ / MFC help graphics oop question

  • can one use vectors of subclasses in a parameter list?
    G genush

    I am trying to pass in a vector of some subclass to a function defined with the base class in the parameter list, like void mod(vector < baseclass > &bcs). If I have a vector of subclass objects, as vector < subclass > sc, and call mod(sc), I get the error "A reference that is not to 'const' cannot be bound to a non-lvalue". Doing this without vectors is no problem; i.e, void mod(baseclass &bc), subclass sc; call mod(sc). I can get around this by defining 2 sum(*) functions, one with a baseclass parameter and one with a subclass parameter, but there goes the use of inheritance. The vector will by modified by mod(*), so I don't want to pass as const. Is there a way I can use 1 function on both the base and sub classes? Thanks.

    C / C++ / MFC help graphics oop question

  • removing the maximize box
    G genush

    Hmmm, I tried that in the CMainFrame::PreCreateWindow(CREATESTRUCT& cs) by setting: cs.style &= ~WS_MAXIMIZEBOX before the call to CMDIFrameWnd::PreCreateWindow(cs) which disabled the maximize box but did not remove the button from the title bar. Am I doing that wrong?

    C / C++ / MFC question

  • removing the maximize box
    G genush

    Is there a way to remove the maximize box from the view title bar in a multidoc app? I used DeleteMenu(*) or ModifyStyle(*) to disable the maximize button but these do not remove the button from the title bar. Thanks in advance.

    C / C++ / MFC 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