Search:

Type: Posts; User: Boxknife

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    3,629

    After scouring MSDN, I found an answer...

    After scouring MSDN, I found an answer.

    You have to do something like:


    IDWriteFontCollection* collection;
    TCHAR name[64]; UINT32 findex; BOOL exists;
    ...
  2. Replies
    5
    Views
    3,629

    Nope, none of those are it. D: The calculation...

    Nope, none of those are it. D:

    The calculation seems to only be inaccurate for Truetype fonts.
  3. Replies
    5
    Views
    3,629

    Directwrite: Font height issues

    I'm using Directwrite to display scrollable text in a render target, and I want to calculate how many lines of text will fit per screen.

    I've been using this code to calculate the number of lines...
  4. Replies
    8
    Views
    905

    That's kind of a silly request, but here...

    That's kind of a silly request, but here.
  5. Replies
    25
    Views
    2,716

    Just to clarify, I didn't and don't recommend any...

    Just to clarify, I didn't and don't recommend any of the Guru series books either; I only mentioned the book because it's what I got off to my false start with.

    However, two of the five books (K&R...
  6. Replies
    3
    Views
    2,088

    If you don't already have something for...

    If you don't already have something for DisplayBits(), you can use


    void DisplayBits(unsigned value)
    {
    int i = 0, numbits = sizeof(unsigned int)*8;
    for(;i<numbits;i++)
    {
    if(!(i%4) && i)...
  7. Replies
    25
    Views
    2,716

    If you're just doing this for a kick and don't...

    If you're just doing this for a kick and don't have any serious expectations, you should ignore this and go have fun. You mentioned that you expect to be working on your project for a couple of...
  8. Replies
    2
    Views
    1,325

    The functions you've made to check the validity...

    The functions you've made to check the validity of date ranges have many errors in them and are the causes of your two (stated) problems. They also add unnecessary clutter to your class, and seem to...
  9. Replies
    19
    Views
    2,169

    What do you mean by nodes? Do you mean pointers...

    What do you mean by nodes? Do you mean pointers or structs?
  10. Replies
    2
    Views
    1,344

    The trickiest part of your job is probably...

    The trickiest part of your job is probably managing the memory for the array you'll need to store the words. Unless you'll be able to anticipate the length of the program's input every time it runs,...
  11. Replies
    4
    Views
    7,602

    You need to make sure str[] is terminated by a 0,...

    You need to make sure str[] is terminated by a 0, otherwise strlen() will run off the end and cause the seg fault.
  12. Replies
    19
    Views
    2,169

    The stdlib's qsort can help with the program's...

    The stdlib's qsort can help with the program's sorting logic. All you have to do is group all the data you want in a row into a struct, then pass an array of them to qsort() along with a function to...
  13. Replies
    2
    Views
    707

    #include const int var = 5; int...

    #include <stdio.h>

    const int var = 5;

    int main()
    {
    int MyVar = *((int*)0x4020a0);
    printf("%d\n", MyVar); /* This prints "5" on my computer */
    return 0;
    }
  14. Replies
    3
    Views
    3,315

    One alternative to using hooks would be to...

    One alternative to using hooks would be to superclass the "edit" control wndclass, like this:


    WNDCLASS wndclass;
    WNDPROC OldWndProc;
    HINSTANCE hInst;

    /* ... */

    hInst = GetModuleHandle(0);
  15. Replies
    2
    Views
    1,707

    Changing the printf to: std::cout

    Changing the printf to:
    std::cout<<szProcessed;
    std::cout.flush();
    worked marvelously. Thanks!
  16. Replies
    2
    Views
    1,707

    Trouble printing telnet "prompts"

    I'm having a strange problem with telnet prompt lines not printing in this program I've written. The data from the server are received and seem to be in the output buffer, but they won't print...
  17. Replies
    2
    Views
    993

    Thanks!

    Thanks!
  18. Replies
    2
    Views
    993

    Trouble with time.h

    How come the two dates printed out by this program are the same? :(


    #include <stdio.h>
    #include <stdlib.h>
    #include <time.h>

    int main()
    {
    time_t t, t2;
  19. Replies
    3
    Views
    11,559

    This may make things a bit more clear for you: ...

    This may make things a bit more clear for you:

    http://en.wikipedia.org/wiki/Stack_frame#Structure
  20. Replies
    10
    Views
    1,374

    int comp(const void* a, const void* b) { int...

    int comp(const void* a, const void* b)
    {
    int num1=**((int**)(a)), num2=**((int**)(b));
    return num1<num2 ? -1 : num1==num2 ? 0 : 1 ;
    }
    int comp_rev(const void* a, const void* b)
    {
    return...
  21. Thread: array help

    by Boxknife
    Replies
    4
    Views
    845

    In C++, there are smart arrays called vectors you...

    In C++, there are smart arrays called vectors you can use that can automatically resize themselves to hold as much input as you need. You can make a vector of integers like this:



    vector<int>...
  22. Thread: array help

    by Boxknife
    Replies
    4
    Views
    845

    In C++, there are smart arrays called vectors you...

    In C++, there are smart arrays called vectors you can use that can automatically resize themselves to hold as much data as you need them to. You can make a vector of integers like this:


    ...
  23. Funnily enough, I'd forgotten to copy the state...

    Funnily enough, I'd forgotten to copy the state pointer in the copy constructor that was being used (though I'd gotten it in the regular constructor and the overloaded assignment operator - those...
  24. You're right. The whole idea was to have it set...

    You're right. The whole idea was to have it set up so that I could make different connection states derived from that class to assign, and resolving the scope to the base class every time defeats...
  25. I think I found out what the problem was. ...

    I think I found out what the problem was.
    Changing the line that caused the crash to


    ch->GetState()->pdConState::ProcessUserInput(ch);

    makes the code work as expected.

    I'm still trying...
Results 1 to 25 of 54
Page 1 of 3 1 2 3