Textbox

This is a discussion on Textbox within the Windows Programming forums, part of the Platform Specific Boards category; Thanks, but how can I make the textbox only a part of the window, not the entire window content? Ok, ...

  1. #16
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Thanks, but how can I make the textbox only a part of the window, not the entire window content?
    Ok, figured that out, but now how can I make it scroll, so I would be able to write much text to there?
    Another question. How can I get the value of the textbox?
    Last edited by maxorator; 09-24-2005 at 12:24 PM.

  2. #17
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    From anonty's code:

    Code:
    MoveWindow(GetDlgItem(hwnd, 0xED), rc.left, rc.top, rc.right, rc.bottom, TRUE);
    This changes the dimensions of the edit control so that it covers the whole thing. You can simply remove handling of the WM_SIZE message entirely and have the dimensions you want set in the initial CreateWindowEx call.

  3. #18
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Now I've got another question, how can I check if the button is pressed?
    Code:
                CreateWindowEx(NULL,"Button","Button",
                                   WS_BORDER | WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
                                   53, 1,
                                   80, 23,
                                   hwnd,(HMENU) 0xFD,
                                   GetModuleHandle(NULL),
                                   NULL);

  4. #19
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    Code:
    	case WM_COMMAND:
    		if(LOWORD(wParam) == ID_BUTTON)
    		{
    			doThings();
    		}
    WM_COMMAND notification reference: http://msdn.microsoft.com/library/de...wm_command.asp

  5. #20
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Another question, how can I set font to a textbox or button? I searched from google, but found nothing useful.

  6. #21
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Those examples didn't work because I don't even have things like IDC_LIST or IDC_NUMBER etc.
    Notice that in the URL anonytmous posted, you will not find the word "example". You find the word, "tutorial". Read the entire tutorial so you can understand how to use the Win32 SDK. Then you'll be in a better position to find answers for yourself about which particular function or variable you need to use to set a property of a control.

    When using Google to search for something in the Win32 SDK, add "MSDN" to your search query so that you'll get pages from the Win32 SDK documentation. It's usually best to click "Find more results from msdn.microsoft.com".

    For specific questions like this, you'll find this page useful: http://msdn.microsoft.com/library/de...incontrols.asp

    And please do not make multiple consecutive posts, especially when they're short messages. Instead, use the 'edit' button in the bottom-right hand corner of your post - a feature which I believe you've already been told about before.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 04-02-2009, 04:40 AM
  2. Replies: 5
    Last Post: 03-02-2009, 07:33 AM
  3. Problem with a multiline textbox
    By Zeokat in forum C# Programming
    Replies: 4
    Last Post: 10-24-2008, 01:14 PM
  4. inserting text in a textbox
    By Rune Hunter in forum C# Programming
    Replies: 1
    Last Post: 01-07-2006, 04:32 PM
  5. How would I add a textbox?
    By -KEN- in forum C# Programming
    Replies: 2
    Last Post: 11-13-2001, 01:02 PM

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