|
I want to Maximise the ChildWnd progrmatically.
Can it be done by a single window_message or
do i need to call a function for the same .
which message or function should i use ?
I use the SW_MAX but it actully maximise the window but
the In Main window i only get the close button for application
and not for the child window now i want to close the child window
but there is no close button if i click on the main close_ button the
application close down
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
vikas amin wrote: I want to Maximise the ChildWnd progrmatically.
Can it be done by a single window_message or
do i need to call a function for the same .
which message or function should i use ?
You can use this code:
ShowWindow(SW_SHOWMAXIMIZED);
But of course it must be called inside the class of the window you want to maximize (otherwise, get a pointer to the target CWnd and call the ShowWindow from that window).
vikas amin wrote: I use the SW_MAX but it actully maximise the window but
the In Main window i only get the close button for application
and not for the child window now i want to close the child window
but there is no close button if i click on the main close_ button the
application close down
Errrr... ... I have absolutely no idea of what you are speaking about, try to formulate your question clearly.
|
|
|
|
|
I have tired using the
ShowWindow(SW_SHOWMAXIMIZED);
I have created a child window then got the pointer
to the window & when i display the window by
the ShowWindow(SW_SHOWMAXIMIZED);
It should show me two the main window min_,max_,close_ button
& also the min_,max_,close_ button for the child window.
But the child window's min_,max_,close_ button disappear, and
i am not able to close the window
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Did you try using Microsoft Spy++ to monitor which messages are being sent?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi all
My VC++ application is crashing in
Win 2000 + SP4 + 400 MB RAM
Win XP + SP1 + 1GB RAM
But does not crash in
Win XP + SP2 + 1GB RAM
And the application just closes within itself !!
No messages like "The memory at Oxxxxxxx is not refenced" ...
So Whats the options availbale for me to find out the root cause of the problem ??
Please help me
redindian
|
|
|
|
|
You'll need to figure out atleast the approximate place where the crash happens. IMO, log files are the best to figure that out.
You can also try attaching the application to Visual Studio, turning on "Break into the debugger on Win32 exceptions and C++ exceptions (Debug->Exceptions) and letting the application crash.
Regards
Senthil
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi senthil
Thanks a lot for your 2 responses (to my earlier message also ...)
Could you give me some steps how to attach a release EXE to Visual studio debugger ?
I have never done it ....
Pls help
regds
Dharani
redindian
|
|
|
|
|
dharani wrote: Could you give me some steps how to attach a release EXE to Visual studio debugger ?
Assuming you're using VS .NET 2003, there's nothing special you need to do. Run your application, fire up Visual Studio, goto Debug->Processes, select your application and click Attach. You obviously won't be able to step through the code, but you can ask VS to break into the debugger if a Win32 exception or C++ exception happens.
Regards
Senthil
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi folks,
I've an MFC application that generates some string data. I want to put this text data in a file in a table form. How can I perform this?
Thanks for the help!
Hami
|
|
|
|
|
|
Anonymous wrote: I want to put this text data in a file in a table form. How can I perform this?
Without being more specific, "table form" is too ambiguous. You could write the string data to a file and say it is a 1x1 table, or you could write it to a file and say it is a 1xN table where N is the number of 'words' in the string.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Hi
How to remove MAXIMIZE Option from SDI application (at right upper corner). In this application the View class is derived from CFormView. Plz help me as soon as possible.
Thanks in Advance.
|
|
|
|
|
use following window style while creating window ie in CreateWindow() function
WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX
this will disable maximize icon
|
|
|
|
|
for SDI
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
cs.style = WS_OVERLAPPED | WS_SYSMENU | WS_BORDER;
return CFrameWnd::PreCreateWindow(cs);
}
for MDI
BOOL CMyChildWnd::PreCreateWindow(CREATESTRUCT& cs)
{
cs.style &= ~WS_MAXIMIZEBOX;
return CMDIChildWnd::PreCreateWindow(cs);
}
|
|
|
|
|
hey i want to maximise my Child window similarly when
the user clicks the MAXIMIZEBOX button .
Is it possible programatically or not ?
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Hey, Sorry for late. just i came.
This is also one way.
CDialog dlg;
dlg.ModifyStyle(WS_MAXIMIZEBOX,0);
dlg.ModifyStyle(0,WS_MAXIMIZEBOX);
//Like this you can add any style and remove any style
This is simple way. At runtime you can change the style of any control or any window. see about modifystyle in msdn.
Nice talking to you.
|
|
|
|
|
I have a edit box that is refreshed frqently
By OnPaint(); event
CFont font;
font.CreatePointFont(280, ("Arial"));
m_BFreq.SetFont (&font);
Have tried to use this code but i donot work , actully
the cursor size is increased but font remains same.
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Your CFont object will be destroyed when it goes out of scope.
Have a CFont member variable instead.
Create the font you like in your constructor:
LOGFONT lf;
memset( &lf, 0, sizeof( LOGFONT ) );
lf.lfHeight = -20;
lf.lfWeight = FW_BOLD;
m_LargeFont.CreateFontIndirect( &lf ); ...and when you like to use it:
m_bFreq.SetFont( &m_LargeFont );
--
Roger
It's supposed to be hard, otherwise anybody could do it!
|
|
|
|
|
Thank you Roger
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Hi!!Actually i am newbie in this VC++ area and for my project i want to make a button and onclick some page will open.i know that there is a class called CButton but don't know how to use this.
Thanks in advance
|
|
|
|
|
use mfc wizard to do these things for u...for more, search web or buy some "newbie" book
"Do first things first, and second things not at all."
— Peter Drucker.
|
|
|
|
|
If u r trying by SDK then u need some books to refer fist .
If u use a MFC ,then
Use a class wizard to create a new project in MFC (SDI)
Then create a dialog box from resource editor ,create
a class for ur dialog box say CDlg_myname .
Create a Object of the dialogbox class and use this code in
ur CMainFrm OnShow() event .
CDlg_myname dlg1;
Dlg1.DoModel();
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
on the resource editor, you can drag a button from the toolbox to your dialog resource, give it an explicit ID and then double click on it to access its OnClick event handler...
there, add the code that is to be executed when the button is clicked on...
SushantM wrote: some page will open
what do you mean by this ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
he means 'some page'
regards,
Rookie
|
|
|
|
|
yeah, thank you very much rookieee, i still can read properly
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|