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

Search:

Type: Posts; User: Dave McLelland

Page 1 of 31 1 2 3 4

Search: Search took 0.20 seconds.

  1. Replies
    2
    Views
    772

    Re: convert int to class

    class C {
    public:
    C(int i) { m_i = i; }
    C& operator=(const C& rhs) { m_i = rhs.m_i; return *this;}
    C& operator/(const C& rhs) { m_i /= rhs.m_i; return *this; }
    friend C operator/(const C&...
  2. Re: Make program loop untill null value is passed.

    Hint: you need two loops, one inside the other.
  3. Re: Hopefully not a completely ignorant question

    I think the problem is getting your first job. You may have the necessary expertise to program in C++ but you have to get to the interview in order to demonstrate that. It depends greatly on the type...
  4. Replies
    2
    Views
    910

    Re: Printer Driver

    Try installing the "generic / text only" printer that ships with windows. That may be sufficent for your needs.
  5. Replies
    1
    Views
    599

    Re: Printer Driver

    There used to be a printer called "generic (text only)" included with windows. If its still there, give it a try.
  6. Replies
    4
    Views
    912

    Re: Database Error

    Check the type of the field in the table definition in the dabase. Is it of type "Text" and of a suitable size?

    if thats not it then

    Check the return value from the call to Open (it should be...
  7. Replies
    4
    Views
    912

    Re: Database Error

    Can you post the code for CQuestionsRecordset.
    What is the definition of m_Question in the recordset and the database?

    Also why do you query for all the records in the table before adding the new...
  8. Replies
    5
    Views
    1,018

    Re: Threads have sequential behavior

    First, I dont want to appear patronising, but I dont know how much you know. So forgive some simple questions...

    When you say you can realise that the "processing" is sequential, how do you know...
  9. Replies
    7
    Views
    1,723

    Re: GDI leak with WM_SETTEXT

    If you dont send the WM_SETTEXT do you still have the leak?
  10. Replies
    5
    Views
    1,018

    Re: Threads have sequential behavior

    Try removing the

    CloseHandle(phThread[0]);
    and

    phThread[0] = NULL;
    from the thread functions themselves, you will need the handles in the main thread to get the return code and for the...
  11. Replies
    7
    Views
    1,723

    Re: GDI leak with WM_SETTEXT

    Are you using GDI objects yourself to draw something?
    Its possible that the problem you are seeing with the static control are a symptom of the problem of consuming the available GDI objects and the...
  12. Replies
    7
    Views
    1,723

    Re: GDI leak with WM_SETTEXT

    What function are you calling SendMessage from.
    It may be a reentrancy problem.
    What is the type of the radius object (CStatic?)
  13. Replies
    2
    Views
    767

    Re: using unions with float and long

    typedef union {
    float FloatVal;
    struct {
    unsigned int SignBit:1; // 1 bit for the sign
    unsigned int Exponent:7; // 7 bits for the exponent
    unsigned int...
  14. Re: Help me, font size differs in different printers!!

    Try passing a pointer to the printers DC as the last parameter to the CreatePointFont funtion. It needs the DC so that it can determine the printer resolution andd scale the font appropriately. The...
  15. Re: Can you do an explicit Stack Check in C++

    Can you post the code (maybe with the non sockets bits stripped if its big)?

    (This is a silly question, but.... you are using SOCK_STREAM and not SOCK_DGRAM?)
  16. Replies
    5
    Views
    1,018

    Re: Threads have sequential behavior

    What value does WaitForMultipleObjects return?
    What values do the GetExitCodeThread calls return?

    Also you should pass TRUE, not true for the third parameter.
    The type is BOOL not bool (BOOL is...
  17. Replies
    3
    Views
    1,175

    Re: Register variable

    You cannot take the address of a register variable, because a register does not have an address. A register is inside the processor chip, not in memory.

    I dont know about a static or global...
  18. Replies
    8
    Views
    1,082

    Re: Problem with copy constructor

    your copy constructor has an error.

    you are copying the data from the array being copied but using the "size" field from the array receiving the copy. Put the size = a.size before the loop.
    The...
  19. Replies
    2
    Views
    1,626

    Re: Herb Sutter vs. Scott Meyers

    You will probably learn much from both (I did). If you can get them both, and the "More Effective..." follow up books. Some of the areas covered are the same, but many are not. Also herb sutters...
  20. Replies
    2
    Views
    683

    Re: Dialog return codes

    Use the EndDialog method to return a value from DoModal.
  21. Re: Migration to .NET 2003 : Help Me !!!

    Have you forgotten to define the OnStep2 method defined with the UINT parameter required for ON_COMMAND_RANGE?
  22. Yes please.

    Yes please.
  23. Did you find a solution to your peoblem? I have...

    Did you find a solution to your peoblem?
    I have the same problem.
  24. Replies
    7
    Views
    1,212

    Also changing the type from BYTE to BYTE* moves...

    Also changing the type from BYTE to BYTE* moves the actual data out of the struct.
  25. Replies
    7
    Views
    1,212

    Because 1 is the smallest dimension for the array...

    Because 1 is the smallest dimension for the array that allocates space for it. The way these things work is that the struct is declared with an array of size 1 (as the last member). When the memory...
Results 1 to 25 of 761
Page 1 of 31 1 2 3 4





Click Here to Expand Forum to Full Width

Featured