Click here to Skip to main content
15,894,646 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: activex problem Pin
Michael P Butler18-Dec-03 20:39
Michael P Butler18-Dec-03 20:39 
GeneralRe: activex problem Pin
Prakash Nadar18-Dec-03 21:13
Prakash Nadar18-Dec-03 21:13 
GeneralRe: activex problem Pin
satadru18-Dec-03 21:26
satadru18-Dec-03 21:26 
QuestionHow to handle windows messages in COM Exe server? Pin
Prakash Nadar18-Dec-03 19:54
Prakash Nadar18-Dec-03 19:54 
AnswerRe: How to handle windows messages in COM Exe server? Pin
Monty218-Dec-03 20:25
Monty218-Dec-03 20:25 
GeneralRe: How to handle windows messages in COM Exe server? Pin
Prakash Nadar18-Dec-03 21:11
Prakash Nadar18-Dec-03 21:11 
AnswerRe: How to handle windows messages in COM Exe server? Pin
John R. Shaw18-Dec-03 21:06
John R. Shaw18-Dec-03 21:06 
Generaldrawing from doc Pin
R. Thomas18-Dec-03 19:25
R. Thomas18-Dec-03 19:25 
hi..i need help on a prob pls...
i have a proj where i draw a rect in the OnDraw of my proj's View...


code:
--------------------------------------------------------------------------------
//
//Set the mapping mode to LOENGLISH
//
pDC->SetMapMode(MM_LOENGLISH);

//
//Convert arguments to coordinates to MM_LOENGLISH units.
//
CSize szTemp;
szTemp.cx = pDoc->GetGridX();//get the left of the rect to be drawn
szTemp.cy = pDoc->GetGridY();//get the bottom of the same rect
pDC->DPtoLP(&szTemp);

//
//Draw the size preview
//
CRect rect( 10, -10, szTemp.cx, -szTemp.cy );
pDC->Rectangle(rect);
--------------------------------------------------------------------------------

now after the rect is draw..i want to do the following:
given a point say 20,20.....so every time i get i point i make it into a rect and color it say red...
so if i get a point 20, 20
i amke arect
20,-20,21,-21
works fine now...but io ahve one doubt...
where should i do this this calculation???in the OnUpdate?
in the DOC?make my own fn in a view and put it there?
the point i get from which i am supposed to make the small rect comes from DOC.
so from doc where should i go to do this calulation???
code:
--------------------------------------------------------------------------------
CRect rect(x,-y,x+1,-(y+1));
pDC->Rectangle(rect);
pDC->FillRect(rect, &brush);
UpdateAllViews(NULL,.....);
--------------------------------------------------------------------------------
if i do this in doc..how do i get the DC????
please help...tks a lot...
can i get the dc like this
CClient dc(this);
will this dc be the dc of the view???
can i do the drtawiung using this dc that i make in doc???
tks a lot..really appreciate your time and help..

Have a Super Blessed Day!
-------------------------
For God has not given us a spirit of fear, but of power and of love and of a sound mind.
2 Timothy 1:7
"For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life."
John 3:16
"Therefore you also be ready, for the Son of Man is coming at an hour you do not expet."
Luke 12:40

GeneralRe: drawing from doc Pin
Monty218-Dec-03 19:47
Monty218-Dec-03 19:47 
GeneralRe: drawing from doc Pin
R. Thomas18-Dec-03 20:02
R. Thomas18-Dec-03 20:02 
GeneralRe: drawing from doc Pin
Monty218-Dec-03 20:21
Monty218-Dec-03 20:21 
GeneralRe: drawing from doc Pin
John R. Shaw18-Dec-03 20:40
John R. Shaw18-Dec-03 20:40 
GeneralGets a toolbar button ID!!! Pin
Eugene Pustovoyt18-Dec-03 19:22
Eugene Pustovoyt18-Dec-03 19:22 
GeneralRe: Gets a toolbar button ID!!! Pin
John R. Shaw18-Dec-03 20:02
John R. Shaw18-Dec-03 20:02 
GeneralRe: Gets a toolbar button ID!!! Pin
Eugene Pustovoyt18-Dec-03 20:23
Eugene Pustovoyt18-Dec-03 20:23 
GeneralRe: Gets a toolbar button ID!!! Pin
John R. Shaw18-Dec-03 22:01
John R. Shaw18-Dec-03 22:01 
GeneralRe: Gets a toolbar button ID!!! Pin
Eugene Pustovoyt18-Dec-03 23:29
Eugene Pustovoyt18-Dec-03 23:29 
Generalabout CFileDialog... Pin
Grrrr18-Dec-03 18:34
Grrrr18-Dec-03 18:34 
GeneralRe: about CFileDialog... Pin
John R. Shaw18-Dec-03 19:34
John R. Shaw18-Dec-03 19:34 
Generalchanging the menu bar due to a drop-down list selection Pin
Hin Jang18-Dec-03 18:32
Hin Jang18-Dec-03 18:32 
GeneralRe: changing the menu bar due to a drop-down list selection Pin
John R. Shaw18-Dec-03 19:13
John R. Shaw18-Dec-03 19:13 
GeneralWM_CLOSE Priority Pin
Anonymous18-Dec-03 18:24
Anonymous18-Dec-03 18:24 
GeneralRe: WM_CLOSE Priority Pin
John R. Shaw18-Dec-03 18:58
John R. Shaw18-Dec-03 18:58 
GeneralRe: WM_CLOSE Priority Pin
Anonymous18-Dec-03 19:14
Anonymous18-Dec-03 19:14 
GeneralRe: WM_CLOSE Priority Pin
Monty218-Dec-03 19:42
Monty218-Dec-03 19:42 

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.