Here's your starter for three...

This is a discussion on Here's your starter for three... within the Windows Programming forums, part of the Platform Specific Boards category; Hello, Just some quick questions to boggle your minds. 1. How do I work out what the height of an ...

  1. #1
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,266

    Here's your starter for three...

    Hello,

    Just some quick questions to boggle your minds.

    1. How do I work out what the height of an edit box is supposed to be, dependant on the font that it's using (In this example, the stock DEFAULT_GUI_FONT). I've tried:-
    Code:
    LOGFONT font;
    
    GetObject(GetStockObject(DEFAULT_GUI_FONT), sizeof(LOGFONT), &font);
    g_hwndEdit = CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT", "", WS_CHILD | WS_VISIBLE, 0, 0, 320, -font.lfHeight + 2 * GetSystemMetrics(SM_CYEDGE), hwnd, NULL, g_hInstance, NULL);
    ...but it's a little small for my liking. Any better ideas?

    2. How do I work out where the end of a HTTP header ends and the content begins? Should I look for the set of "\r\n"s between them, or is there a better way?

    3. Is the only way to know when a HTTP transfer has finished is when the server hangs up on you?

    Thanks for any help.
    Last edited by SMurf; 08-06-2003 at 08:12 AM.

  2. #2
    Registered User
    Join Date
    Jun 2003
    Posts
    245
    1) Use GetTextExtent32

    2) There's a blank line between the header and body data

    3) Look for the "Content-size" header

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Starter
    By SlashX1896 in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 09-14-2007, 11:30 AM
  2. Starter: what language I should focus on?
    By gibbofresco in forum C Programming
    Replies: 4
    Last Post: 09-25-2006, 05:09 AM
  3. Game Starter?
    By CammoDude91 in forum C++ Programming
    Replies: 20
    Last Post: 07-27-2003, 02:24 PM
  4. Active c programs.....a small prog. as starter
    By Animate in forum C Programming
    Replies: 4
    Last Post: 03-13-2002, 02:11 PM
  5. Game programming starter kit 4.0...
    By Leeman_s in forum Game Programming
    Replies: 7
    Last Post: 10-31-2001, 08:51 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21