Click here to Skip to main content
15,885,032 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to write a Un-fixed size memory pool ? Pin
yu-jian8-Jul-13 4:42
yu-jian8-Jul-13 4:42 
AnswerRe: How to write a Un-fixed size memory pool ? Pin
jschell8-Jul-13 8:35
jschell8-Jul-13 8:35 
AnswerRe: How to write a Un-fixed size memory pool ? Pin
Stefan_Lang15-Jul-13 23:14
Stefan_Lang15-Jul-13 23:14 
GeneralRe: How to write a Un-fixed size memory pool ? Pin
yu-jian16-Jul-13 5:41
yu-jian16-Jul-13 5:41 
GeneralRe: How to write a Un-fixed size memory pool ? Pin
Stefan_Lang16-Jul-13 20:48
Stefan_Lang16-Jul-13 20:48 
GeneralRe: How to write a Un-fixed size memory pool ? Pin
yu-jian17-Jul-13 4:47
yu-jian17-Jul-13 4:47 
GeneralRe: How to write a Un-fixed size memory pool ? Pin
Stefan_Lang17-Jul-13 5:12
Stefan_Lang17-Jul-13 5:12 
Questionwin32 drawing shape and StrokeAndFillPath(hDC) please help Pin
appollosputnik8-Jul-13 3:54
appollosputnik8-Jul-13 3:54 
I am trying to draw a shape or font on dialog and then fill the outline. I have 2 buttons on this 2 buttons I have the following code
[code]
case IDC_BUTTON1:
MessageBox(hDlg, L"Start Drawing!!", L"ButtonPressed", MB_OK | MB_ICONEXCLAMATION);
hDC = GetDC(hDlg);
brush = CreateSolidBrush(RGB(128, 128, 128));
SelectObject(hDC, brush);
hpen = CreatePen(PS_SOLID, 1, RGB(128, 0, 128));
SelectObject(hDC, hpen);
BeginPath(hDC);
break;
case IDC_BUTTON2:
MessageBox(hDlg, L"End Drawing!!", L"ButtonPressed", MB_OK | MB_ICONEXCLAMATION);
EndPath(hDC);
StrokeAndFillPath(hDC);
DeleteObject(brush);
ReleaseDC(hDlg, hDC);
break;
[/code]
Then in the drawing part I have the following.
[code]
case WM_LBUTTONUP:
if (IsDlgButtonChecked(hDlg, IDC_RADIO1) == BST_CHECKED )
{


EndX = LOWORD(lParam);
EndY = HIWORD(lParam);

SetROP2(hDC, R2_XORPEN);

MoveToEx(hDC, StartX, StartY, NULL);
LineTo(hDC, EndX, EndY);

IsDrawing = FALSE;
}
[/code]

When I remove the BeginPath() and EndPath() functions my lines are being drawn. But when I insert this BeginPath() and EndPath() and StrokeAndFillPath(hDC); the nothing is being drawn.

Why it is not doing as per the expectations. I want to draw a shape for example A with a outline. And i want it to be closed when drawing is ended and filled the hollow portion.

What am I doing wrong in this ? Please help. I am not implementing it in WM_PAINT but drawing is done in WM_LBUTTONUP. Please help. Thanks a lot in advance
AnswerRe: win32 drawing shape and StrokeAndFillPath(hDC) please help Pin
Richard MacCutchan8-Jul-13 5:42
mveRichard MacCutchan8-Jul-13 5:42 
Questionhow to disable "Use hardware acceleration when available" on chrome Pin
Thong LeTrung7-Jul-13 22:39
Thong LeTrung7-Jul-13 22:39 
AnswerRe: how to disable "Use hardware acceleration when available" on chrome Pin
«_Superman_»7-Jul-13 23:32
professional«_Superman_»7-Jul-13 23:32 
GeneralRe: how to disable "Use hardware acceleration when available" on chrome Pin
Thong LeTrung9-Jul-13 22:23
Thong LeTrung9-Jul-13 22:23 
QuestionBOOST C++ Library for MFC application Pin
pk jain7-Jul-13 21:47
pk jain7-Jul-13 21:47 
AnswerRe: BOOST C++ Library for MFC application Pin
«_Superman_»7-Jul-13 22:21
professional«_Superman_»7-Jul-13 22:21 
GeneralRe: BOOST C++ Library for MFC application Pin
pk jain7-Jul-13 23:03
pk jain7-Jul-13 23:03 
GeneralRe: BOOST C++ Library for MFC application Pin
«_Superman_»7-Jul-13 23:08
professional«_Superman_»7-Jul-13 23:08 
GeneralRe: BOOST C++ Library for MFC application Pin
pk jain7-Jul-13 23:38
pk jain7-Jul-13 23:38 
Questionsimple name change of tree control does not work ?? Pin
Member 25844747-Jul-13 18:36
Member 25844747-Jul-13 18:36 
AnswerRe: simple name change of tree control does not work ?? Pin
Jonathan Davies7-Jul-13 22:44
Jonathan Davies7-Jul-13 22:44 
AnswerRe: simple name change of tree control does not work ?? Pin
Richard MacCutchan8-Jul-13 5:45
mveRichard MacCutchan8-Jul-13 5:45 
GeneralRe: simple name change of tree control does not work ?? Pin
Member 25844749-Jul-13 8:06
Member 25844749-Jul-13 8:06 
Questionwant to make circular progress bar on the dialog?? Give some tips! Pin
Sun-Mi Kang7-Jul-13 16:45
Sun-Mi Kang7-Jul-13 16:45 
AnswerRe: want to make circular progress bar on the dialog?? Give some tips! Pin
«_Superman_»7-Jul-13 19:12
professional«_Superman_»7-Jul-13 19:12 
GeneralRe: Thank (^__^).. I can try~! Pin
Sun-Mi Kang7-Jul-13 19:20
Sun-Mi Kang7-Jul-13 19:20 
AnswerRe: want to make circular progress bar on the dialog?? Give some tips! Pin
Richard MacCutchan7-Jul-13 20:42
mveRichard MacCutchan7-Jul-13 20: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.