Click here to Skip to main content
16,007,126 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: dynamic_cast in a constructor Pin
palbano30-Jan-03 8:54
palbano30-Jan-03 8:54 
GeneralRe: dynamic_cast in a constructor Pin
AlexO30-Jan-03 9:19
AlexO30-Jan-03 9:19 
GeneralRe: dynamic_cast in a constructor Pin
Joaquín M López Muñoz30-Jan-03 9:21
Joaquín M López Muñoz30-Jan-03 9:21 
GeneralRe: dynamic_cast in a constructor Pin
Blaster30-Jan-03 9:43
Blaster30-Jan-03 9:43 
GeneralRe: dynamic_cast in a constructor Pin
Blaster30-Jan-03 9:46
Blaster30-Jan-03 9:46 
Generaldraw some shapes without shownig them and without having a window & then save it as a bitmap Pin
mkashifkkj30-Jan-03 8:34
mkashifkkj30-Jan-03 8:34 
GeneralRe: draw some shapes without shownig them and without having a window & then save it as a bitmap Pin
l a u r e n30-Jan-03 9:26
l a u r e n30-Jan-03 9:26 
GeneralRe: draw some shapes without shownig them and without having a window & then save it as a bitmap Pin
mkashifkkj30-Jan-03 9:38
mkashifkkj30-Jan-03 9:38 
Yes u r right
but when creating memDC using CreateCompatibleDC(....
In parameters of this function device context with which drawing is done is also given.
So what device context shold be the parameter.
As
I am creating memDc in constructor of my view class
and getting devicecontect as
CDC *pDC=GetDC(); //step1/
//doing drawing with this pdc as pDC->Rectangle(....
//after this
CDC memDC;
memDC.CreateCompatibleDC(pDC);
//and then saving window image as bmp
but i am getting an empty image in bmp file.

If i use
HDC hdc=::GetDC(NULL) in place of step1
i get figures drawn but also the desktop imageis also painted.

So which device context should be used in step1.
Thanks for ur answer

GeneralRe: draw some shapes without shownig them and without having a window & then save it as a bitmap Pin
Mike Nordell30-Jan-03 12:03
Mike Nordell30-Jan-03 12:03 
GeneralRe: draw some shapes without shownig them and without having a window & then save it as a bitmap Pin
73Zeppelin30-Jan-03 16:38
73Zeppelin30-Jan-03 16:38 
GeneralUsing InsertMenu() Pin
ns30-Jan-03 8:10
ns30-Jan-03 8:10 
GeneralRe: Using InsertMenu() Pin
Joaquín M López Muñoz30-Jan-03 9:31
Joaquín M López Muñoz30-Jan-03 9:31 
QuestionReBar Vs. Toolbar? Pin
will138330-Jan-03 7:09
will138330-Jan-03 7:09 
AnswerRe: ReBar Vs. Toolbar? Pin
Abbas_Riazi30-Jan-03 7:20
professionalAbbas_Riazi30-Jan-03 7:20 
AnswerRe: ReBar Vs. Toolbar? Pin
Shog930-Jan-03 10:46
sitebuilderShog930-Jan-03 10:46 
QuestionReplacing A Running Executable? Pin
nde_plume30-Jan-03 6:50
nde_plume30-Jan-03 6:50 
AnswerRe: Replacing A Running Executable? Pin
Abbas_Riazi30-Jan-03 7:15
professionalAbbas_Riazi30-Jan-03 7:15 
AnswerRe: Replacing A Running Executable? Pin
Alvaro Mendez30-Jan-03 8:06
Alvaro Mendez30-Jan-03 8:06 
AnswerRe: Replacing A Running Executable? Pin
Todd Smith30-Jan-03 14:30
Todd Smith30-Jan-03 14:30 
Generalmessing with afxDump Pin
Scott H. Settlemier30-Jan-03 6:44
Scott H. Settlemier30-Jan-03 6:44 
GeneralRe: messing with afxDump Pin
mike_corrigan30-Jan-03 7:22
mike_corrigan30-Jan-03 7:22 
GeneralA problem updating FoxPro table. Pin
iluha30-Jan-03 6:11
iluha30-Jan-03 6:11 
GeneralChange Image in CListCtrl Pin
Marc Tompkins30-Jan-03 6:10
Marc Tompkins30-Jan-03 6:10 
GeneralRe: Change Image in CListCtrl Pin
Abbas_Riazi30-Jan-03 7:03
professionalAbbas_Riazi30-Jan-03 7:03 
GeneralDialog in dll Pin
dawo30-Jan-03 5:06
dawo30-Jan-03 5:06 

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.