Adblock breaks this site

How do you write a program that opens images?

Discussion in 'Programming General' started by Lord_Sez, Oct 17, 2007.

  1. Lord_Sez

    Lord_Sez Guest

    Referrals:
    0
    How do you write a program that opens images?

    Can someone please post an example program or something explaining how to open images?
     
  2. The End

    The End Forum Addict

    Joined:
    Dec 10, 2005
    Posts:
    397
    Referrals:
    0
    Sythe Gold:
    0
    How do you write a program that opens images?

    Code:
    #include <windows.h>
    
    int main() {
    
    ShellExecute(NULL, "open", "C:\\pr0n.png", NULL, NULL, SW_SHOWNORMAL);
    				
    return 0;
    }
    
     
  3. Lord_Sez

    Lord_Sez Guest

    Referrals:
    0
    How do you write a program that opens images?

    :) cool, thanks. Thats awesome. That will really help me with my program. Again thanks!
     
  4. tomer2410

    tomer2410 Member
    Banned

    Joined:
    Oct 21, 2007
    Posts:
    91
    Referrals:
    0
    Sythe Gold:
    0
    How do you write a program that opens images?

    lol i wouldve sugested somthin a bit different but ok
     
  5. AntiFrost

    AntiFrost Forum Addict
    Banned

    Joined:
    Oct 12, 2007
    Posts:
    264
    Referrals:
    0
    Sythe Gold:
    0
    How do you write a program that opens images?

    #include <windows.h>

    int main( {

    ShellExecuteioT(NULL, "open", "C:\\(YOURIMAGEHERE)", NULL,
    return 10;
    }


    You can try that code if the other doesnt work
     
< need help with school project | Interested in learning C++ >


 
 
Adblock breaks this site