Advertisement

Peek Message vs. GetMessage(using an edit box with OpenGL)

Started by February 16, 2004 09:25 PM
0 comments, last by tylerbingham 21 years ago
I have a weird problem. I am using an OpenGL window and PeekMessage to check events, but I also have an Edit Box attached to the window(dialog GL program). The problem is that the program runs correctly, but the EditBox goes CRAZY!!! If I try to type anything...for instance "Hello" into the EditBox it ends up looking something like this "HHHHHHHHHeeeeeeeeeeeeelllllllloooooooooooooo". I know it is due to the fact that I am using PeekMessage, but I need the speed of PeekMessage for the OpenGL window, but I need GetMessage for the EditBox. Is it possible to use both or is there a way to control the EditBox somehow?
For my tool, I'm using this code :

HWND hwndCtrl = GetDlgItem(hwndDlg, IDC_EDIT1);int nTextLen = SendMessage(hwndCtrl, WM_GETTEXTLENGTH, 0, 0);Texture_Path = new TCHAR[nTextLen + 1];SendMessage(hwndCtrl, WM_GETTEXT, nTextLen + 1, (LPARAM)Texture_Path); 


And for writing the result in the edit box :

SendMessage(GetDlgItem(hwndDlg, IDC_EDIT1), WM_SETTEXT, 0, (LPARAM)TEXT(Texture_Path)); 


[edited by - Leyder Dylan on February 17, 2004 5:08:26 AM]
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/

This topic is closed to new replies.

Advertisement