Click here to Skip to main content
15,915,827 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Live Messenger [modified] Pin
Nathan Going19-Aug-08 8:37
Nathan Going19-Aug-08 8:37 
QuestionHandling the maximize option for the MFC application in the taskmanager. Pin
hariakuthota19-Aug-08 6:41
hariakuthota19-Aug-08 6:41 
AnswerRe: Handling the maximize option for the MFC application in the taskmanager. Pin
Mark Salsbery19-Aug-08 7:28
Mark Salsbery19-Aug-08 7:28 
GeneralRe: Handling the maximize option for the MFC application in the taskmanager. Pin
hariakuthota19-Aug-08 7:40
hariakuthota19-Aug-08 7:40 
QuestionRe: Handling the maximize option for the MFC application in the taskmanager. Pin
Mark Salsbery19-Aug-08 7:48
Mark Salsbery19-Aug-08 7:48 
JokeRe: Handling the maximize option for the MFC application in the taskmanager. Pin
Jijo.Raj19-Aug-08 7:56
Jijo.Raj19-Aug-08 7:56 
GeneralRe: Handling the maximize option for the MFC application in the taskmanager. [modified] Pin
hariakuthota19-Aug-08 8:08
hariakuthota19-Aug-08 8:08 
AnswerRe: Handling the maximize option for the MFC application in the taskmanager. Pin
Jijo.Raj19-Aug-08 7:51
Jijo.Raj19-Aug-08 7:51 
You can do this by handling WM_GETMINMAXINFO message. Well, have a look at the code snippet. Its copy/paste from my RabbitDlg. Big Grin | :-D

// Message map
BEGIN_MESSAGE_MAP(CRabbitDlg, CDialog)
	...
    ON_WM_GETMINMAXINFO()
END_MESSAGE_MAP()

and in cpp implement function - OnGetMinMaxInfo()

void CRabbitDlg::OnGetMinMaxInfo( MINMAXINFO FAR* pMinMaxInfo )
{
    // Window rect.
    RECT rect = { 0 };
    GetWindowRect( &rect );
    CRect WindowRect( &rect );

    // Set the maximum size. Used while maximizing.
    pMinMaxInfo->ptMaxSize.x = WindowRect.Width();
    pMinMaxInfo->ptMaxSize.y = WindowRect.Height();

    // Set the x,y position after maximized.
    pMinMaxInfo->ptMaxPosition.x = rect.left;
    pMinMaxInfo->ptMaxPosition.y = rect.top;
}


NB: There is one small known issue - if we maximize via taskmgr, the window remains same, but the title bar will be painted like maximized. Frown | :( I just suggested you one method. May be someone else will suggest you more efficient one. Roll eyes | :rolleyes:

Regards,
Jijo.

_____________________________________________________

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

QuestionQuestion Regarding ScrollView Pin
godspeed12319-Aug-08 5:50
godspeed12319-Aug-08 5:50 
AnswerRe: Question Regarding ScrollView Pin
led mike19-Aug-08 6:00
led mike19-Aug-08 6:00 
GeneralRe: Question Regarding ScrollView Pin
godspeed12319-Aug-08 6:06
godspeed12319-Aug-08 6:06 
GeneralRe: Question Regarding ScrollView Pin
led mike19-Aug-08 6:44
led mike19-Aug-08 6:44 
QuestionImpact of synchronization on application performances Pin
Ahmed Charfeddine19-Aug-08 5:30
Ahmed Charfeddine19-Aug-08 5:30 
AnswerRe: Impact of synchronization on application performances Pin
Roger Stoltz19-Aug-08 5:51
Roger Stoltz19-Aug-08 5:51 
GeneralRe: Impact of synchronization on application performances Pin
Ahmed Charfeddine19-Aug-08 6:16
Ahmed Charfeddine19-Aug-08 6:16 
GeneralRe: Impact of synchronization on application performances Pin
Ahmed Charfeddine19-Aug-08 22:12
Ahmed Charfeddine19-Aug-08 22:12 
AnswerRe: Impact of synchronization on application performances Pin
Roger Stoltz19-Aug-08 22:46
Roger Stoltz19-Aug-08 22:46 
GeneralRe: Impact of synchronization on application performances Pin
Ahmed Charfeddine19-Aug-08 22:53
Ahmed Charfeddine19-Aug-08 22:53 
AnswerRe: Impact of synchronization on application performances Pin
Roger Stoltz19-Aug-08 23:39
Roger Stoltz19-Aug-08 23:39 
GeneralRe: Impact of synchronization on application performances Pin
Ahmed Charfeddine20-Aug-08 0:16
Ahmed Charfeddine20-Aug-08 0:16 
GeneralRe: Impact of synchronization on application performances Pin
Roger Stoltz20-Aug-08 4:33
Roger Stoltz20-Aug-08 4:33 
GeneralRe: Impact of synchronization on application performances Pin
Ahmed Charfeddine20-Aug-08 5:54
Ahmed Charfeddine20-Aug-08 5:54 
AnswerRe: Impact of synchronization on application performances Pin
Jijo.Raj19-Aug-08 6:40
Jijo.Raj19-Aug-08 6:40 
GeneralRe: Impact of synchronization on application performances Pin
Ahmed Charfeddine19-Aug-08 6:53
Ahmed Charfeddine19-Aug-08 6:53 
GeneralRe: Impact of synchronization on application performances Pin
Jijo.Raj19-Aug-08 7:19
Jijo.Raj19-Aug-08 7:19 

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.