Click here to Skip to main content
15,887,683 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Does "delete" operator work for PVOID pointers? Pin
Chris Losinger21-Jul-11 5:01
professionalChris Losinger21-Jul-11 5:01 
GeneralRe: Does "delete" operator work for PVOID pointers? Pin
David Crow21-Jul-11 5:11
David Crow21-Jul-11 5:11 
GeneralRe: Does "delete" operator work for PVOID pointers? Pin
Richard Andrew x6421-Jul-11 5:31
professionalRichard Andrew x6421-Jul-11 5:31 
GeneralRe: Does "delete" operator work for PVOID pointers? Pin
David Crow21-Jul-11 6:16
David Crow21-Jul-11 6:16 
GeneralRe: Does "delete" operator work for PVOID pointers? Pin
Stefan_Lang22-Jul-11 0:35
Stefan_Lang22-Jul-11 0:35 
AnswerRe: Does "delete" operator work for PVOID pointers? Pin
Chris Losinger21-Jul-11 4:55
professionalChris Losinger21-Jul-11 4:55 
GeneralRe: Does "delete" operator work for PVOID pointers? Pin
Maximilien21-Jul-11 5:03
Maximilien21-Jul-11 5:03 
QuestionRestrict InvalidateRect Pin
manju 321-Jul-11 2:12
manju 321-Jul-11 2:12 
Hi all,

I have one parent dialog where in OnPaint Function i am drawing some rectangles.

On that dialog i am opening one more child dialog,
I am making that child dialog as modeless,so that i can move that dialog
I want to keep the modless dialog active even when i click on the parent dialog,so that i can move rectangles.


OnLButtonDown i need to redraw the rectangles and even keep the dialog visible.

But when i click the Mouse LButtonDown,my child dialog is getting dissappeared

void Test::OnLButtonDown(UINT nFlags, CPoint point)
{
	CRect rcClient(170,414,170,415);
	LeafDialog::GetClientRect(&rcClient);
  
	if((xp<415 && xp >140) && (yp>100))
	{
		InvalidateRect(rcClient,false);	// to force(Refresh) OnPaint to redraw
                     	LeafB[0]=100;
	   	LaefA[0] = 100;
	}
}


On Test View i am creating dialog
void CTestView::OnLoadImage() 
{
    CBitmapimage* dlgbmp;
    dlgbmp = new CBitmapimage;
    dlgbmp->Create(IDD_DIALOG1,this);
    dlgbmp->ShowWindow(SW_SHOW);
}


Can anyone tell me what can i do so that even i can move the image and redraw on the parent dialog when clicked on the rectangle

Thanks
Sharan
AnswerRe: Restrict InvalidateRect Pin
Roger Allen26-Jul-11 6:28
Roger Allen26-Jul-11 6:28 
QuestionHow to use "UnitTest" to test C++ code [modified] Pin
Cold_Fearing_Bird20-Jul-11 21:49
Cold_Fearing_Bird20-Jul-11 21:49 
AnswerRe: How to use "UnitTest" to test C++ code Pin
_AnsHUMAN_ 21-Jul-11 1:28
_AnsHUMAN_ 21-Jul-11 1:28 
GeneralRe: How to use "UnitTest" to test C++ code Pin
Stefan_Lang21-Jul-11 1:57
Stefan_Lang21-Jul-11 1:57 
GeneralRe: How to use "UnitTest" to test C++ code Pin
Cold_Fearing_Bird21-Jul-11 2:33
Cold_Fearing_Bird21-Jul-11 2:33 
GeneralRe: How to use "UnitTest" to test C++ code Pin
Stefan_Lang21-Jul-11 2:55
Stefan_Lang21-Jul-11 2:55 
GeneralRe: How to use "UnitTest" to test C++ code Pin
Cold_Fearing_Bird21-Jul-11 4:45
Cold_Fearing_Bird21-Jul-11 4:45 
AnswerRe: How to use "UnitTest" to test C++ code Pin
Rolf Kristensen27-Jul-11 12:18
Rolf Kristensen27-Jul-11 12:18 
QuestionLong Strings in ComboBox not fully visible. Pin
Le@rner20-Jul-11 18:21
Le@rner20-Jul-11 18:21 
AnswerRe: Long Strings in ComboBox not fully visible. Pin
Chandrasekharan P20-Jul-11 18:55
Chandrasekharan P20-Jul-11 18:55 
GeneralRe: Long Strings in ComboBox not fully visible. Pin
Le@rner20-Jul-11 23:43
Le@rner20-Jul-11 23:43 
AnswerRe: Long Strings in ComboBox not fully visible. Pin
_Flaviu24-Jul-11 7:08
_Flaviu24-Jul-11 7:08 
QuestionPrint command to printer using PostMessage? Pin
AnayKulkarni20-Jul-11 2:29
AnayKulkarni20-Jul-11 2:29 
AnswerRe: Print command to printer using PostMessage? Pin
Richard MacCutchan20-Jul-11 2:33
mveRichard MacCutchan20-Jul-11 2:33 
QuestionCTabCtrl - retrieving tab's title text Pin
rp_suman20-Jul-11 1:11
rp_suman20-Jul-11 1:11 
AnswerRe: CTabCtrl - retrieving tab's title text Pin
Richard MacCutchan20-Jul-11 1:32
mveRichard MacCutchan20-Jul-11 1:32 
GeneralRe: CTabCtrl - retrieving tab's title text Pin
rp_suman20-Jul-11 2:23
rp_suman20-Jul-11 2:23 

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.