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

rocky_pulley

@rocky_pulley
About
Posts
77
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Capturing HDC
    R rocky_pulley

    Ok, here's what I'm trying, it's just giving me a blank (black) 500x500 bitmap: CDC memDC; memDC.CreateCompatibleDC(GetDC()); CBitmap *bmp = new CBitmap(); bmp->CreateCompatibleBitmap(&memDC, 500, 500); CBitmap *old = memDC.SelectObject(bmp); CRect rc(0, 0, 500, 500); memDC.FillRect(rc, new CBrush(RGB(0, 255, 255))); memDC.TextOut(50, 50, "BLAH"); //This stuff writes the bitmap and I know that it works. HANDLE hDib = DDBToDIB(*bmp, BI_RGB, NULL); WriteDIB("c:\\test\\testbmp.bmp", hDib); memDC.SelectObject(old); I have also tried to put the "memDC.SelectObject(old);" line before the bitmap writes and it gives the same problem. I know that the bitmap writing code works, I've used it before on CBitmaps just fine, so I'm sure that the problem exists in this drawing code somewhere. This code is being run from a CDialog, so that's where the GetDC() comes from. -- Rocky Dean Pulley -- DreamSys Software -- http://www.dreamsyssoft.com

    C / C++ / MFC com graphics help question

  • Capturing HDC
    R rocky_pulley

    I have an issue where I have a function that takes an HDC and draws to it. Instead of just displaying the data in a window, I want to write it to a bitmap file. I don't want to show the window at all, so I'm hoping that I can do this with a hidden window some how. I've tried calling GetCurrentBitmap() on the CDC object and that did not give me a valid bitmap. I also tried the following: hDC = GetDC(hDCWnd); hBmp = CreateCompatibleBitmap(hDC, 500, 500); SelectObject(hDC, hBmp); MyFuncToDraw(hDC); CBitmap* bitmap = CBitmap::FromHandle(hBmp); but that only gave me a blank bitmap. Does anyone have any idea how I can get a valid CBitmap so I can save it to a file? Is this even possible?? -- Rocky Dean Pulley -- DreamSys Software -- http://www.dreamsyssoft.com

    C / C++ / MFC com graphics help question

  • Bitmap from HDC
    R rocky_pulley

    I have a function that will draw to an HDC, I need to create a bitmap from that, what would be the best method? Can I create a bitmap and get it's HDC or something like that? Thanks! -- Rocky Dean Pulley -- DreamSys Software -- http://www.dreamsyssoft.com

    C / C++ / MFC com graphics question

  • Bitmap Resource Loading
    R rocky_pulley

    Can you view the splash.bmp from the resource editor? -- Rocky Dean Pulley -- DreamSys Software -- http://www.dreamsyssoft.com

    C / C++ / MFC c++ help graphics question learning

  • need help about p2p file transfer
    R rocky_pulley

    Here is some code to get you started. printf("transferring files...\n"); /* Transfer files here */ printf("done!\n"); -- Rocky Dean Pulley -- DreamSys Software -- http://www.dreamsyssoft.com

    C / C++ / MFC sysadmin help question

  • Firewall???
    R rocky_pulley

    it's doubtful there will be a DLL to do everything you need. If you want a real firewall you will need to do some driver level programming. I would suggest you start smaller. -- Rocky Dean Pulley

    C# question hardware

  • Data Overflow error
    R rocky_pulley

    It sounds like the number you are passing in is just too big. If the numeric field only supports a max value of say 65535 and you pass it in a long value that's say 1234567, then it will throw an overflow exception. I guess a way to fix it would be either to change the size of the numeric field in the database, or if that's not possible you can return an error to the user or just set it to the max size and ignore the rest of the number. -- Rocky Dean Pulley

    C# help oracle visual-studio

  • correct way in c# to...
    R rocky_pulley

    Hi, I have a user thread and I need to tell it to run some code in the GUI thread. I was thinking that maybe I would use SendMessage and create a message handler for this but it sounds like more of a C/C++ way of doing it. Is there something in C# line this? Kind of like java has SwingUtilities.invokeLater() -- Rocky Dean Pulley

    C# csharp c++ java question

  • Point on a line
    R rocky_pulley

    thanks a lot -- Rocky Dean Pulley

    C / C++ / MFC question

  • Point on a line
    R rocky_pulley

    I'm trying to find out if my mouse position is on a specific line. I've tried using the slopes of the line and of the mouse position from the starting point but this doesn't work because when you get close to the starting point and the line is almost horizontal the slopes vary greatly. Has anyone done this sort of thing before? Thanks -- Rocky Dean Pulley

    C / C++ / MFC question

  • open up a file as read-only
    R rocky_pulley

    I see, you are trying to open with word and not with your own program for reading. What you want to do will probably need to use word OLE automation. I would suggest doing some searching for just that, it's not as simple as just executing the program to do this. It's actually not much more code but understanding the concepts is a bit more complex. I haven't done this sort of thing in a long time so I don't know the code off hand, but I'm sure a quick google search will find something. -- Rocky Dean Pulley

    C / C++ / MFC question

  • open up a file as read-only
    R rocky_pulley

    Assuming that you meant CreateFile, pass the second parameter as GENERIC_READ. -- Rocky Dean Pulley

    C / C++ / MFC question

  • Comma Seperated String
    R rocky_pulley

    ArrayList l = new ArrayList(myString.Split(',')); -- Rocky Dean Pulley

    C# xml

  • adding information to a file without overwriting old info
    R rocky_pulley

    try to open the file with FileMode: FileMode.Append -- Rocky Dean Pulley

    C# help

  • Scroll Bar hogging focus
    R rocky_pulley

    thanks, that worked. -- Rocky Dean Pulley

    C# question

  • Scroll Bar hogging focus
    R rocky_pulley

    Thanks, but it looks like neither the UserControl class nor the VScrollBar class has these events available. -- Rocky Dean Pulley

    C# question

  • Scroll Bar hogging focus
    R rocky_pulley

    Hi, I'm creating a control, I do painting on the form and it has 1 scroll bar control, no other controls on it. I have a keyDown/keyUp handler and they work just fine until I hit the arrow keys, then the scroll bar grabs the key focus and I can't get it back. How can I stop the scrollbar from getting the key focus, I don't want it to be able to grab the key focus at all. Thanks! -- Rocky Dean Pulley

    C# question

  • Which is faster...
    R rocky_pulley

    Define faster. Do you mean faster to execute or faster to develop? Faster to execute is most likely direct Windows API but with optimization in the compiler you won't really notice a difference. If you mean in speed of developing, well, I would say MFC, but it really depends on how well you know MFC and how well you know the windows API. -- Rocky Dean Pulley

    C / C++ / MFC c++ json question

  • Any Function in VC++ that can retrive the Unique ID of my computer,
    R rocky_pulley

    What Unique ID? -- Rocky Dean Pulley

    C / C++ / MFC c++ help

  • Getting command line parameters of a running process
    R rocky_pulley

    Thanks, that's what I'm about to try. I was hoping there was a way to do it without injecting anything but this will do I think. Thanks, -- Rocky -- Rocky Dean Pulley

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