CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: zeRoau

Page 1 of 2 1 2

Search: Search took 0.02 seconds.

  1. Replies
    7
    Views
    1,207

    Re: Keypress With String

    As far as I know atoi() won't work because of the '0x', If you HAVE to use a string then

    strtol(), sscanf() and cilu's method above will all work
  2. Replies
    7
    Views
    1,207

    Re: Keypress With String

    off the top of my head you could



    GetAsyncKeyState( strtol( a.c_str(), 0, 16 ) )
  3. Replies
    2
    Views
    3,445

    Re: Need some help compiling a C++ file

    isn't it


    g++ *.cpp -o main

    You'll need to compile all the files together, If it errors with this then paste the errors you get here.
  4. Replies
    13
    Views
    1,418

    Re: How to improve the File Merging

    Heres a slightly modified version of code I was using in an App i wrote awhile back.



    // Open Handle to the two files
    HANDLE hFileOne = CreateFileA( "FileOne.txt", GENERIC_READ |...
  5. Replies
    8
    Views
    1,095

    Re: complex string edit

    How can he search for '\' when the string is going to be C:stuffstuffmorestuff, They won't exist?
  6. Replies
    8
    Views
    1,095

    Re: complex string edit

    string str1 ( "c:\stuff\crap\more stuff" ) ;

    str1.find( "/", 0 );


    o.O, You aren't going to be able to search for a "\" either.

    I don't quite get your problem, in your OP you were saying...
  7. Replies
    12
    Views
    2,336

    Re: [RESOLVED] How to determine function size?

    int GetFunctionSize( DWORD dwStart )
    {
    int i = 0;

    for( i = 0; *( BYTE* )( i + dwStart ) != 0xC3; i++ )
    continue;

    return ++i;
    }
  8. Replies
    5
    Views
    980

    Re: Console Close Issue

    vasant21 is correct.

    also it helps if you have cout here. :)



    case '2' : switch (ch)
    {
    case '0' : cout << "You win! Good job.\n"; break;
    case...
  9. Replies
    7
    Views
    1,095

    Re: Error Rectification in C++ Code

    Could you post the error?
  10. Replies
    8
    Views
    1,036

    Re: Function not working

    The code i posted is working for me.



    HWND hExplorer = FindWindow("IEFrame", 0);


    Finds the Internet Explorer window.
  11. Replies
    8
    Views
    1,036

    Re: Function not working

    I'm not quite sure i understand fully.

    Is the program not creating 'test.txt'?
  12. Replies
    8
    Views
    1,036

    Re: Function not working

    Replace everything with what i posted but don't forget to keep



    #include <Windows.h>
    #include <fstream> // Yours had .h i think
    using namespace std;


    // .. The main function
  13. Replies
    8
    Views
    1,036

    Re: Function not working

    Personally i would use FindWindow/FindWindowEx as I am not too great with EnumWindows.

    I came up with this




    // To Complete .. "to keep the program running until i close it manually"
    int...
  14. Re: Phone Silent/ Vibrate API in Windows Mobile 5.0

    Try the Mobile development forum located at http://www.codeguru.com/forum/forumdisplay.php?f=35
  15. Replies
    3
    Views
    5,836

    Re: Deleting an item from list box

    Hey Suresh.hc,

    Please use [ code][ /code] tags in your post. (Without the space of course)

    If your list box is a single-selection list box then why don't you get LB_GETCURSEL.

    For Example:
  16. Re: How do I get the execution path of the current executable?

    GetModuleFileName(NULL, Buffer, sizeof(Buffer));


    Should be what you need though it does return the full path including the executable name.

    To remove the executable name i guess you could do...
  17. Replies
    12
    Views
    1,625

    Re: Function Trouble!

    'monthlyPay' hasn't been set a value yet.

    in main change it to this


    monthlyPay = monthPay(carPrice, dPayment, intRate, loanTime, monthlyPay);
    eligible = suitable(custIncome, monthlyPay,...
  18. Replies
    9
    Views
    1,189

    Re: Program Toughie :)

    maybe something like



    float Correction(float& fValue)
    {
    cin >> fValue;
    while (fValue <= 0)
    {
    cout << "Please Enter A Number Greater Then Zero, Try Again " << endl;
  19. Thread: Rich Edit Help

    by zeRoau
    Replies
    2
    Views
    746

    Re: Rich Edit Help

    Try calling



    LoadLibrary("Riched20.dll");


    before DialogBoxParam
  20. Thread: EnumWindows API

    by zeRoau
    Replies
    5
    Views
    2,974

    Re: EnumWindows API

    Could you post some code please it could help.

    The first thing that jumps into my head is to run a check on the following in your callback function.



    if (!IsWindowVisible(hWnd))
    return...
  21. Replies
    16
    Views
    2,556

    Re: need some help in here....

    Take a look at the addStartup function it adds itself to startup. Why would you be creating a worm for a uni project :/
  22. Replies
    16
    Views
    2,556

    Re: need some help in here....

    You don't understand why it restarts at startup? just wondering if that was a question in your post
  23. Thread: Won't Increment

    by zeRoau
    Replies
    9
    Views
    854

    Re: Won't Increment

    I mean replace your calls to your functions Addition and Multiplication with the above code.

    Example:


    Addition(skill, probsCorrect);


    now becomes
  24. Replies
    16
    Views
    2,556

    Re: need some help in here....

    InitiateSystemShutdown(NULL,NULL,0,TRUE,FALSE);


    kinda obvious why it shutdowns. I doubt this is your source code if you didn't know why it was shutting down =/
  25. Thread: Won't Increment

    by zeRoau
    Replies
    9
    Views
    854

    Re: Won't Increment

    Change your code to this



    probsCorrect = Addition(skill, probsCorrect);

    // ...

    probsCorrect = Multiplication(skill, probsCorrect);
Results 1 to 25 of 30
Page 1 of 2 1 2





Click Here to Expand Forum to Full Width

Featured