"MS Paint-style" text input on CWnd
-
I have to put some graphical functions to an dialog-based application using MFC/GDI/GDI+. One of them is to give the user the abbility to write text-comments on a image. Like you can do in MSPaint (and Photshop, GIMP ... ). I found thats relatively easy to parse the mouse - and keyboard input and simply write it to screen (using Graphics DrawString - Method), but it seems to be not trivial to enable editing of the written text (blinking cursor when double-clicking on the text ie). Or setting up a correct-sized (and blinking ;) ) cursor to signalize, that the app is ready to parse keyboard input. So, does someone got a idea how to implement MSPaint-like text input on CWnd? Searched for 2 days for demo-projects or smth like that, no success at all. Thanks in advance and sorry for my ******* english.
-
I have to put some graphical functions to an dialog-based application using MFC/GDI/GDI+. One of them is to give the user the abbility to write text-comments on a image. Like you can do in MSPaint (and Photshop, GIMP ... ). I found thats relatively easy to parse the mouse - and keyboard input and simply write it to screen (using Graphics DrawString - Method), but it seems to be not trivial to enable editing of the written text (blinking cursor when double-clicking on the text ie). Or setting up a correct-sized (and blinking ;) ) cursor to signalize, that the app is ready to parse keyboard input. So, does someone got a idea how to implement MSPaint-like text input on CWnd? Searched for 2 days for demo-projects or smth like that, no success at all. Thanks in advance and sorry for my ******* english.
Hope I understood your question You draw a image on screen and now you want to write on the image and also you need to modify image. Maybe this way isnt good but its possible. You draw your image when you want to write a text on image use of a editbox for gets text and transfer your text when it finish to a external image if you need to modify this text again use of editbox for it. But maybe you ask I need to write this text on image and also location of text is important,not problem when you click mouse on screen create editbox on it location and set external image on this location when you want to close app or close image write these texts to Main Image. (You need to arrays for save these text or texts and also location of these texts)
WhiteSky
-
I have to put some graphical functions to an dialog-based application using MFC/GDI/GDI+. One of them is to give the user the abbility to write text-comments on a image. Like you can do in MSPaint (and Photshop, GIMP ... ). I found thats relatively easy to parse the mouse - and keyboard input and simply write it to screen (using Graphics DrawString - Method), but it seems to be not trivial to enable editing of the written text (blinking cursor when double-clicking on the text ie). Or setting up a correct-sized (and blinking ;) ) cursor to signalize, that the app is ready to parse keyboard input. So, does someone got a idea how to implement MSPaint-like text input on CWnd? Searched for 2 days for demo-projects or smth like that, no success at all. Thanks in advance and sorry for my ******* english.