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

Search:

Type: Posts; User: tgreaves

Page 1 of 2 1 2

Search: Search took 0.02 seconds.

  1. Replies
    3
    Views
    5,706

    Question about .manifest file

    I know the .manifest file is for dependensies for my program.. Is this to make sure that the "version" of the msvc dll's that is uses are the same as the "version" of the dll's that my program was...
  2. Replies
    12
    Views
    11,283

    Returning contents of int array from function

    Grr, cant seem to get this to work..

    I have a class that has

    The header has
    int* puzzle;

    The constructor has
    puzzle = new int[81];
  3. Replies
    3
    Views
    9,036

    How to see if char array is empty???

    I have a char array, char cCallProgram[8];

    After running some code I need to see if the array is == spaces..
    I am trying to do
    memcmp(cCallProgram, ' ', sizeof(cCallProgram))

    Its complaining...
  4. Replies
    11
    Views
    901

    Re: Someone tell me how this can be....

    so printf will dereference a pointer then? From what I gather here printf only gets memory addresses, is that correct?

    meaning:
    1. printf("abc123") means printf will get a memory address , and...
  5. Replies
    11
    Views
    901

    Re: Someone tell me how this can be....

    Right but suppose you passed a string to printf, it would print the value of the string.. But suppose you passed a pointer to a string, what would it print then?
  6. Replies
    11
    Views
    901

    Re: Someone tell me how this can be....

    So depending on how you use it, a char* can be a memory address or the value in the memory address?
  7. Replies
    11
    Views
    901

    Someone tell me how this can be....

    #include <stdio.h>

    char* arrayReturner()
    {
    static char arr[20] = "Hello World";
    printf("%s \n", arr);
    return(arr);
    }

    main()
  8. Replies
    10
    Views
    1,307

    Re: Why doesnt this memcmp work???

    I thought "if (!memcmp(szKeyName,szUp,2))" was testing for not zero???
  9. Replies
    10
    Views
    1,307

    Re: Why doesnt this memcmp work???

    Very strange.. This code below works..



    iMyInt = memcmp(szKeyName, szUp, 2);
    if (iMyInt == 0) {
    s_selected[mapSudokuBoard[hwnd]] = 0 ;
    SetFocus...
  10. Replies
    10
    Views
    1,307

    Re: Why doesnt this memcmp work???

    I havent checked the values as of yet.. My boss is a c++ programmer and thats just what he told me to use.. Ill check out strcmp also..
  11. Replies
    10
    Views
    1,307

    Why doesnt this memcmp work???

    Im new to c++ so bare with me.. This code compiles but it doesnt stop when they are equal.. Whats my problem?



    static TCHAR * szUp = TEXT ("Up")
    TCHAR szKeyName[32];

    if...
  12. Replies
    23
    Views
    2,774

    Re: Where to change bkgrnd color?

    Oh yeah, forgot about that one..
  13. Replies
    23
    Views
    2,774

    Re: Where to change bkgrnd color?

    Ahh, so invalidating the entire program would cause 81 different paint messages to come up then, correct? (there are 81 different windows for the game)..
  14. Replies
    23
    Views
    2,774

    Re: Where to change bkgrnd color?

    Web browsers dont have this feature either.. ;)
  15. Replies
    23
    Views
    2,774

    Re: Where to change bkgrnd color?

    Yeaaaa.. Works now.. Only thing I see is that its just a slow as before.. Im guess thats because im drawing each window individually, correct?

    Would it be better to invalidateRect the entire...
  16. Replies
    23
    Views
    2,774

    Re: Where to change bkgrnd color?

    Ok, I fixed the FillRect.. Was still using rect instead of rectPage..

    Problem im seeing now is then when the window is selected.. The number isnt selected.. Very strange..



    if...
  17. Replies
    23
    Views
    2,774

    Re: Where to change bkgrnd color?

    rect was the old "rect" that I was using.. I changed all of them to rectPage now..

    I changed the focus code that you gave me but it cant find GetSysMetrics.. Is there another include file that I...
  18. Replies
    23
    Views
    2,774

    Re: Where to change bkgrnd color?

    It doesnt seem to work correctly.. Here is my paint area..



    case WM_PAINT :
    hdc = BeginPaint (hwnd, &ps) ;
    RECT rectPage;
    GetClientRect(hwnd, &rectPage);
    ...
  19. Replies
    23
    Views
    2,774

    Re: Where to change bkgrnd color?

    Yes, can you send me an example of buffered painting..
  20. Replies
    23
    Views
    2,774

    Re: Where to change bkgrnd color?

    Awesome.. Thanks..

    Im going to use a for() loop for creating the windows.. Was just thinking about that actually..
  21. Replies
    23
    Views
    2,774

    Re: Where to change bkgrnd color?

    Well what I came up with is just a int array of 81 elements that im using as a switch to say if the window is selected or not.. If a user click on one of the windows then I go to my map (HWND, int)...
  22. Replies
    23
    Views
    2,774

    Re: Where to change bkgrnd color?

    Crap.. Spoke too soon... So I do a GetClientRect() to get the current Window size, then use a FillRect to fill it in and then do an InvalidateRect() to repaint the number thats in the window all...
  23. Replies
    23
    Views
    2,774

    Re: Where to change bkgrnd color?

    Its best to go for the gut when learning something new.. :)

    My problem is that the only way I know to change the background (without using WM_ERASEBKGND) is to begin and end paint which I should...
  24. Replies
    23
    Views
    2,774

    Where to change bkgrnd color?

    I have heard that you only paint the screen during a WM_PAINT message..

    Suppose I want to change the background color of window when a user click on it.. Is it ok to do a BeginPaint and EndPaint...
  25. Replies
    7
    Views
    1,114

    Re: What is the purpose of an iterator???

    So an iterator is a pointer to the key then?



    Ahh.. hehe, ok.. Will all the new things that im learning in c++ I think that everything has to do with c++..
Results 1 to 25 of 36
Page 1 of 2 1 2





Click Here to Expand Forum to Full Width

Featured