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

Search:

Type: Posts; User: MagniB

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    863

    Re: is this code thread safe

    Thanks.

    Looks like I should use this http://threadingbuildingblocks.org/ instead of STL.
  2. Replies
    4
    Views
    863

    is this code thread safe

    stl::list<MyType> myList;

    void thread1() {
    while (!terminateThread1) {
    MyType temp;

    myList.push_back(temp);
    }
    }
  3. Replies
    2
    Views
    460

    Re: question about delete and delete[]

    Got it, Thanks!
  4. Replies
    2
    Views
    460

    question about delete and delete[]

    Let's say I write a code where program takes an integer from a user and then allocated an array. Like this:



    int a;
    char *b = 0;
    cout << "Size of array: ";
    (cin >> a).get();
    if (a != 0) b =...
  5. Replies
    8
    Views
    1,153

    Re: cipher mode of operation

    Yeah that's a really good idea. I was thinking of making limit of password and remarks to 1000 characters but, yeah I don't think it is really necessary. I will just make the limit to 255. Thank you...
  6. Replies
    8
    Views
    1,153

    Re: cipher mode of operation

    No good reason, 16 bit BCD can hold 9999 and I needed something that could hold up to 1000, so I thought why not use it. (extremely lame reason, I know) lol Limit is 1000 passwords per database. ...
  7. Replies
    8
    Views
    1,153

    Re: cipher mode of operation

    I said it can be easily guessed because, if user saves less than 100 passwords in the database, the high 8 bits of first 2 bytes BCD will be zero, if between 99 to 200, it will be 1. By looking at...
  8. Replies
    8
    Views
    1,153

    Re: cipher mode of operation

    Database design is really simple. First 2 bytes store the total number of passwords in database in 16 bit BCD format. And next 1 byte tells if encryption is being used or not, user will be able to...
  9. Replies
    8
    Views
    1,153

    cipher mode of operation

    Hello,
    I am writing a Password Manager program in C++ which generates and stores passwords in an encrypted database(a file in the hard drive). For encryption algorithm I decided to use Blowfish.
    In...
  10. Replies
    2
    Views
    451

    Re: Simple question about typecasting

    I thought if I use float as data type, compiler would know I am trying to get decimal number. HAHA

    Anyway, either I have use give numbers as 1.0f, 2.0f, 3.0f etc etc or typecast it using (float)....
  11. Replies
    2
    Views
    451

    Simple question about typecasting

    Hello,

    if I write:



    float a = 50 / 8;


    a will be equal to 6. And when I typecast it like this:
  12. Replies
    7
    Views
    1,060

    Re: Help reading ini file

    Ok, got it. Finally it worked. I needed to keep the ini file in Debug folder. lol
  13. Replies
    7
    Views
    1,060

    Re: Help reading ini file

    Nope, Igor's code is also giving "id = -1". lol why is this happening?
  14. Replies
    7
    Views
    1,060

    Re: Help reading ini file

    I did try and specify the full path but didn't work. And I also know GetPrivateProfileInt() API was deprecated in favor of the System Registry APIs, but in this situation, I have to use ini file.
    ...
  15. Replies
    7
    Views
    1,060

    Help reading ini file

    Hello,

    I am trying to read a ini file but having some problems.

    Suppose I have a ini file, "infoDat.ini". It contains:



    [Guy]
    name=Magni
  16. Thread: Beep Function

    by MagniB
    Replies
    8
    Views
    6,759

    Re: Beep Function

    It's a WINAPI function. Read here: http://msdn.microsoft.com/en-us/library/ms679277(VS.85).aspx
  17. Thread: Beep Function

    by MagniB
    Replies
    8
    Views
    6,759

    Beep Function

    Hello,

    I set the frequency to 700 and time to 1000ms, like this:


    Beep(700, 1000);

    But I can't hear the beeping sound on my laptop. Why is it? My laptop is Sony Vaio. Do laptops have...
  18. Replies
    2
    Views
    559

    Re: Need Some Information

    If you want to get Integer from EDIT box, you can use GetDlgItemInt(). This way you don't have to convert char into integer.
  19. Replies
    4
    Views
    1,091

    Re: Dialog Box gets printed on window

    Ok, here's a source of sample program I created just now. This is basically how my main projects draws on Window. I wrote it in VC++ 2008 Express Edition IDE:
    ...
  20. Replies
    4
    Views
    1,091

    Re: Dialog Box gets printed on window

    Yes, every drawing on Window goes through WM_PAINT handler, except for two. 1st is where I copy the content of Screen to a compatible DC in WM_LBUTTONDOWN for undo like this:



    case...
  21. Replies
    4
    Views
    1,091

    Dialog Box gets printed on window

    Hi,

    I have made a drawing program in C++ using Win32 API and GDI. User can draw on the window using Mouse just like in Windows Paint. There is also a floating dialog box(modeless) which contains...
  22. Thread: Release Build

    by MagniB
    Replies
    5
    Views
    953

    Re: Release Build

    Oh, Thank you very much for your reply! :)
  23. Thread: Release Build

    by MagniB
    Replies
    5
    Views
    953

    Release Build

    Hi again. I am using VC++ 2008 express edition to make my project. I made a release build of it and in the Release folder, there were two files, Executable of the program and a file with. pdb...
  24. Replies
    9
    Views
    3,996

    Re: Combobox - adding numbers(int)

    Oh! I tried to convert ss.str() to LPARAM and couldn't. Never thought of ss.str().c_str(). Thanks Marc!
  25. Replies
    9
    Views
    3,996

    Re: Combobox - adding numbers(int)

    I used _itoa since my compiler (VC++ 2008 Express) tells me to use _itoa instead of itoa. I was thinking of using stringstream but found out that it cannot be converted to LPARAM.
Results 1 to 25 of 28
Page 1 of 2 1 2





Click Here to Expand Forum to Full Width

Featured