Search:

Type: Posts; User: novacain

Page 1 of 20 1 2 3 4

Search: Search took 0.06 seconds.

  1. Replies
    3
    Views
    3,730

    It depends on what you want to do with the data...

    It depends on what you want to do with the data and, to a lesser extent, what the data is.

    Different array objects have different uses, but List is probably the most versatile.
  2. Replies
    8
    Views
    906

    There are a number of ways to do this... This...

    There are a number of ways to do this...

    This is as simple a description as possible, I think...



    //first declare the struct
    //the struct has to be declared before you use it
    //in a...
  3. Replies
    18
    Views
    1,868

    No, as it contains input / init values and has...

    No, as it contains input / init values and has different size versions (which is why you have to set the CB element to the sizeof the struct).




    Yes, because it receives output values and does...
  4. Replies
    3
    Views
    1,261

    This should be in the Windows section. >>I...

    This should be in the Windows section.

    >>I have tried 3 procedures to break it in case WM_MESSAGE:

    Accelerators are sent as WM_COMMAND (not WM_MESSAGE)

    You should check the wParam;...
  5. Thread: Psuedocode

    by novacain
    Replies
    33
    Views
    10,449

    Bottom line is that all this is off topic and...

    Bottom line is that all this is off topic and irrelevant to the HOMEWORK problem the OP asked about.

    You wanted to show off but you just picked a silly thing to show off about, but picked on...
  6. Your loop starts at zero not one.

    Your loop starts at zero not one.
  7. When I interviewed graduate programmers I used to...

    When I interviewed graduate programmers I used to ask them to write a Fizz Buzz app, in any language or pseudo-code they liked.
    [Fizz Buzz : print the numbers 1 to 100. If the number is divisible...
  8. Replies
    4
    Views
    3,688

    Just for future reference.... You should check...

    Just for future reference....

    You should check the input (in textBox1 ) is a valid ID prior to calling the DB.

    You should always check the exact number of rows returned, if rows returned is not...
  9. Replies
    5
    Views
    1,255

    Add some debug code? using System;...

    Add some debug code?





    using System;
    using System.IO;

    namespace FileExperiment
  10. Thread: Psuedocode

    by novacain
    Replies
    33
    Views
    10,449

    IMO... This si a good time to use a regex....

    IMO...

    This si a good time to use a regex.
    The input is from a 'trusted' source (not user input), is short and relatively constant.

    A regex will produce clear and maintainable code.

    A regex...
  11. Thread: Psuedocode

    by novacain
    Replies
    33
    Views
    10,449

    Use a regular expression (regexp). Something...

    Use a regular expression (regexp).

    Something like


    '^[A-Z]{2}[0-9]{4}$'

    [A-Z]{2} = starts with 2 letters
    [0-9]{4} = ends with 4 numbers
  12. Replies
    2
    Views
    1,260

    Your paint is working, you have just asked for no...

    Your paint is working, you have just asked for no area to be redrawn.


    const RECT rText={20,100,420,25}

    the TOP of this rect is 100 but the bottom is 25, so it has a negative height.

    As you...
  13. Replies
    10
    Views
    1,962

    >>1 - i always use the InvalidateRect(), but why...

    >>1 - i always use the InvalidateRect(), but why the UpdateWindow()?

    UpdateWindow() sends the paint msg directly to the apps callback. It speeds up the paint msg delivery. If you don't use...
  14. Replies
    10
    Views
    1,962

    Do not add any lines to the WM_PAINT handler! ...

    Do not add any lines to the WM_PAINT handler!

    If you think you have to add lines to the WM_PAINT then your design is wrong.




    static LRESULT CALLBACK WndProcForm(HWND HandleWindow, UINT...
  15. Replies
    10
    Views
    1,962

    That is because each paint message you are...

    That is because each paint message you are creating, using and destroying the memory DC.

    You should;

    Create the memory DC once, when the form is created.

    Destroy the memory DC (and/or its...
  16. MFC is a wrapper around the WIN32 API, designed...

    MFC is a wrapper around the WIN32 API, designed for RAD (rapid application development).

    This means you call the MFC version of a function, usually using a class type variable and the MFC code...
  17. It depends on your motive; do you want to learn...

    It depends on your motive; do you want to learn C++, Windows Programming or build a media player? Is programming a hobby or possible profession?

    It would be easier to build a media player in C# or...
  18. You missed the crucial piece of advice Salem gave...

    You missed the crucial piece of advice Salem gave you....

    You WANT to build a remote control; the media player is controlled by the console app.
    [think: remote control plane]

    You HAVE built a...
  19. Replies
    1
    Views
    717

    You could look at the return from scanf() to see...

    You could look at the return from scanf() to see if the user had entered any letters (or check the length of the 'typed' array) before moving on.
    If the user has not typed the same number of...
  20. Replies
    42
    Views
    11,915

    SELECT * FROM users WHERE clue > 0 < no rows...

    SELECT * FROM users WHERE clue > 0
    < no rows returned >
  21. Do the signatures match? ie EzCreateFont...

    Do the signatures match?
    ie EzCreateFont declared as HFONT EzCreateFont(HDC *,wchar_t *,int,int,int,int) (name and params must be the same, wchar_t == WCHAR)

    If you right click on EzCreateFont...
  22. If in doubt, check the meaning of the return...

    If in doubt, check the meaning of the return value in MSDN.

    getaddrinfo() returns WSAGetLastError() (so you dont have to call it) but bind() only returns success / fail.

    Why are they different?...
  23. Replies
    13
    Views
    4,021

    Yes, but you cannot call it too often. Put a...

    Yes, but you cannot call it too often.
    Put a counter into that call and see how often you are calling it.
    BTW It does nothing but redraw the background, which could be done quicker with a WM_PAINT...
  24. Custom Controls in Win32 API: The Painting -...

    Custom Controls in Win32 API: The Painting - CodeProject
  25. Replies
    13
    Views
    4,021

    Looking at the code on the other forum... ...

    Looking at the code on the other forum...

    Return TRUE to WM_ERASEBACKGRND

    Set the last param of your InvalidateRect() to FALSE (look at MSDN to see why)

    DO NOT load an image from file in the...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4