PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Edit Control + SIP

I've created a simple edit control in EVC using CreateWindow (a direct child of my main window), with the hopes of being able to enter text into it with the SIP. Unfortunately, the SIP isn't doing anything. I can select text in the edit box and copy and paste it, but that's not really what I was looking for. I was under the impression that the SIP would just work, and the window procedure would handle everything as usual. Am I missing something here? I've looked at code for other apps, and I see no special code that interprets messages from the SIP with regard to text input.
So as you type into the SIP, nothing is appearing in the edit control? Does the edit control have focus? What does your CreateWindow call look like for the edit control?

Dan East
hwndTextBox = CreateWindow(
L"EDIT", // predefined class
L"", // text
styles | WS_CHILD | WS_VISIBLE,
10, // starting x position
10, // starting y position
100, // width
20, // height
hWndMain, // parent window
NULL, // No menu
g_hInst,
NULL); // pointer not needed

Yes, it has focus; as I type into the SIP nothing appears in the edit control.
What is styles value? Can you type numbers?

Dan East
The styles shouldn't be in there, it holds no value. I had that piece of code as a function call and in my editing it to make it easier to read I left it in.

I still can't enter anything into the text box (including numbers), it only holds WS_BORDER | WS_CHILD styles. I then make it visible using ShowWindow, and when it has focus, I discovered I can use the arrows in the SIP to move the caret around, but that's it. I tried commenting out vast amounts of code in my window proc thinking they might somehow interfere, but so far nothing.
The reason I asked what styles' value is because if it is not properly initialized then it could have the ES_READONLY bit set.

Dan East
I'm out of ideas, and just plain annoyed. I haven't used ES_READONLY style at all, and I've even tried SendMessage(hwndTextBox1,EM_SETREADONLY,FALSE,0); to make sure it's not set like this. Nothing works. What would be 'properly initialized'?
DWORD style=WS_BORDER;

Dan East