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

Search:

Type: Posts; User: Jay Tautges

Page 1 of 11 1 2 3 4

Search: Search took 0.06 seconds.

  1. Re: 'Not all code paths return a value' problem

    What Arjay says is right, but the return clause should go outside of the for loop. ;)

    And I'd check out the if/else clause within the for loop. What would happen if y.Equals(x) turned out to be...
  2. Replies
    9
    Views
    25,742

    Re: check if a datetime is null

    One way to detect a null Date/Time database field is to wrap a try, catch clause around a simple use of the field, and see what happens.


    ...
    // Read dataRow from database
    try
    {
    // We...
  3. Creating a database to match a typed dataset

    Hello gurus,

    Back when I used MFC and the Dao classes I would use a static array of table names, field names and types and from there I could easily create or verify an Access database. Those...
  4. Re: Ownerdraw TabControls, what's the secret?

    Thanks,

    UserPaint looks like what I was missing.
  5. Ownerdraw TabControls, what's the secret?

    Hello everyone,

    Personalizing the look of controls is something I like to do - so I'm trying it with the TabControl in my program. I've set the control's DrawMode to OwnerDrawFixed, and have...
  6. Replies
    7
    Views
    11,767

    Re: Convert string to time_t

    You could use the COleDateTime and it's ParseDateTime function to parse your text. If parsed successfully use the GetMonth/Day/Year/etc functions to put together your time_t variable.

    Jay
  7. Replies
    35
    Views
    4,148

    Re: CArray Again!!!

    Ok, I thought that would solve the problem. I've reproduced the problem where a CArray<TYPE> value is returned and the error below is produced.

    error C2558: class 'CArray<TYPE>' : no copy...
  8. Replies
    35
    Views
    4,148

    Re: CArray Again!!!

    The copy constructor is a constructor that takes a single parameter of the class's type. That parameter is a ref to the class. I declare them const also.



    class CSomeClass {
    CSomeClass();...
  9. Replies
    20
    Views
    3,537

    Poll: Re: Should we use undocumented elements?

    I think we should use undocumented elements. MS doesn't control us. You just have to be aware of what you're doing, and be ready to accept the consequences.

    If the scientists of the past didn't...
  10. Replies
    2
    Views
    1,141

    Re: Progress Control and Send Message

    In the case of a progress bar, there is the message PBM_SETPOS to set the position of the bar. It's documented as redrawing the control, to force an immediate repainting. It's purpose is to update...
  11. Replies
    4
    Views
    1,155

    Re: CRichEditView in a splitter (errors)

    The CIRMapDoc class is probably not defined for the CIRMapView class. Put it's header in the source code before the #include of the view.


    #include "stdafx.h"
    #include "IRMapDoc.h"
    #include...
  12. Re: Cannot remove close button from commandbar!

    I've haven't tried it myself but I've seen the class style CS_NOCLOSE recommended. It might only disable that X in the upper right corner. If that doesn't do it there is the option of removing the...
  13. Replies
    2
    Views
    866

    Re: Best method to read binary data file?

    I wouldn't read the entire file if its size is in the megabytes. Instead make an index at the the start of the file with offsets to each block of data. Or make up a fixed format so you can easily...
  14. Replies
    3
    Views
    641

    Re: Overloading operators...

    That function doesn't seem like part of the fraction class. If it were it's prototype might look like this:

    class fraction {
    ...
    bool operator==(const fraction& f) const;
    ...
    };

    Then to...
  15. Re: changing number of columns in CListCtrl dynamically

    A list control can only have a fixed number of columns. That can be changed dynamically at any time, but it would apply to all rows which isn't what you want.

    There is a solution though. Make...
  16. Re: Manually moving/resizing a property sheet

    In OnSize() when you resize the property sheet you're using screen coordinates. Make a call to ScreenToClient(cr) after GetWindowRect to make the coords relative to the parent. But that will only...
  17. Re: Keeping frames the same size between forms

    What are the forms and frames? My first guess is CFormViews with some kind of window within the dialog template.

    Exactly what you're looking to do, I'm not sure myself. The way you describe your...
  18. Re: Manually moving/resizing a property sheet

    Using VC++ and MFC you're going to have to do all the sizeing/movement coding yourself. Calls to MoveWindow() for the property sheet and pages.

    You might consider using C# and the Windows forms...
  19. Replies
    4
    Views
    823

    Re: MessageBox Problem

    That's because two different functions are being called. In the doc it's this one and in the view it's this .

    In the CView to force a use of the first function, put "::" right in front of the...
  20. Replies
    6
    Views
    1,262

    Re: ListCtrl Items Bloches while Scrolling

    Why are you forcing a repainting in OnVScroll - the list should handle this automatically. All you have to do is reposition that comboBox to be above a specific subitem.

    If you do want to call...
  21. Re: how to react when user click the same tree item

    That's great your code works! But JohnCz was right - I overlooked HitTest. The while() loop that iterates from the handle of GetFirstVisibleItem() to the end of the tree can be replaced with a call...
  22. Replies
    6
    Views
    965

    Re: Help: Simple Button Question

    There are button styles BS_PUSHBUTTON and BS_PUSHLIKE, but I doubt taking those away would help. So the next thing I thought of was what actions cause the button to be pushed - the mouse click,...
  23. Replies
    4
    Views
    954

    Re: throw() in Visual C++ 2003.Net

    The throw() part of the function prototype just says what type of exception is to be expected.

    throw() - No exceptions
    throw(...) - Any kind of exception
    throw(type) - An exception of the type...
  24. Replies
    1
    Views
    671

    Re: Fooling the compiler

    I'm wondering why you aren't using CRect. It converts itself into a RECT when required.

    But if you want to make your own class - it's up to you. Put a RECT inside your class, and do this.

    ...
  25. Replies
    8
    Views
    1,508

    Re: VC++ MFC app question...

    Once you touch a radio button, it will be in focus. I guess you want the text from the last edit control being edited. Keep track of that by watching for EN_SETFOCUS.
Results 1 to 25 of 255
Page 1 of 11 1 2 3 4





Click Here to Expand Forum to Full Width

Featured