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

Search:

Type: Posts; User: ejmw

Page 1 of 12 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    6
    Views
    2,737

    Re: [RESOLVED] Collections of classes / interfaces

    And, after playing around with it just a little more, I believe this would be the completely correct syntax (though the above does also work).
    public class CallingClass {
    public void...
  2. Replies
    6
    Views
    2,737

    Re: Collections of classes / interfaces

    OK, got it. This is what I was missing:
    public class CallingClass {
    public <T extends myInterface> void doSomething(AbstractCollection<T> myInts) {
    for(myInterface myInt : myInts) {...
  3. Replies
    6
    Views
    2,737

    Re: Collections of classes / interfaces

    Here's the error.
    CallingClass.java:20: doSomething(java.util.AbstractCollection<myInterface>) in CallingClass cannot be applied to (java.util.ArrayList<BaseClass>)
    ...
  4. Replies
    6
    Views
    2,737

    [RESOLVED] Collections of classes / interfaces

    Hey all,

    I'm a longtime C++ programmer who is doing java development now, and I'm having a little trouble figuring out how to do something and am hoping that someone can offer a solution (or at...
  5. Replies
    27
    Views
    5,454

    Re: sizeof() class with empty base class

    My guess is it has to do with a difference in if / when / how those compilers generate vtables. AFAIK that implementation detail is not covered in the C++ standard.

    Why does this affect what you...
  6. Replies
    10
    Views
    8,323

    Re: System Tray Application

    You at least need a window to receive notifications.

    Read up on Shell_NotifyIcon, that along with NOTIFYICONDATA struct should give you a good starting point.

    Make sure to remove your icon from...
  7. Replies
    2
    Views
    630

    Re: Clearing DrawText before next Draw...

    Can you give us more info about what type of window and where this is called from? Dialog, View, OnPaint(), what?

    My first inclination is to say that you need an InvalidateRect() call somewhere.
  8. Replies
    4
    Views
    6,082

    Re: How to get a control position?

    ScreenToClient(hPic, &p);
    As I said, you need to call ScreenToClient from your dialog. You're calling it with the handle of your control.

    Re-reading my post, I realize that wasn't very...
  9. Re: Using pointer to array of template in another template

    And by "should work" I mean "should compile". Can't vouch for your functionality :)
  10. Re: Using pointer to array of template in another template

    You are trying to pass in a constant as a reference, that is the compiler error. It doesn't have anything to do with your template.


    bool set(k&,v&); //Sets kv pair
    [...]...
  11. Replies
    4
    Views
    6,082

    Re: How to get a control position?

    Call GetWindowRect() on your control to get its bounding rectangle in screen coordinates, then call ScreenToClient() on that rect from your dialog to translate into dialog coordinates.
  12. Thread: learn C++

    by ejmw
    Replies
    2
    Views
    526

    Re: learn C++

    Someone else asked a similar question a few days ago, check out this thread.
  13. Replies
    8
    Views
    1,887

    Re: binary file read/write

    To piggyback on what Paul has already said, what you are looking to do is called serialization. There is a fairly comprehensive FAQ located here. I'd suggest checking that out and then posting any...
  14. Replies
    12
    Views
    4,547

    Re: what is wrong with my logic?

    Can you post your code as you currently have it? That compiler error usually indicates an issue with const correctness.
  15. Replies
    12
    Views
    4,547

    Re: what is wrong with my logic?

    You can use insert if you want instead of push_back() but push_back() sounds like it is more applicable to what you want to do. Anyway, this at least gives you the syntax that you need. There are...
  16. Replies
    8
    Views
    1,032

    Re: Execute Code After Dialog Finishes Drawing

    You could define your own WM_USER based message, use PostMessage in OnInitDialog() to post it, and run your code in that custom message handler.

    The more you describe it though the more I'm...
  17. Replies
    8
    Views
    1,032

    Re: Execute Code After Dialog Finishes Drawing

    No worries, we all have those moments (or days) :)
  18. Replies
    8
    Views
    1,032

    Re: Execute Code After Dialog Finishes Drawing

    Override OnInitDialog() and put it in there after calling up to the baseclass (i.e. CDialog::OnInitDialog()).
  19. Thread: Inventory System

    by ejmw
    Replies
    3
    Views
    4,037

    Re: Inventory System

    Your issue is that you're using uninitialized values. Here is the beginning of your editInventory() function. You never set s, s1, s2, s3, and s4 to the current values from your file.


    ...
  20. Replies
    6
    Views
    617

    Re: help me with avl tree

    I think you should go ahead and make a real attempt at writing this program, and then post with any problems you might have. At that point, I'll be happy to help you figure out what is wrong and...
  21. Replies
    6
    Views
    617

    Re: help me with avl tree

    I don't mean to be rude, but this sounds an awful lot like a homework problem or class project. Especially considering this is your first post ever.

    Do you think maybe you should look into hiring...
  22. Re: Get a notification when power source switches

    That I don't know, and the documentation isn't clear...but it should be trivial for you to test! I don't have the necessary hardware here, otherwise I'd give it a shot.
  23. Re: Get a notification when power source switches

    This is the notification that is sent when a power source switches: http://msdn.microsoft.com/en-us/library/aa372715%28v=VS.85%29.aspx
  24. Re: Problem With Passing List Of Values To A Function As An Argument

    I guess I'm not really sure where your problem is, but it seems like something like this should work for you.


    class Position
    {
    public:
    int x;
    int y;
    Position(int a, int b) :...
  25. Replies
    5
    Views
    1,264

    Re: Obtain hinstance for hdc

    Yeah. Use ::WindowFromDC(HDC) to get the HWND, then use ::GetWindowLong(HWND, GWL_HINSTANCE) to get the instance handle.
Results 1 to 25 of 295
Page 1 of 12 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)