Click here to Skip to main content
15,911,785 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Communication Pin
El Corazon19-May-05 3:59
El Corazon19-May-05 3:59 
GeneralRe: Communication Pin
Luis Alonso Ramos19-May-05 4:53
Luis Alonso Ramos19-May-05 4:53 
GeneralRe: Communication Pin
El Corazon19-May-05 9:41
El Corazon19-May-05 9:41 
GeneralRe: Communication Pin
David Crow19-May-05 2:25
David Crow19-May-05 2:25 
Generalchange color of highlighted eria in CEdit with single & multi line edit. Pin
Hisahito Nagayama18-May-05 20:14
Hisahito Nagayama18-May-05 20:14 
Generallight the grid lines of CListCtrl. Pin
Hisahito Nagayama18-May-05 20:09
Hisahito Nagayama18-May-05 20:09 
GeneralTracking at detaile List of CListCtrl. Pin
Hisahito Nagayama18-May-05 20:04
Hisahito Nagayama18-May-05 20:04 
GeneralProblem with resizing the window at application startup Pin
ledallam18-May-05 19:44
ledallam18-May-05 19:44 
Hi,

I am getting a vague problem, and I'm unable to figure out the reason for
this. I am working with MDI application. I wanted to remove maximize and
minimize buttons of the CMDIMainFrame window. So I handled it in
OnNewDocument as shown below.

BOOL CLogAppDoc::OnNewDocument()
{
DWORD style = ::GetWindowLong(AfxGetMainWnd()->m_hWnd, GWL_STYLE);
// Remove the thick frame style and the Minimize, Maximize buttons
style &= ~(WS_MAXIMIZEBOX|WS_MINIMIZEBOX|WS_THICKFRAME);
::SetWindowLong(AfxGetMainWnd()->m_hWnd, GWL_STYLE, style);

}


I wanted the window to be in maximized mode at startup, so in InitInstance
function of application class, I modified the ShowWindow call as follows

pMainFrame->ShowWindow(SW_MAXIMIZE);

Now when I run my application the window appears to be in maximized mode,
but it isn't so, because when I move the mouse cursor to the title bar and
right click on it, the move sub menu item is enabled. This implies that my
window is not in maximized mode, though it appears to be in maximized mode
by occupying the full screen area, and using the move option I can drag the
window.

Now if I comment the code that I've written above in OnNewDocument(), the
window is in maximized mode and the move submenu item of the popup menu is
disabled, but I will get the maximize and minimize buttons on the title bar.

My intention is to let the window be in maximized mode at startup and
minimize & maximize buttons should not be there on the title bar. Can any
one please help me to figure out my mistake?


Thanks
Madhavi.


GeneralRe: Problem with resizing the window at application startup Pin
MK7818-May-05 23:01
MK7818-May-05 23:01 
GeneralRe: Problem with resizing the window at application startup Pin
ledallam18-May-05 23:46
ledallam18-May-05 23:46 
GeneralRe: Problem with resizing the window at application startup Pin
Hans Ruck18-May-05 23:14
Hans Ruck18-May-05 23:14 
Generalweird registration problem Pin
LukeV18-May-05 16:07
LukeV18-May-05 16:07 
GeneralRe: weird registration problem Pin
usmanmir18-May-05 20:54
usmanmir18-May-05 20:54 
GeneralRe: weird registration problem Pin
User 58385219-May-05 4:53
User 58385219-May-05 4:53 
QuestionHow to use Unicode in Console Pin
boylangchoi18-May-05 14:51
boylangchoi18-May-05 14:51 
Generalplease help with link error LNK2005 (png.lib?) Pin
ryuki18-May-05 13:22
ryuki18-May-05 13:22 
GeneralRe: please help with link error LNK2005 (png.lib?) Pin
Chris Losinger18-May-05 14:31
professionalChris Losinger18-May-05 14:31 
GeneralRe: please help with link error LNK2005 (png.lib?) Pin
ryuki18-May-05 20:38
ryuki18-May-05 20:38 
GeneralRe: please help with link error LNK2005 (png.lib?) Pin
Stlan18-May-05 22:12
Stlan18-May-05 22:12 
GeneralSynchronization Pin
javi_jmc18-May-05 13:16
javi_jmc18-May-05 13:16 
GeneralRe: Synchronization Pin
Christian Graus18-May-05 16:26
protectorChristian Graus18-May-05 16:26 
Questionwhat is command.com ? Pin
includeh1018-May-05 10:46
includeh1018-May-05 10:46 
AnswerRe: what is command.com ? Pin
Robert Buldoc18-May-05 11:14
Robert Buldoc18-May-05 11:14 
AnswerRe: what is command.com ? Pin
Anonymous18-May-05 12:13
Anonymous18-May-05 12:13 
GeneralRe: what is command.com ? Pin
Jörgen Sigvardsson18-May-05 12:30
Jörgen Sigvardsson18-May-05 12:30 

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.