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

Search:

Type: Posts; User: torfil

Page 1 of 5 1 2 3 4

Search: Search took 0.04 seconds.

  1. Thread: conversions

    by torfil
    Replies
    4
    Views
    694

    Re: conversions

    Because 480/768 is zero, when you're dealing with integers. Convert them to float before doing the division. Like this:

    float iPorcentage = ((float)iDrawedHeight)/(float)iScreenHeight;
  2. Replies
    4
    Views
    1,790

    Re: About the useness of SetCheck

    GetDlgItem is a member of CWnd. Are you sure you're calling it from a non-static method of a class derived from CWnd?
    If not, then you're calling the 2 parameter version of GetDlgItem, which takes...
  3. Replies
    17
    Views
    12,946

    Re: Font for CButton

    I think fonts are part of the theme, so it will use those instead of the one you pass.

    To remove a theme from a window, call
    SetWindowTheme(hwnd, L"", L"");

    where hwnd is the hwnd of your...
  4. Replies
    18
    Views
    2,256

    Re: Release version of application crashed!!!

    In the registry, you can specify a particular debugger to get invoked when an application that isn't currently being debugged crashes.

    google for the "AEDebug" regkey. You could probably set the...
  5. Replies
    28
    Views
    3,068

    Re: Entire Machine Freezes during Sleep()

    A system-wide freeze, to me, really points to a driver problem - something that's running in kernel mode.. I don't know what a "CAC DPT4 card" is, but who wrote the driver for it?
    I guess attaching...
  6. Replies
    4
    Views
    607

    Re: conceptual problem

    Presumably if you think it can be made more stable, you know what the problems with it are? If not.... sounds like homework to me...

    The error checking is incorrect/incomplete, and there is...
  7. Replies
    3
    Views
    2,647

    Re: IMPLEMENT_DYNCREATE and abstract base classes

    Oops, I kind of posted a bad example above. I didn't realize CScrollView was actually an MFC class!

    Ok, well pretend its actually my own class, with pure virtual methods on it.
  8. Replies
    3
    Views
    2,647

    IMPLEMENT_DYNCREATE and abstract base classes

    I have
    CScrollView which inherits from CView
    - it add some virtual methods.

    CEditScrollView whith inherits from CScrollView
    - it implements those virtual methods.

    In...
  9. Replies
    2
    Views
    567

    How to implement Help?

    This may seem like a really stupid question... but how do I create a help file for my app?
    I've looked through MSDN, and there are lots of docs offering useful tips on how to organize your help,...
  10. Replies
    19
    Views
    3,823

    Re: Waiting in GUI till thread ends

    Give your dialog's hwnd to the thread. When the worker thread ends, have it post a message to your dialog to tell it that it's done.

    Make your own message, e.g.
    #define WM_MYTHREADENDED WM_USER...
  11. Replies
    11
    Views
    3,565

    Re: How to set default size of MDI child frame?

    Actually, PreCreateWindow doesn't work so well, because if I increase the size, MFC starts putting these things off the MDI area, and the user has to move them completely back on (e.g. the bottom is...
  12. Replies
    11
    Views
    3,565

    Re: How to set default size of MDI child frame?

    Well, both things work.

    ActivateFrame appears to be called only once, even if I switch between mdi children, maximize, restore, etc...

    But I've decided to take the PreCreateWindow route...
  13. Re: How do I make my dialog show up if it is doing work?

    Ok, right as I hit "Submit", I realized I could just do a ShowWindow myself.
    doh!
  14. How do I make my dialog show up if it is doing work?

    I have lengthy action that has a progress dialog. The dialog itself initiates the action: it spawns a worker thread and communicates with it using events.

    The problem is, if in OnInitDialog, I...
  15. Replies
    11
    Views
    3,565

    Re: How to set default size of MDI child frame?

    Thanks guys... I'll try out these methods and see which one works out (and rate accordingly :-) )
  16. Replies
    1
    Views
    627

    Child frame menubar

    Hi,
    When you define a document template in an MDI app, you specify the menu resource that gets used for the main frame.

    I have a bunch (~ 5) different document types that my application can load....
  17. Replies
    11
    Views
    3,565

    How to set default size of MDI child frame?

    I would like to make my MDI child frames come up at a larger size. Is there an easy way to do this? How does MFC determine the default size?

    Actually, even better might be to have them come up...
  18. Replies
    11
    Views
    1,359

    Re: memcpy driving me crazy

    It looks like your buffer is 16 characters long, and m_a, m_b, m_c and m_d all have values the ascii character '0'. So it's behaving as expected.

    Your buffer isn't null-terminated, so if you...
  19. Replies
    3
    Views
    979

    Re: MFC Threads and Messages

    The compiler error you're getting means that the function where that code exists is not a method on a CWnd class. Are you sure you added your function it to the class definition?
    Without posting...
  20. Static control: how to make ownerdraw in the IDE?

    The option to do so is not available in the properties for a static in VC++.
    I have to manually edit the .rc file, and only *then* does the option appear.

    Is there a way to avoid having to...
  21. Replies
    4
    Views
    1,149

    Re: CComboBox list doesn't show?

    I don't know how you're sizing it, but comboboxes are weird, in that the size you give them is the size of the box itself plus the dropdown height. So if they are sized only big enough for the box...
  22. Replies
    7
    Views
    1,004

    Re: How to close the exe program?

    Do you mean WM_CLOSE, instead of WM_DESTROY?
  23. Replies
    6
    Views
    929

    Re: Running proccess EAX info

    Well, I think you will see the values change all the time if you stepped through code. For example, the return value of a function is placed in the eax register. So it will change after every...
  24. Replies
    6
    Views
    929

    Re: Running proccess EAX info

    Hmm... but that value will change millions (billions?) of times a second just executing regular code.
    Maybe you're interested in if it changes at just one particular spot in the code?
  25. Replies
    6
    Views
    929

    Re: Running proccess EAX info

    What do you need to do that for?
    And what "script" are you talking about?
Results 1 to 25 of 105
Page 1 of 5 1 2 3 4





Click Here to Expand Forum to Full Width

Featured