Results 1 to 6 of 6

Thread: [RESOLVED] Draw picture using WinAPI and save result to bmp file

  1. #1

    Thread Starter
    Lively Member okosv's Avatar
    Join Date
    Sep 2006
    Posts
    95

    Resolved [RESOLVED] Draw picture using WinAPI and save result to bmp file

    Hello all.
    How can I draw something and write some text in picture then save result to bmp file? Using only API

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Draw picture using WinAPI and save result to bmp file

    How familiar are you with APIs? How familiar are you with creating and using device contexts, memory bitmaps, and the GDI dll in general?

    Your question is far to vague to be answered simply. If you have no experience drawing with APIs, you have quite a bit to learn. This can be done in VB without APIs with the picturebox control.

    Here is a very nice link talking about GDI bitmaps.
    Once there, click on Tutorials link near top of page. Then browse the tutorials you find interesting; many discuss graphics.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3

    Thread Starter
    Lively Member okosv's Avatar
    Join Date
    Sep 2006
    Posts
    95

    Re: Draw picture using WinAPI and save result to bmp file

    Thank u! Problem resolved (may be ;-) )

  4. #4
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,667

    Re: [RESOLVED] Draw picture using WinAPI and save result to bmp file

    Test your AI slop toy somewhere else.

  5. #5
    New Member
    Join Date
    Jul 2026
    Posts
    1

    Re: [RESOLVED] Draw picture using WinAPI and save result to bmp file

    Hi everyone,
    How can I use the Windows API to draw shapes and add text onto an image, then save the final output as a BMP file? I'm looking for an API-only solution without using external graphics libraries.



    Links removed by Site Administrator.

  6. #6
    The Idiot
    Join Date
    Dec 2014
    Posts
    3,013

    Re: [RESOLVED] Draw picture using WinAPI and save result to bmp file

    GDI32 still works, easy to use and no dependencies.
    since u want to save as BMP, VB6 can do it for u.
    so, first thing, look into GDI32 API, u can draw rectangles and other shapes, u can draw text directly into a picturebox.
    bitblt and stretchblt are great API for speed.
    u can actually use stretchblt to draw filled rectangles by using a 1x1 pixel source.
    SetPixel can be used to place a dot in a hidden picturebox so u have a palette to use. everything u can do using copy without any external loading.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width