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

Search:

Type: Posts; User: MasterDucky

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    108

    Re: Wm_drawitem

    I realize that maybe creating a chessboard with 64 "buttons" are not the best way.
    So my question is, is it better to draw the 64 cases and detect mouse clicks or is it better to create 64...
  2. Replies
    1
    Views
    108

    Wm_drawitem

    I'm writing a chessboard with GDI and when I click on a square the color changes to the opposite color but then it wont get redrawn again to normal.
    I verified and I get only 5 WM_DRAWITEM message...
  3. Replies
    5
    Views
    507

    Re: Gwlp_userdata

    Thanks Igor! :-)
  4. Replies
    5
    Views
    507

    Re: Gwlp_userdata

    Thank you Paul,

    So userdata means what is typed in the window for example or the coordinates of the window?

    Regards
  5. Replies
    5
    Views
    507

    Gwlp_userdata

    I have to call GetWindowLongPtr() with GWLP_USERDATA to redraw my tabcontrols.

    "Retrieves the user data associated with the window. This data is intended for use by the application that created...
  6. Replies
    10
    Views
    623

    Re: Paint on a Tabcontrol

    They are ok, returning the indexes of the tabs.
    Actually it not only breaks out of the switch() but it breaks out of the WM_DRAWITEM and never goes to the rest of the code, that is the problem.
    ...
  7. Replies
    10
    Views
    623

    Re: Paint on a Tabcontrol

    Thanks for the help.
    I tried to apply the code but I'm doing something wrong, the tabs won't even show up.


    #include <windows.h>
    #include <commctrl.h>
    #include <iostream>
    using namespace...
  8. Replies
    10
    Views
    623

    Re: Paint on a Tabcontrol

    I want to paint with GDI+ on it.

    Graphics graphics(hdc);
    Pen pen(Color(255, 0, 0, 255));
    graphics.DrawLine(&pen, 20, 20, 150, 550);

    I want to use only raw Win32 APIs and I...
  9. Replies
    10
    Views
    623

    Re: Paint on a Tabcontrol

    "Won't work" means that it won't paint, won't draw a line.

    I admit that I'm completely lost and I thought that you needed to declare this struct in order to paint on a tabcontrol.

    "it" is...
  10. Replies
    10
    Views
    623

    Re: Paint on a Tabcontrol

    Thanks for the guidance.
    So as I understand I have to use WM_DRAWITEM and not WM_PAINT.
    I set up a DRAWITEMSTRUCT structure and try to paint in WM_DRAWITEM but it still won't work.



    #include...
  11. Replies
    10
    Views
    623

    Paint on a Tabcontrol

    Hi,

    How to paint on a tabcontrol?
    I tried to take the window handle or the tab handle but none of them works.


    #include <windows.h>
    #include <commctrl.h>
    #include <iostream>
    using...
  12. Replies
    5
    Views
    496

    Re: Terminate a thread

    Thank you Igor, that's what I wanted to know.
  13. Replies
    5
    Views
    496

    Re: Terminate a thread

    Thank you OReubens, fortunately there is no painting involved only updating of a listbox.

    So can I assume that my method is the right one for what Im doing?
  14. Replies
    5
    Views
    496

    Terminate a thread

    Hi,

    I have a thread with a while(1) loop in it. When the user push the stop button I would like that thread to end.

    I thought about creating a bool and checking its value periodically in the...
  15. Re: Comparing dates of date and time picker control boxes

    Yes if I set them myself they are the same. :-)

    That makes sense, thank you Victor!
  16. Re: Comparing dates of date and time picker control boxes

    I think it gets set automatically because I only send a DTM_SETFORMAT message when they are created. This is the format I use
    LPSTR lpstrDate = "dd / MM / yyy dddd";
  17. Re: Comparing dates of date and time picker control boxes

    Today's date in this format: 08 / 11 / 2012 thursday
  18. Re: Comparing dates of date and time picker control boxes

    Hi Victor,

    I should get the same result because they have the same dates in it.
    But I get these two different values:

    time 129968818494020000
    time 129968818494290000

    Thanks for your help!
  19. Comparing dates of date and time picker control boxes

    I have I have two date and time picker boxes with the same dates in them and when I get the date from them they give different result.



    SYSTEMTIME st1 = {0}, st2 = {0};

    int r;
    ...
  20. Replies
    7
    Views
    1,253

    Re: closesocket()

    The MSDN link you gave me talking about the client
    "Gets FD_READ and calls recv to get any response data sent by server ."
    FD_READ is a windows message. Im only using a console program.
    Do you...
  21. Replies
    7
    Views
    1,253

    Re: closesocket()

    Thanks man, appreciate the help!
  22. Replies
    7
    Views
    1,253

    Re: closesocket()

    Thank you.
    Its the first time i hear about the shutdown(). Not many people use this function.
  23. Replies
    7
    Views
    1,253

    closesocket()

    I see different examples.
    Do I need to close both sockets or only the first one if I dont need them anymore?



    if ((sock2 = accept(Sock1, (struct sockaddr *)&ClientAddr, &paddr_sz)) ==...
  24. Re: Detect context menu item was clicked in listview

    Yes thank you Victor i found it. Its always easier after a good night sleep. :)
    I had to create an identifier and set it as InsertMenu's four parameter.
    And then check this identifier in...
  25. Detect context menu item was clicked in listview

    HMENU hPopupMenu = CreatePopupMenu();
    InsertMenu(hPopupMenu,
    0,
    MF_BYPOSITION | MF_STRING,
    (UINT_PTR)hPopupMenu,...
Results 1 to 25 of 120
Page 1 of 5 1 2 3 4



HTML5 Development Center

Click Here to Expand Forum to Full Width