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
R

Ron Olson

@Ron Olson
About
Posts
6
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Drawing icons on a toolbar
    R Ron Olson

    The problem is that the toolbar is variable....the buttons that would appear in the toolbar, as well as their order, are variable. In addition, I already have several dozen ico files which would all have to be mushed together into one big bitmap.

    C / C++ / MFC graphics help performance

  • Drawing icons on a toolbar
    R Ron Olson

    Hi all- I'm completely stuck. I am trying to dynamically set buttons on a CToolbar object using SetBitmap() via a memory dc. The code I have is below: // begin code block void CBitmap_toolbar2View::OnInitialUpdate() { CWindowDC dc(this); CDC memdc; memdc.CreateCompatibleDC(&dc); CBitmap bm; VERIFY(bm.LoadBitmap(IDR_MAINFRAME)); CBitmap *poldbm = memdc.SelectObject(&bm); // draw into the dc/bitmap CBrush brush; brush.CreateSysColorBrush(COLOR_BTNFACE); HICON theIcon = (HICON)LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_ENTRY), IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR); VERIFY(::DrawIconEx(memdc, 0, 0, // dc, x, y theIcon, // HICON (first small one) GetSystemMetrics(SM_CXICON), // cx GetSystemMetrics(SM_CYICON), // cy 0, brush, DI_NORMAL)); // frame, brush, flags DestroyIcon(theIcon); theIcon = (HICON)LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_ORDER), IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR); VERIFY(::DrawIconEx(memdc, 32, 0, // dc, x, y theIcon, // HICON (first small one) GetSystemMetrics(SM_CXICON), // cx GetSystemMetrics(SM_CYICON), // cy 0, brush, DI_NORMAL)); // frame, brush, flags memdc.SelectObject(poldbm); ((CMainFrame*)GetParentFrame())->m_wndToolBar.SetBitmap((HBITMAP)bm.Detach()); ((CMainFrame*)GetParentFrame())->m_wndToolBar.Invalidate(TRUE); ((CMainFrame*)GetParentFrame())->m_wndToolBar.SetButtons(NULL,2); } //// end of code block I made the toolbar in the frame public just to make it easier to play with. So I have two icons that I want to set on the toolbar. The two calls to DrawIconEx() sets the first icon at 0,0 and the second one at 32,0 but what I see is the first icon twice. I have zero clue as to why I should see the first icon twice, especially when I call DestroyIcon() between DrawIconEx() and LoadImage() for the second icon. Any help would be appreciated, this is something of a showstopper and I have no way of getting around it right now. :( Ron

    C / C++ / MFC graphics help performance

  • MSDN Jan 2002 with Visual Studio 6?
    R Ron Olson

    Hey all- For several years now, the standard M.O. for me has been that when a new version of MSDN was released, I would uninstall the previous version, then install the new version, and all would be ok from VS' standpoint. I just installed MSDN for Jan2002 and have been greeted by a "MSDN not installed. Please install MSDN" error from within VisualStudio 6. I chose the same directory and such as I always have, but all of a sudden VS isn't finding it. Presumably it *should* work with 6, as I have found nothing in the documentation to say that it doesn't work, but perhaps I have to fiddle with the registry to have VS find it? Thanks for any info, Ron

    C / C++ / MFC visual-studio csharp windows-admin help question

  • Help...cl.exe hangs on big project
    R Ron Olson

    Hey all- I have a huge project that has dependencies on approximately 18 other projects, all which are configured correctly through the depends section so that I should be able to just hit build and everything compiles (the exe and all associated dlls). Ok, this has been working fine for one version of the project, but I downloaded a new version from a different folder in sourcesafe, and I find that the compiler hangs, and can't be quit, no matter what. It's typically been limited to one of three files, that if I compile seperately, I can get the rest of the project to compile. However, if I do a rebuild all, it'll hit a file and as I said, cl.exe just sits there. I waited an hour, but it never came back. What's worse is that I can't *kill* cl.exe, no matter what. I've tried kill from the Resource Kit, using the -f switch, which reports it killed it, but it's still there in the task list. What's worse is that it prevents NT4(sp6) from rebooting...I have to hit the power button to reset. I've looked in the knowledge base, even on Google, but nothing comes up. The compiler heap (/Zm switch I think) is set to the max...2000, so in theory it's got all the memory it needs. I have plenty of disk space, and the machine has 256 meg of ram, dual processor. This is making development very difficult...any help would be appreciated. Ron

    C / C++ / MFC json performance help announcement learning

  • Help! Passing custom objects back and forth in COM
    R Ron Olson

    Hey all- I've used ATL/COM quite a bit, but I've always designed my apps from scratch to take parameters and return values using the standard types (strings, numbers, etc). Ok, now I have to wrap some functionality from a big app into a com object, and in a number of cases a pointer to a class is returned from a function, or a function takes a class or some other user defined type, etc. Basically, the job is ripping out some classes from a big mfc app and putting it in a com object. Great, but how to do it? I can't pass a custom object around (or I haven't been able to pass it using a VARIANT), and the amount of time to rewrite everything to be COM-friendly would far exceed the allotted time. I've searched Google as well as here and CodeGuru, but find nothing about this particular problem. I believe you can do it with straight DLLs, so I don't know why you couldn't also do it with com objects as well. Thanks for any info, Ron

    COM c++ help com tutorial question

  • Fox
    R Ron Olson

    I used FoxPro years ago before Microsoft bought it... I think it was one of the original Mac database tools. I believe it competed with Clipper for smaller scale, pc-based database application programming (in that you could produce an exe of sorts and run it on a client machine without having to have FoxPro installed). FoxPro had "Rushmore Technology" that basically made it faster than anything out there, circa 1992-3. Microsoft bought it for the Rushmore technology and implemented it in Access 2.0, but discovered, much to their horror, that they couldn't just kill off FoxPro once they had the technology, as the legions of die-hard FoxPro developers and users complained. I think Microsoft has been wanting to put it out of their misery for years, every new version that comes out is reportedly the "last version", but it keeps chugging along. I had a couple of coworkers who were rabid FoxPro users. They would laugh off Access as a joke and say that they could write apps entirely in FoxPro that would put any server-based RDMS to shame. I have to admit, having the Command box is a pretty cool idea ... if you know exactly what you want to, it's a lot simpler to type it in than go on a click-fest. Pretty much everything db-related in FoxPro can be done in the command box, and I gather that's how a lot of these apps got written. This makes me wonder if other pc-only database programs like Clipper or even dBase still exist. Perhaps someone is still working on a copy of dBase III+ or IV out there?;P

    The Lounge csharp dotnet 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