Click here to Skip to main content
15,915,172 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CString to char conversion Pin
James R. Twine20-Apr-05 8:50
James R. Twine20-Apr-05 8:50 
GeneralRe: CString to char conversion Pin
hithesh20-Apr-05 9:26
hithesh20-Apr-05 9:26 
GeneralRe: CString to char conversion Pin
Rick York20-Apr-05 10:22
mveRick York20-Apr-05 10:22 
GeneralRe: CString to char conversion Pin
hithesh20-Apr-05 10:38
hithesh20-Apr-05 10:38 
GeneralRe: CString to char conversion Pin
ThatsAlok20-Apr-05 17:51
ThatsAlok20-Apr-05 17:51 
GeneralGrab Webpage to clipboard (as bitmap) Pin
Mathefreak19-Apr-05 23:11
Mathefreak19-Apr-05 23:11 
GeneralRe: Grab Webpage to clipboard (as bitmap) Pin
Sheng Jiang 蒋晟20-Apr-05 13:19
Sheng Jiang 蒋晟20-Apr-05 13:19 
Questionhow to make lines visible all the time!! Pin
mafuza19-Apr-05 23:03
mafuza19-Apr-05 23:03 
Hi..

I have a problem with line that I draw using mouse click (LButtonDown). I use VC++ and MFC.
The problem is whenever I maximize or minimize the window the lines that I draw dissapear.
Below is my code for LButtonDown :

struct LINE
{
int xp[2];
int yp[2];
};
LINE L[100];

int Lnum = 0;
int icoord = 0;
int isline =0;
int psize = 1;


if(bLineFlag)
{
CPen penRed(PS_SOLID,1,RGB(250,0,0));
CPen *pOldPen = NULL;
pOldPen = pDC->SelectObject(&penRed);
CRect rcClient;
GetClientRect(&rcClient);
CPoint xpoint,ypoint;

L[Lnum].xp[icoord] = point.x / psize;
L[Lnum].yp[icoord] = point.y / psize;
if(icoord ==0)
{
icoord++;
isline = 0;
}
else
{
isline =1;
pDC->MoveTo(L[Lnum].xp[0],L[Lnum].yp[0]);
t.x = L[Lnum].xp[0];
t.y = L[Lnum].yp[0];

pDC->LineTo(L[Lnum].xp[1],L[Lnum].yp[1]);
p.x = L[Lnum].xp[1];
p.y = L[Lnum].yp[1];

icoord =0;
}
DrawCross(point,RGB(0,255,0),5,pDC->m_hDC);
}

Could anyone help me with the problem..


mafuza
AnswerRe: how to make lines visible all the time!! Pin
Cedric Moonen19-Apr-05 23:15
Cedric Moonen19-Apr-05 23:15 
GeneralRe: how to make lines visible all the time!! Pin
mafuza21-Apr-05 22:13
mafuza21-Apr-05 22:13 
GeneralRe: how to make lines visible all the time!! Pin
Cedric Moonen21-Apr-05 22:18
Cedric Moonen21-Apr-05 22:18 
GeneralAutomatic Proxy URL Pin
Geert van Horrik19-Apr-05 22:05
Geert van Horrik19-Apr-05 22:05 
GeneralChange text color in static (ATL+MFC) problem Pin
AdyOS19-Apr-05 21:43
AdyOS19-Apr-05 21:43 
GeneralRe: Change text color in static (ATL+MFC) problem Pin
Geert van Horrik19-Apr-05 22:05
Geert van Horrik19-Apr-05 22:05 
GeneralRe: Change text color in static (ATL+MFC) problem Pin
AdyOS19-Apr-05 22:22
AdyOS19-Apr-05 22:22 
GeneralRe: Change text color in static (ATL+MFC) problem Pin
David Crow20-Apr-05 2:30
David Crow20-Apr-05 2:30 
Generalline color of statistic Pin
ThinkingPrometheus19-Apr-05 21:34
ThinkingPrometheus19-Apr-05 21:34 
Generalconvert string to double or string to ascii Pin
nehathoma19-Apr-05 19:18
nehathoma19-Apr-05 19:18 
GeneralRe: convert string to double or string to ascii Pin
22491719-Apr-05 19:31
22491719-Apr-05 19:31 
Generalconversion string double or string to ascci Pin
shaans19-Apr-05 19:17
shaans19-Apr-05 19:17 
GeneralRe: conversion string double or string to ascci Pin
Christian Graus19-Apr-05 19:25
protectorChristian Graus19-Apr-05 19:25 
GeneralGetting the extent of Text with a seleted Font!! in VC++ Pin
ashwinder19-Apr-05 19:13
ashwinder19-Apr-05 19:13 
GeneralRe: Getting the extent of Text with a seleted Font!! in VC++ Pin
David Crow20-Apr-05 2:35
David Crow20-Apr-05 2:35 
QuestionHow to statically bind (link) an "ocx"? Pin
Jahfer V P19-Apr-05 19:03
sussJahfer V P19-Apr-05 19:03 
AnswerRe: How to statically bind (link) an "ocx"? Pin
22491719-Apr-05 20:11
22491719-Apr-05 20:11 

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.