Click here to Skip to main content
15,905,875 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Visual studio Pin
CPallini3-Jan-08 0:17
mveCPallini3-Jan-08 0:17 
GeneralRe: Visual studio Pin
Florin Crişan3-Jan-08 0:22
Florin Crişan3-Jan-08 0:22 
GeneralBuild date timestamp Pin
HenriH2-Jan-08 19:52
HenriH2-Jan-08 19:52 
GeneralRe: Build date timestamp Pin
CPallini2-Jan-08 21:22
mveCPallini2-Jan-08 21:22 
QuestionHow can disable Dialog Box when call SetupCommitFileQueue Pin
machoman_VC++2-Jan-08 19:38
machoman_VC++2-Jan-08 19:38 
QuestionHow to convert pair of 8bit codepoints to int value in vc++ Pin
johnalek2-Jan-08 19:37
johnalek2-Jan-08 19:37 
AnswerRe: How to convert pair of 8bit codepoints to int value in vc++ Pin
CPallini2-Jan-08 21:18
mveCPallini2-Jan-08 21:18 
QuestionHow to prevent the program from painting windows outside the screen Pin
demxine2-Jan-08 19:34
demxine2-Jan-08 19:34 
I'm trying to restrict my dialog window from being moved outside the visible screen area.

I'm doing this using this method:

void CWindowsDVRDlg::OnWindowPosChanged(WINDOWPOS FAR* lpwndpos)
{
CSkinDialog::OnWindowPosChanged(lpwndpos);

CRect rc;
GetWindowRect (&rc);

if (EnsureRectangleOnDisplay(rc)){
SetWindowPos(NULL, rc.left, rc.top, 0,0, SWP_NOSIZE | SWP_NOZORDER);
}
else{
SendMessage(DM_REPOSITION);
}

RedrawWindow(NULL,NULL,RDW_INVALIDATE);
}

The code works but its flaw is that it's still painting the dialog window outside the visible screen area just before it is repositioned inside the screen (by SendMessage(DM_REPOSITION)). Flickering is the result of this.

Can anyone help me with this? You're help would be much appreciated.
GeneralRe: How to prevent the program from painting windows outside the screen Pin
Nishad S2-Jan-08 19:58
Nishad S2-Jan-08 19:58 
GeneralRe: How to prevent the program from painting windows outside the screen Pin
demxine2-Jan-08 20:45
demxine2-Jan-08 20:45 
GeneralRe: How to prevent the program from painting windows outside the screen Pin
CPallini2-Jan-08 21:16
mveCPallini2-Jan-08 21:16 
GeneralRe: How to prevent the program from painting windows outside the screen Pin
Nishad S2-Jan-08 21:34
Nishad S2-Jan-08 21:34 
GeneralRe: How to prevent the program from painting windows outside the screen Pin
demxine3-Jan-08 15:21
demxine3-Jan-08 15:21 
GeneralRe: How to prevent the program from painting windows outside the screen Pin
Nishad S6-Jan-08 0:00
Nishad S6-Jan-08 0:00 
GeneralRe: How to prevent the program from painting windows outside the screen Pin
demxine6-Jan-08 14:27
demxine6-Jan-08 14:27 
GeneralRe: How to prevent the program from painting windows outside the screen Pin
Nishad S6-Jan-08 16:20
Nishad S6-Jan-08 16:20 
GeneralRe: How to prevent the program from painting windows outside the screen Pin
David Crow3-Jan-08 3:34
David Crow3-Jan-08 3:34 
QuestionHow to change HWND to long? Pin
hanlei00000000092-Jan-08 18:29
hanlei00000000092-Jan-08 18:29 
AnswerRe: How to change HWND to long? Pin
Nishad S2-Jan-08 19:55
Nishad S2-Jan-08 19:55 
GeneralI use VC8 Pin
hanlei00000000093-Jan-08 16:01
hanlei00000000093-Jan-08 16:01 
AnswerRe: How to change HWND to long? Pin
CPallini2-Jan-08 21:13
mveCPallini2-Jan-08 21:13 
GeneralRe: How to change HWND to long? Pin
hanlei00000000093-Jan-08 16:12
hanlei00000000093-Jan-08 16:12 
QuestionRe: How to change HWND to long? Pin
CPallini3-Jan-08 21:03
mveCPallini3-Jan-08 21:03 
AnswerRe: How to change HWND to long? Pin
ThatsAlok3-Jan-08 0:18
ThatsAlok3-Jan-08 0:18 
Generalthanks Pin
hanlei00000000093-Jan-08 16:14
hanlei00000000093-Jan-08 16:14 

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.