Click here to Skip to main content
15,897,518 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to detect full-screen window? Pin
jipai21-Sep-06 22:13
jipai21-Sep-06 22:13 
QuestionKeeping window within boundry, win32 sdk [modified] Pin
beeejay21-Sep-06 16:19
beeejay21-Sep-06 16:19 
AnswerRe: Keeping window within boundry, win32 sdk Pin
Nibu babu thomas21-Sep-06 17:24
Nibu babu thomas21-Sep-06 17:24 
GeneralRe: Keeping window within boundry, win32 sdk Pin
beeejay21-Sep-06 17:34
beeejay21-Sep-06 17:34 
GeneralRe: Keeping window within boundry, win32 sdk Pin
Nibu babu thomas21-Sep-06 17:43
Nibu babu thomas21-Sep-06 17:43 
GeneralRe: Keeping window within boundry, win32 sdk Pin
beeejay21-Sep-06 17:56
beeejay21-Sep-06 17:56 
GeneralRe: Keeping window within boundry, win32 sdk Pin
Nibu babu thomas21-Sep-06 18:23
Nibu babu thomas21-Sep-06 18:23 
GeneralRe: Keeping window within boundry, win32 sdk Pin
beeejay21-Sep-06 18:34
beeejay21-Sep-06 18:34 
Ok I have somthing very similiar, but I am still having the same problem.
The window is drawn twice, once very quickly in my position( and then erased), and then once in position it would be in had i not intervened.

Here is the code for WM_MOVING:

RECT rect;
GetWindowRect( hWnd, &rect );

    if ( rect.right > xMax )
        rect.left = xMax - ( rect.right - rect.left );
    if ( rect.left < xMin )
        rect.left = xMin;
    if ( rect.bottom > yMax )
        rect.top = yMax - ( rect.bottom - rect.top );
    if ( rect.top < yMin )
        rect.top = yMin;

SetWindowPos( hWnd, HWND_TOP, rect.left, rect.top, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE );

return true;


Thanks alot
GeneralRe: Keeping window within boundry, win32 sdk Pin
Nibu babu thomas21-Sep-06 18:36
Nibu babu thomas21-Sep-06 18:36 
GeneralRe: Keeping window within boundry, win32 sdk Pin
beeejay21-Sep-06 18:47
beeejay21-Sep-06 18:47 
GeneralRe: Keeping window within boundry, win32 sdk Pin
Nibu babu thomas21-Sep-06 19:03
Nibu babu thomas21-Sep-06 19:03 
QuestionComposite Control Info Pin
Demian Panello21-Sep-06 16:14
Demian Panello21-Sep-06 16:14 
AnswerRe: Composite Control Info Pin
Rick York21-Sep-06 16:45
mveRick York21-Sep-06 16:45 
AnswerRe: Composite Control Info Pin
Hamid_RT21-Sep-06 18:41
Hamid_RT21-Sep-06 18:41 
QuestionWarning messages Pin
dacky21-Sep-06 15:36
dacky21-Sep-06 15:36 
AnswerRe: Warning messages Pin
Stephen Hewitt21-Sep-06 16:03
Stephen Hewitt21-Sep-06 16:03 
GeneralRe: Warning messages Pin
dacky21-Sep-06 16:13
dacky21-Sep-06 16:13 
QuestionMoving VC7 app to VC8 Pin
paulb21-Sep-06 12:46
paulb21-Sep-06 12:46 
AnswerRe: Moving VC7 app to VC8 Pin
Christian Graus21-Sep-06 12:52
protectorChristian Graus21-Sep-06 12:52 
Questionweb application in vc++.net Pin
sandeep_thakur21-Sep-06 11:05
sandeep_thakur21-Sep-06 11:05 
AnswerRe: web application in vc++.net Pin
Christian Graus21-Sep-06 11:34
protectorChristian Graus21-Sep-06 11:34 
Questionhow to prevent a file from being opened? Pin
sundar15621-Sep-06 10:58
sundar15621-Sep-06 10:58 
AnswerRe: how to prevent a file from being opened? Pin
Christian Graus21-Sep-06 11:36
protectorChristian Graus21-Sep-06 11:36 
GeneralRe: how to prevent a file from being opened? Pin
sundar15621-Sep-06 12:13
sundar15621-Sep-06 12:13 
QuestionDatabase connectivity Pin
sandeep_thakur21-Sep-06 10:48
sandeep_thakur21-Sep-06 10:48 

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.