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. The Lounge
  3. Buggy MFC or just me??

Buggy MFC or just me??

Scheduled Pinned Locked Moved The Lounge
questionc++comhelpannouncement
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.
  • J Offline
    J Offline
    Joseph Dempsey
    wrote on last edited by
    #1

    I am wondering if anyone else has seen this maybe bug in mfc code or if its just something I am doing. I have am using a CListCtrl ( ick! but anyway ) and am adding text. The list ctrl. has 2 colums. The list ctrl is on a prop. page and so during the DDX i have something that looks like

    for( i = 0; i < somenum; i++ ) {
    someptr = GetSomePtr();
    list.InsertItem( i , someptr->textstring );
    for( j = 0; j < someothernum; j++ ) {
    someotherptr = GetSomeOtherPtr();
    if( someotherptr->ID == someptr->ID ) {
    list.SetItemText( i, 1, someotherptr->titletext );
    }
    }
    }

    So my question is... has anyone else noticed when doing something similar that the text set during setitemtext doesn't show up on first update.. I know the code is right cause if you flip to some other prop page and then flip back is shows up fine.... one solution ( just as a test ) was to add an extra UpdateData(FALSE) to the InitDialog() function... This worked but is kind of a pathetic resolution... I know people are bound to try to ream me for posting a programming question but this really ISN'T a programming question.... i just wanna know if anyone has seen this bug before... i'm not really looking for a solution from anyone. Anyone seen any other interesting bugs in MFC framework... i've ran across a few in my time working with MFC.. they are annoying as hell cause you spend like 5 days trying to find out what in YOUR source code is wrong only to find that M$ f***ed up!! Joseph Dempsey jdempsey@cox.rr.com Joseph.Dempsey@thermobio.com --And though --We are not now that strength which in old days --Moved earth and heaven, that which we are, we are, --One equal temper of heroic hearts --Made weak by time and faith, but strong in will --To strive, to seek, to find, and not to yield. +++ Ulysses (Alfred. Lord Tennyson)

    J T 2 Replies Last reply
    0
    • J Joseph Dempsey

      I am wondering if anyone else has seen this maybe bug in mfc code or if its just something I am doing. I have am using a CListCtrl ( ick! but anyway ) and am adding text. The list ctrl. has 2 colums. The list ctrl is on a prop. page and so during the DDX i have something that looks like

      for( i = 0; i < somenum; i++ ) {
      someptr = GetSomePtr();
      list.InsertItem( i , someptr->textstring );
      for( j = 0; j < someothernum; j++ ) {
      someotherptr = GetSomeOtherPtr();
      if( someotherptr->ID == someptr->ID ) {
      list.SetItemText( i, 1, someotherptr->titletext );
      }
      }
      }

      So my question is... has anyone else noticed when doing something similar that the text set during setitemtext doesn't show up on first update.. I know the code is right cause if you flip to some other prop page and then flip back is shows up fine.... one solution ( just as a test ) was to add an extra UpdateData(FALSE) to the InitDialog() function... This worked but is kind of a pathetic resolution... I know people are bound to try to ream me for posting a programming question but this really ISN'T a programming question.... i just wanna know if anyone has seen this bug before... i'm not really looking for a solution from anyone. Anyone seen any other interesting bugs in MFC framework... i've ran across a few in my time working with MFC.. they are annoying as hell cause you spend like 5 days trying to find out what in YOUR source code is wrong only to find that M$ f***ed up!! Joseph Dempsey jdempsey@cox.rr.com Joseph.Dempsey@thermobio.com --And though --We are not now that strength which in old days --Moved earth and heaven, that which we are, we are, --One equal temper of heroic hearts --Made weak by time and faith, but strong in will --To strive, to seek, to find, and not to yield. +++ Ulysses (Alfred. Lord Tennyson)

      J Offline
      J Offline
      Jim A Johnson
      wrote on last edited by
      #2

      Bugs, bugs, bugs - Yeah, Windows and MFC are full of them. I spend about half my time trying to work around bugs in Windows. Though I think that MFC has fewer bugs, just a lot of bad design (my guess is that in your example, the list control is to blame, not MFC). My latest bug: DWORD dwAttributes = SFGAO_FOLDER | SFGAO_LINK | SFGAO_READONLY | SFGAO_HASSUBFOLDER | SFGAO_CANRENAME | SFGAO_CANDELETE; pParentShellFolder->GetAttributesOf(1, relativePidl, &dwAttributes); m_bReadOnly = ((dwAttributes & SFGAO_READONLY) != 0); Would you believe that IShellFolder does not set the SFGAO_READONLY flag for a CD-ROM?

      1 Reply Last reply
      0
      • J Joseph Dempsey

        I am wondering if anyone else has seen this maybe bug in mfc code or if its just something I am doing. I have am using a CListCtrl ( ick! but anyway ) and am adding text. The list ctrl. has 2 colums. The list ctrl is on a prop. page and so during the DDX i have something that looks like

        for( i = 0; i < somenum; i++ ) {
        someptr = GetSomePtr();
        list.InsertItem( i , someptr->textstring );
        for( j = 0; j < someothernum; j++ ) {
        someotherptr = GetSomeOtherPtr();
        if( someotherptr->ID == someptr->ID ) {
        list.SetItemText( i, 1, someotherptr->titletext );
        }
        }
        }

        So my question is... has anyone else noticed when doing something similar that the text set during setitemtext doesn't show up on first update.. I know the code is right cause if you flip to some other prop page and then flip back is shows up fine.... one solution ( just as a test ) was to add an extra UpdateData(FALSE) to the InitDialog() function... This worked but is kind of a pathetic resolution... I know people are bound to try to ream me for posting a programming question but this really ISN'T a programming question.... i just wanna know if anyone has seen this bug before... i'm not really looking for a solution from anyone. Anyone seen any other interesting bugs in MFC framework... i've ran across a few in my time working with MFC.. they are annoying as hell cause you spend like 5 days trying to find out what in YOUR source code is wrong only to find that M$ f***ed up!! Joseph Dempsey jdempsey@cox.rr.com Joseph.Dempsey@thermobio.com --And though --We are not now that strength which in old days --Moved earth and heaven, that which we are, we are, --One equal temper of heroic hearts --Made weak by time and faith, but strong in will --To strive, to seek, to find, and not to yield. +++ Ulysses (Alfred. Lord Tennyson)

        T Offline
        T Offline
        Tim Ranker
        wrote on last edited by
        #3

        Hello Joseph, I tried to reproduce your bug by adding a CListCtrl to one of my property pages and I was unable to see the problems you were. Might be helpful to see your InitDialog and list population routines. Kind regards, Tim

        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