User Profile

Collapse

Profile Sidebar

Collapse
lumpybanana247
lumpybanana247
Last Activity: Jul 28 '09, 07:10 PM
Joined: Apr 17 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • lumpybanana247
    replied to usage of system() function
    in C
    yes, but it will run so fast that it will make your computer flip in a second. so do not run it without saving all data first. i repeat that: DO NOT RUN IT WITHOUT SAVING ALL DATA
    but instead of the system function, i would recommend ShellExecute. it requires <windows.h>
    here is an example
    ShellExecute( NULL, "open", "C:\\Progra~1\\ Intern~1\\IEXPL ORE.EXE","","C: \\", SW_SHOW);
    ...
    See more | Go to post

    Leave a comment:


  • lumpybanana247
    replied to usage of system() function
    in C
    yeah, you can launch internet explorer.
    your code was about right...


    1st. main is supposed to be an int (not void) and should return a number (such as 0).
    2nd. a "\" in a string must be written as "\\"
    3rd. in many systems (well, mine) you must make the directory into "Shortfilen ame" because it does not contain spaces.
    ex. C:\\PROGRA~1\\I NTERN~1\\IEXPLO RE.EXE
    ...
    See more | Go to post

    Leave a comment:


  • lumpybanana247
    replied to "Best" compiler for windows
    in C
    Yeah, ive had DevC++ since i started programming and not a single update.
    And haha, that makes sense about cygwin. before i started programming, i tried to compile a c++ file using cygwin lol-- like not in emulating a compiler-- i literally used cygwin.exe to try to compile one and wondered why it didnt work. maybe i should read instructions...

    And I'll try out CodeBlocks. It looks pretty good! thank you much.
    See more | Go to post

    Leave a comment:


  • lumpybanana247
    started a topic "Best" compiler for windows
    in C

    "Best" compiler for windows

    Now, I understand this could have several answers, but my simple question is: What is the best free C++ compiler for Windows?
    For a long time, I have been using MinGW (using Bloodshed DevC++) on Windows XP. I find it great. But, assuming that i hadn't put much time into learning about that compiler that i presently use, what would everyone recommend? (and "why?" if possible)

    I know others exist such as MSVC++, Cygwin,...
    See more | Go to post

  • lumpybanana247
    replied to Opening File
    in C
    yeah, like open NOTEPAD.EXE and get the hex code for it
    See more | Go to post

    Leave a comment:


  • lumpybanana247
    started a topic Opening File
    in C

    Opening File

    there is a program called 010 Editor. using it, you could open a .exe file, copy the HEX code that it gives you, create an empty project and paste that code and save the file and of course, its an exact replica as if you copy and pasted. but my question is: how could i do somthing like this in c++? i mean i know how to convert to hex, its just how could i do that?
    See more | Go to post

  • lumpybanana247
    started a topic mute speakers
    in C

    mute speakers

    using vc++ how could i mute my speakers?
    thank you
    See more | Go to post

  • lumpybanana247
    started a topic C++ button
    in C

    C++ button

    this is kind of a lame question, but in C++ (mingw/devc++ for example) how do you simply add a button to your window (assuming your window is set up something like...)

    Code:
    #include <windows.h>
    LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
    char szClassName[ ] = "WindowsApp";
    int WINAPI WinMain(HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdArgumentCmdLine, int
    ...
    See more | Go to post

  • lumpybanana247
    started a topic C: Tabs (as in the GUI)
    in C

    C: Tabs (as in the GUI)

    im using windows xp with DevC++/mingw32. my program is in C.

    i was wondering how to create a tabbed interface

    in visualc++ there are TabControl and TabItem however i cant find anything for C.

    does anybody have any links or anything that could help me out?
    See more | Go to post

  • lumpybanana247
    started a topic Get info from extension
    in C

    Get info from extension

    Given: [extention] ".txt"
    i would like to retrieve:
    1.[default program] C:\WINDOWS\syst em32\Notepad.ex e "%1"
    2.[default icon] %SystemRoot%\sy stem32\shell32. dll,-152


    how would i go about doing this using c++?
    See more | Go to post

  • lumpybanana247
    started a topic Accelerators
    in C

    Accelerators

    im trying to get accelerators [keyboard shortcuts] working in my DevC++/MinGW program.
    i have tried what seems to be every toutorial, but they are all made for VC++ which i do not use.
    any suggestions on toutorials or any help for getting accelerators [Like Ctrl+S] to work and load using a MinGW complier and DevC++ environment?
    See more | Go to post

  • lumpybanana247
    replied to Passing commands in CMD
    in C
    thank you guys for your help.
    it turns out for some reason, the current directory (cd) is ?Not set?... so i jsut typed

    system("javac C:\\Docume~1\\U SERNAME\\FILE.j ava");


    thank you...
    See more | Go to post

    Leave a comment:


  • lumpybanana247
    replied to Passing commands in CMD
    in C
    thanks for your response. i have tried that and it had the same error... i edited my question right before you posted saying
    opening CMD.exe and typing "cd C:\ && javac HelloWorldApp.j ava" works, but using system and doing "system("cd C:\ && javac HelloWorldApp.j ava" does not work...
    See more | Go to post

    Leave a comment:


  • lumpybanana247
    started a topic Passing commands in CMD
    in C

    Passing commands in CMD

    So, I wanted to compile my java script in CMD via my C++ application.
    I tried
    system("cd C:\\ && javac HelloWorldApp.j ava");
    and
    system("cd C:\\ & javac HelloWorldApp.j ava");
    which neither of them work

    although, when i use cmd.exe and manually type
    cd C:\\ && javac HelloWorldApp.j ava
    everything works fine.
    anybody have any suggestions?...
    See more | Go to post

  • lumpybanana247
    replied to Ctrl+S = save
    in C
    yeah, I'm using Win32.

    I have looked up accelerators for quite a while and none of them seem to work. :-( can somebody give me an example of what they used that worked please?...
    See more | Go to post

    Leave a comment:


  • lumpybanana247
    replied to Ctrl+S = save
    in C
    i dont understand how to do that, i imagine whatever i do, it goes in the form procedure and would looks somthing like

    if(message==19) {stuff}

    could you tell me more?...
    See more | Go to post

    Leave a comment:


  • lumpybanana247
    replied to switch statements with <?
    in C
    try this [i just compiled it and it works fine]

    #include <iostream>
    using namespace std;
    double income=31320;
    double tax;
    int main()
    {
    if (income < 1000){ tax = income*.3;}
    else if (income < 2000){ tax = income*.4;}
    else if (income < 3000){ tax = income*.5;}
    else if (income > 3999){ tax = income*.9;}
    printf("\nYou have this much: %lf in taxes",...
    See more | Go to post

    Leave a comment:


  • lumpybanana247
    started a topic Ctrl+S = save
    in C

    Ctrl+S = save

    in my program, i wanted to make it so when i press ctrl and s at the same time, my program would run the save function.
    its obviously c++ and im using Dev-C++ Bloodshed (with MinGW)

    thanks in advance
    See more | Go to post

  • lumpybanana247
    replied to Opening With Default Program
    in C
    well, i think i have the registry part down, but i believe its my c++ source that needs to be changed. am i right?
    See more | Go to post

    Leave a comment:


  • lumpybanana247
    started a topic Opening With Default Program
    in C

    Opening With Default Program

    i finally found out how to set my registry to open a certain extension with my little text editor.
    For instance, when you set notepad to open the file, you just set the value to C:\WINDOWS\NOTE PAD.exe
    so, i set it to my program instead

    Now, when i click on a file associated with my program, it opens the text editor, but what would i put in my script to make it load the file too?

    thank you much
    See more | Go to post
No activity results to display
Show More
Working...