информационная безопасность
без паники и всерьез
 подробно о проектеRambler's Top100
Страшный баг в WindowsГде водятся OGRы
BugTraq.Ru
Русский BugTraq
 Анализ криптографических сетевых... 
 Модель надежности двухузлового... 
 Специальные марковские модели надежности... 
 Бэкдор в xz/liblzma, предназначенный... 
 Три миллиона электронных замков... 
 Doom на газонокосилках 
главная обзор RSN блог библиотека закон бред форум dnet о проекте
bugtraq.ru / форум / programming
Имя Пароль
ФОРУМ
если вы видите этот текст, отключите в настройках форума использование JavaScript
регистрация





Легенда:
  новое сообщение
  закрытая нитка
  новое сообщение
  в закрытой нитке
  старое сообщение
  • Напоминаю, что масса вопросов по функционированию форума снимается после прочтения его описания.
  • Новичкам также крайне полезно ознакомиться с данным документом.
[Win32] mozhet: Q130759? 25.06.02 04:57  Число просмотров: 957
Автор: + <Mikhail> Статус: Elderman
<"чистая" ссылка>
INFO: EM_SETHANDLE and EM_GETHANDLE Messages Not Supported

Q130759

--------------------------------------------------------------------------------
The information in this article applies to:

Microsoft Win32 Software Development Kit (SDK), used with:
Microsoft Windows 95
the operating system: Microsoft Windows 2000

--------------------------------------------------------------------------------


SUMMARY
The EM_GETHANDLE and EM_SETHANDLE messages are not supported for
edit contols that are created as controls of a 32-bit application
under Windows 95. This is due to the way USER is designed under
Windows 95 and Windows 2000. 16-bit applications work the same
way they did under Windows version 3.1. That is, they can use
the EM_GET/SETHANDLE messages. Also Win32-based applications
running under Windows NT will be able to use these messages.



MORE INFORMATION
The EM_GETHANDLE and EM_SETHANDLE messages are used to retrieve
and set the handle of the memory currently allocated for a multiline
edit control's text. USER under Windows 95 and Windows 2000 is
a mixture of 16-bit and 32-bit code, so edit controls created inside
a 32-bit application cannot use these messages to retrieve or set
the handles. Trying to do so causes the application to cause a
general protection (GP) fault and thereby be terminated by the System.

One workaround that involves a little code modification is to use
the GetWindowTextLengt(), GetWindowText(), and SetWindowText() APIs
to retrieve and set the text in a edit control.

NOTE: USER is almost completely 16-bit, so 32-bit applications thunk
down to the 16-bit USER. Also note that the EM_GETHANDLE and EM_SETHANDLE
messages cannot be used with Win32s-based applications either.

Additional query words:

Keywords : kbCtrl kbEditCtrl kbOSWin2000 kbSDKWin32 kbGrpDSUser kbOSWin95
Issue type : kbinfo
Technology : kbOSWin2000 kbOSWinSearch
<programming>
[Win32] editbox с буфером в локальной куче 25.06.02 03:33  
Автор: [H] Статус: Незарегистрированный пользователь
<"чистая" ссылка>
пытаюсь создать editbox с буфером в локальной куче


стиль такой:		WS_CHILD | WS_VISIBLE | WS_BORDER |
			ES_LEFT | ES_MULTILINE | ES_AUTOVSCROLL | 
			WS_VSCROLL | DS_LOCALEDIT



hMem = (HLOCAL) SendMessage(hEdit,EM_GETHANDLE,0,0);
if (hMem == NULL) MessageBox(NULL,"1",0,MB_OK);
if ( LocalFree(hMem) != NULL) {
	//MessageBox(NULL,"2",0,MB_OK);
	ShowError();		//->>>>>>>>>>>>>>>>  ошибка 6  - Error Look Up = "неверный дескриптер"
}
hMem = LocalAlloc(LPTR,1024);
SendMessage(hEdit,EM_SETHANDLE,(WPARAM) (HLOCAL) hMem,0);


в результате получаем editbox в котором ничего не печатается...кто поможет?

---
[Win32] mozhet: Q130759? 25.06.02 04:57  
Автор: + <Mikhail> Статус: Elderman
<"чистая" ссылка>
INFO: EM_SETHANDLE and EM_GETHANDLE Messages Not Supported

Q130759

--------------------------------------------------------------------------------
The information in this article applies to:

Microsoft Win32 Software Development Kit (SDK), used with:
Microsoft Windows 95
the operating system: Microsoft Windows 2000

--------------------------------------------------------------------------------


SUMMARY
The EM_GETHANDLE and EM_SETHANDLE messages are not supported for
edit contols that are created as controls of a 32-bit application
under Windows 95. This is due to the way USER is designed under
Windows 95 and Windows 2000. 16-bit applications work the same
way they did under Windows version 3.1. That is, they can use
the EM_GET/SETHANDLE messages. Also Win32-based applications
running under Windows NT will be able to use these messages.



MORE INFORMATION
The EM_GETHANDLE and EM_SETHANDLE messages are used to retrieve
and set the handle of the memory currently allocated for a multiline
edit control's text. USER under Windows 95 and Windows 2000 is
a mixture of 16-bit and 32-bit code, so edit controls created inside
a 32-bit application cannot use these messages to retrieve or set
the handles. Trying to do so causes the application to cause a
general protection (GP) fault and thereby be terminated by the System.

One workaround that involves a little code modification is to use
the GetWindowTextLengt(), GetWindowText(), and SetWindowText() APIs
to retrieve and set the text in a edit control.

NOTE: USER is almost completely 16-bit, so 32-bit applications thunk
down to the 16-bit USER. Also note that the EM_GETHANDLE and EM_SETHANDLE
messages cannot be used with Win32s-based applications either.

Additional query words:

Keywords : kbCtrl kbEditCtrl kbOSWin2000 kbSDKWin32 kbGrpDSUser kbOSWin95
Issue type : kbinfo
Technology : kbOSWin2000 kbOSWinSearch
1




Rambler's Top100
Рейтинг@Mail.ru


  Copyright © 2001-2024 Dmitry Leonov   Page build time: 0 s   Design: Vadim Derkach