win32gui message history; also clipboard support (from <Someone>)
- added 2 menu options: Copy ASCII Screenshot To Clipboard, Save ASCII Screenshot To File - implemented saving message history
This commit is contained in:
+29
-1
@@ -520,7 +520,35 @@ void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
ReleaseDC(hWnd, hdc);
|
||||
} break;
|
||||
}
|
||||
|
||||
case MSNH_MSG_GETTEXT: {
|
||||
PMSNHMsgGetText msg_data = (PMSNHMsgGetText)lParam;
|
||||
size_t index;
|
||||
int col, row;
|
||||
int color;
|
||||
unsigned special;
|
||||
int mgch;
|
||||
|
||||
index = 0;
|
||||
for( row=0; row<ROWNO; row++ ) {
|
||||
for( col=0; col<COLNO; col++ ) {
|
||||
if( index>=msg_data->max_size ) break;
|
||||
if( data->map[col][row] == -1 ) {
|
||||
mgch = ' ';
|
||||
} else {
|
||||
mapglyph(data->map[col][row], &mgch, &color,
|
||||
&special, col, row);
|
||||
}
|
||||
msg_data->buffer[index] = mgch;
|
||||
index++;
|
||||
}
|
||||
if( index>=msg_data->max_size-1 ) break;
|
||||
msg_data->buffer[index++] = '\r';
|
||||
msg_data->buffer[index++] = '\n';
|
||||
}
|
||||
} break;
|
||||
|
||||
} /* end switch(wParam) */
|
||||
}
|
||||
|
||||
/* on WM_CREATE */
|
||||
|
||||
Reference in New Issue
Block a user