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

C / C++ / MFC

 
AnswerRe: No RTTI tutorials? Pin
led mike8-Oct-08 10:25
led mike8-Oct-08 10:25 
JokeRe: No RTTI tutorials? Pin
CPallini8-Oct-08 10:45
mveCPallini8-Oct-08 10:45 
GeneralRe: No RTTI tutorials? Pin
George_George8-Oct-08 19:42
George_George8-Oct-08 19:42 
QuestionCreate blue border around edge of MFC dialog Pin
Dhiraj kumar Saini8-Oct-08 1:10
Dhiraj kumar Saini8-Oct-08 1:10 
AnswerRe: Create blue border around edge of MFC dialog Pin
MANISH RASTOGI8-Oct-08 1:22
MANISH RASTOGI8-Oct-08 1:22 
GeneralRe: Create blue border around edge of MFC dialog Pin
Maximilien8-Oct-08 1:32
Maximilien8-Oct-08 1:32 
GeneralRe: Create blue border around edge of MFC dialog Pin
Dhiraj kumar Saini8-Oct-08 1:38
Dhiraj kumar Saini8-Oct-08 1:38 
GeneralRe: Create blue border around edge of MFC dialog Pin
Jijo.Raj8-Oct-08 2:02
Jijo.Raj8-Oct-08 2:02 
Code snippet for drawing blue rectangle with 3 pixel width. Smile | :)

void CDialogDlg::OnPaint() 
{
   CPaintDC dc(this); // device context for painting
   
   // Blue pen with 3 pixel width.
   LOGPEN LogPen = { 0 };
   LogPen.lopnColor = RGB( 0,0,255 );
   LogPen.lopnStyle = PS_SOLID;

   POINT ptWidth;
   ptWidth.x = 3; // Pen size 3.
   LogPen.lopnWidth = ptWidth;

   // Create the Pen.
   CPen BluePen;
   BluePen.CreatePenIndirect( &LogPen );

   // Select Blue Pen to DC.
   HPEN OldPen = (HPEN) dc.SelectObject( (HPEN)BluePen.GetSafeHandle());

   // Get the window client rect and draw Blue Rectangle.
   RECT rect;
   GetClientRect( &rect );
   dc.Rectangle( &rect );

   // Select back the old pen.
   dc.SelectObject( OldPen );
}


Regards,
Jijo.

_____________________________________________________

http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

GeneralRe: Create blue border around edge of MFC dialog Pin
Dhiraj kumar Saini8-Oct-08 2:12
Dhiraj kumar Saini8-Oct-08 2:12 
GeneralRe: Create blue border around edge of MFC dialog Pin
Mark Salsbery8-Oct-08 5:16
Mark Salsbery8-Oct-08 5:16 
Questionhow to use Named pipe in Client server application Pin
singh_nav8-Oct-08 0:53
singh_nav8-Oct-08 0:53 
AnswerRe: how to use Named pipe in Client server application Pin
MANISH RASTOGI8-Oct-08 1:12
MANISH RASTOGI8-Oct-08 1:12 
AnswerRe: how to use Named pipe in Client server application Pin
Mark Salsbery8-Oct-08 5:30
Mark Salsbery8-Oct-08 5:30 
GeneralRe: how to use Named pipe in Client server application Pin
singh_nav9-Oct-08 21:15
singh_nav9-Oct-08 21:15 
GeneralRe: how to use Named pipe in Client server application Pin
Mark Salsbery10-Oct-08 4:45
Mark Salsbery10-Oct-08 4:45 
QuestionSupporting Two USB mice on a single computer Pin
K. N. Nair8-Oct-08 0:43
K. N. Nair8-Oct-08 0:43 
AnswerRe: Supporting Two USB mice on a single computer Pin
Sauce!9-Oct-08 18:22
Sauce!9-Oct-08 18:22 
QuestionUsing exported varible from dll Pin
MANISH RASTOGI7-Oct-08 23:28
MANISH RASTOGI7-Oct-08 23:28 
AnswerRe: Using exported varible from dll Pin
CPallini7-Oct-08 23:37
mveCPallini7-Oct-08 23:37 
GeneralRe: Using exported varible from dll Pin
MANISH RASTOGI7-Oct-08 23:43
MANISH RASTOGI7-Oct-08 23:43 
QuestionRe: Using exported varible from dll Pin
CPallini7-Oct-08 23:56
mveCPallini7-Oct-08 23:56 
AnswerRe: Using exported varible from dll Pin
MANISH RASTOGI8-Oct-08 0:01
MANISH RASTOGI8-Oct-08 0:01 
GeneralRe: Using exported varible from dll Pin
CPallini8-Oct-08 0:31
mveCPallini8-Oct-08 0:31 
GeneralRe: Using exported varible from dll Pin
MANISH RASTOGI8-Oct-08 1:06
MANISH RASTOGI8-Oct-08 1:06 
GeneralRe: Using exported varible from dll Pin
CPallini8-Oct-08 1:54
mveCPallini8-Oct-08 1:54 

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.