예제 #1
0
void  RichEditData_Destroy(void)
{
	int i;
	for (i=g_RichEditList.getCount()-1; i >= 0; i--) 
		CloseRichCallback(g_RichEditList[i]->hwnd);
	g_RichEditList.destroy();

	for (i=g_RichEditOwnerList.getCount()-1; i >= 0; i--) 
		CloseRichOwnerCallback(g_RichEditOwnerList[i]->hwnd);
	g_RichEditOwnerList.destroy();
}
예제 #2
0
static int MsgDlgHook(WPARAM, LPARAM lParam)
{
	const MessageWindowEventData *wndEvtData = (MessageWindowEventData*)lParam;
	switch(wndEvtData->uType) {
	case MSG_WINDOW_EVT_OPENING:
		MsgWndDetect(wndEvtData->hwndWindow, wndEvtData->hContact, NULL);
		if (wndEvtData->cbSize >= sizeof(MessageWindowEventData)) {
			SetRichOwnerCallback(wndEvtData->hwndWindow, wndEvtData->hwndInput, wndEvtData->hwndLog);

			if (wndEvtData->hwndLog)
				SetRichCallback(wndEvtData->hwndLog, wndEvtData->hContact, false, false);
			if (wndEvtData->hwndInput)
				SetRichCallback(wndEvtData->hwndInput, wndEvtData->hContact, false, false);
		}
		break;

	case MSG_WINDOW_EVT_OPEN:
		if (wndEvtData->cbSize >= sizeof(MessageWindowEventData)) {
			SetRichOwnerCallback(wndEvtData->hwndWindow, wndEvtData->hwndInput, wndEvtData->hwndLog);
			if (wndEvtData->hwndLog)
				SetRichCallback(wndEvtData->hwndLog, wndEvtData->hContact, true, true);
			if (wndEvtData->hwndInput) {
				SetRichCallback(wndEvtData->hwndInput, wndEvtData->hContact, true, true);
				SendMessage(wndEvtData->hwndInput, WM_REMAKERICH, 0, 0);
			}
		}
		break;

	case MSG_WINDOW_EVT_CLOSE:
		if (wndEvtData->cbSize >= sizeof(MessageWindowEventData) && wndEvtData->hwndLog) {
			CloseRichCallback(wndEvtData->hwndLog);
			CloseRichOwnerCallback(wndEvtData->hwndWindow);
		}
		break;
	}
	return 0;
}