Click here to Skip to main content
15,891,409 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Copy Folder? Pin
Larsson13-Jan-05 1:15
Larsson13-Jan-05 1:15 
GeneralShellExecute Pin
T i T i12-Jan-05 21:13
T i T i12-Jan-05 21:13 
GeneralRe: ShellExecute Pin
Antony M Kancidrowski12-Jan-05 23:44
Antony M Kancidrowski12-Jan-05 23:44 
GeneralI am confused with this: Pin
Noble D. Bell12-Jan-05 17:50
Noble D. Bell12-Jan-05 17:50 
GeneralRe: I am confused with this: Pin
ThatsAlok12-Jan-05 18:24
ThatsAlok12-Jan-05 18:24 
GeneralRe: I am confused with this: Pin
ThatsAlok12-Jan-05 18:25
ThatsAlok12-Jan-05 18:25 
GeneralRe: I am confused with this: Pin
Selvam R12-Jan-05 23:26
professionalSelvam R12-Jan-05 23:26 
GeneralPROBLEM DRAWING WITH A MOUSE Pin
phijophlip12-Jan-05 17:06
phijophlip12-Jan-05 17:06 
In the following code given below

void CMouseDlg::OnMouseMove(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
// for the left mouse click
if ( ( nFlags & MK_LBUTTON) == MK_LBUTTON)
{
CClientDC dc(this);

dc.SetPixel(point.x , point.y ,RGB(255,0,110) );

}

// for the right mouse click

if ( ( nFlags & MK_RBUTTON) == MK_RBUTTON)
{
CClientDC dc(this);

dc.SetPixel(point.x , point.y ,RGB(255,0,0) );

}


CDialog::OnMouseMove(nFlags, point);
}

This is a mfc program. This is simple drawing application using the mouse.

The problem is , when left button of the mouse is clicked and dragged on the dialog form red color is drawn on the dialog form.The same color is appears on the Dialog form when the right button of the mouse is clicked and drawn on the dialog form the same red color, even though the value of RGB value of the left button and RGB value of the right button are different as you can see from the above the code.


My question how can drawing with different colors for example
left button -> yellow color.
right button -> orange color.


Can anyone please help me regarding this matter?










PHILIP
GeneralRe: PROBLEM DRAWING WITH A MOUSE Pin
namaskaaram12-Jan-05 17:46
namaskaaram12-Jan-05 17:46 
GeneralRe: PROBLEM DRAWING WITH A MOUSE Pin
ThatsAlok12-Jan-05 18:49
ThatsAlok12-Jan-05 18:49 
GeneralCompiler error!! !! Pin
LiYS12-Jan-05 16:10
LiYS12-Jan-05 16:10 
GeneralRe: Compiler error!! !! Pin
nutkase12-Jan-05 22:18
nutkase12-Jan-05 22:18 
GeneralON_WM_KILLFOCUS Pin
digwizfox12-Jan-05 15:23
digwizfox12-Jan-05 15:23 
GeneralRe: ON_WM_KILLFOCUS Pin
Ryan Binns12-Jan-05 17:00
Ryan Binns12-Jan-05 17:00 
GeneralRe: ON_WM_KILLFOCUS Pin
digwizfox13-Jan-05 6:33
digwizfox13-Jan-05 6:33 
GeneralDynamic Views Pin
Anonymous12-Jan-05 15:12
Anonymous12-Jan-05 15:12 
GeneralRe: Dynamic Views Pin
Yulianto.12-Jan-05 15:31
Yulianto.12-Jan-05 15:31 
GeneralMSVC 2003 GUI Help Pin
c++code10112-Jan-05 14:31
c++code10112-Jan-05 14:31 
GeneralSending output to a printer Pin
BRIMID12-Jan-05 13:29
BRIMID12-Jan-05 13:29 
GeneralMFC socket programing problem Pin
shaihnc12-Jan-05 12:39
shaihnc12-Jan-05 12:39 
GeneralRe: MFC socket programing problem Pin
shaihnc13-Jan-05 5:32
shaihnc13-Jan-05 5:32 
GeneralSpeed of operators Pin
Malcolm Smart12-Jan-05 11:57
Malcolm Smart12-Jan-05 11:57 
GeneralRe: Speed of operators Pin
Rick York12-Jan-05 12:18
mveRick York12-Jan-05 12:18 
GeneralRe: Speed of operators Pin
Mike Dimmick12-Jan-05 12:19
Mike Dimmick12-Jan-05 12:19 
GeneralRe: Speed of operators Pin
Mike Dimmick12-Jan-05 12:59
Mike Dimmick12-Jan-05 12:59 

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.