Click here to Skip to main content
16,011,957 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: hdc to Bitmap Pin
GauranG Shah10-Oct-07 23:24
GauranG Shah10-Oct-07 23:24 
GeneralRe: hdc to Bitmap Pin
GauranG Shah11-Oct-07 0:46
GauranG Shah11-Oct-07 0:46 
GeneralRe: hdc to Bitmap Pin
GauranG Shah11-Oct-07 2:00
GauranG Shah11-Oct-07 2:00 
GeneralRe: hdc to Bitmap Pin
Nelek11-Oct-07 2:39
protectorNelek11-Oct-07 2:39 
GeneralRe: hdc to Bitmap Pin
GauranG Shah11-Oct-07 2:53
GauranG Shah11-Oct-07 2:53 
GeneralRe: hdc to Bitmap [modified] Pin
Nelek11-Oct-07 3:11
protectorNelek11-Oct-07 3:11 
GeneralRe: hdc to Bitmap Pin
GauranG Shah11-Oct-07 3:35
GauranG Shah11-Oct-07 3:35 
GeneralRe: hdc to Bitmap [modified] Pin
Nelek11-Oct-07 20:29
protectorNelek11-Oct-07 20:29 
Last message I told you.

If you only set the image in your static control once then, you will always lose it when something particular happens (like min / maximize).
So...


One way can it be, create an abstract class derived from CObject. Create a CBitmap member variable inside. Once you have the screen capture, save it in the help-class.

Then include the class to your dialog, and... Write the code to put the bitmap in the control, inside the CDialog::OnPaint ()


If you want to put a image in the control at running time, (I am not 100% sure but...) there is no way to do it permanently but including the desired image everytime the window is refreshed, if not... every time the window is moved, minimized and so on... the intern Invalidate () to clean your screen will erase the pixels that are in the image, and if you dont load them another time... there is nothing to do. Yes there is... look above

In your place... I would do it as I said. Capture the desktop, save the image in an abstract class (or in a intern variable of the dialog) and code the insertion of the image in the static control inside your OnPaint or OnDraw.

If there is another way to do it... I don't know how, so if another one answers you, I will learn something new as well. (Correct answer above)

Good luck


-- modified at 5:01 Tuesday 16th October, 2007


-- modified at 5:02 Tuesday 16th October, 2007

Greetings.

--------
M.D.V.

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?

Help me to understand what I'm saying, and I'll explain it better to you

Wink | ;)

GeneralRe: hdc to Bitmap Pin
Mark Salsbery11-Oct-07 20:51
Mark Salsbery11-Oct-07 20:51 
GeneralRe: hdc to Bitmap Pin
Nelek15-Oct-07 23:01
protectorNelek15-Oct-07 23:01 
QuestionGrid computing and Virtualization Pin
GeraldGg10-Oct-07 21:43
GeraldGg10-Oct-07 21:43 
QuestionLPNMITEMACTIVATE is always giving iItem as -1 Pin
yaminisridaran10-Oct-07 21:25
yaminisridaran10-Oct-07 21:25 
AnswerRe: LPNMITEMACTIVATE is always giving iItem as -1 Pin
Roger Broomfield10-Oct-07 21:58
Roger Broomfield10-Oct-07 21:58 
GeneralRe: LPNMITEMACTIVATE is always giving iItem as -1 Pin
yaminisridaran11-Oct-07 0:21
yaminisridaran11-Oct-07 0:21 
GeneralRe: LPNMITEMACTIVATE is always giving iItem as -1 Pin
Member 114900489-Mar-15 0:46
Member 114900489-Mar-15 0:46 
Question[SOLVED] Get text associated with 'Edit Control' in MFC Pin
CodingLover10-Oct-07 21:19
CodingLover10-Oct-07 21:19 
AnswerRe: Get text associated with 'Edit Control' in MFC Pin
Paresh Chitte10-Oct-07 21:39
Paresh Chitte10-Oct-07 21:39 
GeneralRe: Get text associated with 'Edit Control' in MFC Pin
CodingLover10-Oct-07 22:21
CodingLover10-Oct-07 22:21 
GeneralRe: Get text associated with 'Edit Control' in MFC Pin
jhwurmbach10-Oct-07 22:37
jhwurmbach10-Oct-07 22:37 
GeneralRe: Get text associated with 'Edit Control' in MFC Pin
CodingLover10-Oct-07 22:43
CodingLover10-Oct-07 22:43 
GeneralRe: Get text associated with 'Edit Control' in MFC Pin
jhwurmbach10-Oct-07 22:59
jhwurmbach10-Oct-07 22:59 
GeneralRe: Get text associated with 'Edit Control' in MFC Pin
CodingLover10-Oct-07 23:05
CodingLover10-Oct-07 23:05 
AnswerRe: Get text associated with 'Edit Control' in MFC Pin
chandu00410-Oct-07 22:24
chandu00410-Oct-07 22:24 
GeneralRe: Get text associated with 'Edit Control' in MFC Pin
CodingLover10-Oct-07 22:40
CodingLover10-Oct-07 22:40 
GeneralRe: Get text associated with 'Edit Control' in MFC [modified] Pin
chandu00410-Oct-07 23:08
chandu00410-Oct-07 23:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.