|
satishvarma_e wrote: sir pls tell how to clear this error(CRecordSet Base Class Undeclared)
Because you haven't included afxdb.h .
Nibu thomas
Software Developer
|
|
|
|
|
Hi,
I am trying to have two views on file new on the same document and initiate windows tile command. I put the following code in the CChkBookApp::initinstance function at the bottom after all templates and window is created. But I get error. How to solve this. Thanks lee
CChkBookDoc* pDoc = (CChkBookDoc*)pMainFrame->GetActiveDocument();
if (pDoc == NULL)
return NULL;
CFrameWnd* pNewFrame = m_pCheckViewTemplate->CreateNewFrame(pDoc, NULL);
if (pNewFrame == NULL)
return pDoc;
m_pCheckViewTemplate->InitialUpdateFrame(pNewFrame, pDoc);
// Tile the two MDI children windows within the MDI frame window.
ASSERT_KINDOF(CMDIChildWnd, pNewFrame);
CMDIFrameWnd* pMDIFrameWnd = ((CMDIChildWnd*)pNewFrame)->GetMDIFrame();
ASSERT(pMDIFrameWnd != NULL);
pMDIFrameWnd->MDITile(MDITILE_HORIZONTAL);
|
|
|
|
|
yang__lee wrote: But I get error.
What is the error!
Nibu thomas
Software Developer
|
|
|
|
|
If the error comes when you create the new view then
the code that you can find in
CMDIFrameWnd::OnWindowNew()
is a good example to open correctly a window on a MDI application.
The tile operations looks ok.
Have a nice code day
|
|
|
|
|
I am a beginner of MFC.
this time i want to use MFC wizzard with MDI.
I add
cs.style |=WS_MAXIMIZE;
cs.style &= ~(WS_MINIMIZEBOX| WS_MAXIMIZEBOX )
in CChildFrame::PreCreateWindow()to create childframes maxmized when they are created.and disable the MINIMIZEBOX and MAXIMIZEBOX .
when child frame is created,it did show with maxmized;
I clicked the minmize button at the system menu(not in childframe title),it doesn't work(&~WS_MINIMIZEBOX),
the problem is:when i clicked the maxmize button at system menu,child frame resized and placed to the full client of the Mainframe.
and there is no minmize and maxmize button on the title of child frame.
That's why? i had added the "&~WS_MAXIMIZEBOX ".
Who can help me .
I will appreciate much!
bruspark
-- modified at 1:23 Wednesday 5th April, 2006
|
|
|
|
|
Can you be more specific as to what you wish to do.
Nibu thomas
Software Developer
|
|
|
|
|
Hi,Nibu
Here is what i want to...
first,make each MDIChildFrame show in the client of MainFrame with maxsize.next time when i switch between the childframes,they should also show with maxzize.
second,I wish to disable the maximize button minimize button on the child frame,but the close button should be usable.
any one who know please tell me.
Waiting for your reply.Thanks!
Bruspark
|
|
|
|
|
bruspark wrote: first,make each MDIChildFrame show in the client of MainFrame with maxsize.next time when i switch between the childframes,they should also show with maxzize.
Add a message map entry for ON_WM_CHILDACTIVATE .
Override OnActivate(int nCmdShow);
Call ShowWindow inside OnActivate
eg: ShowWindow(SW_MAXIMIZE);
bruspark wrote: second,I wish to disable the maximize button minimize button on the child frame,but the close button should be usable.
Override PreCreateWindow and add this line
cs.style &= ~WS_SYSMENU;
//Well this removes the close button too.
Nibu thomas
Software Developer
|
|
|
|
|
Thank you for your reply!
I have tried your method. It workes!!Thanks a lot!
I overide the PreTranslateMessage() fuction to catch the SC_RESTORE message and do nothing ,so the maximize button (in fact it is restore button.) doesn't work when you click it..
bruspark
|
|
|
|
|
bruspark wrote: I overide the PreTranslateMessage() fuction to catch the SC_RESTORE message and do nothing ,so the maximize button (in fact it is restore button.) doesn't work when you click it..
Great idea!
Nibu thomas
Software Developer
|
|
|
|
|
Is ther any function in MFC to get the break character position (i.e position in the text at which the text breaks for word wrapping).
Kindly let me know
Thanks
|
|
|
|
|
line break character?
which are "\r\n" (2 chars - notepad) or '\n' (1 char - richedit).
functions are:
strstr(...) and strchr(...) for position.
A special image tool for Windows C++ programmers, don't miss it!
The world unique Software Label Maker is waiting for you and me ...
A nice hyper tool for optimizing your Microsoft html-help contents.
|
|
|
|
|
Is ther a way to get the exact width of any character in a text i.e LOGFONT .
I do not want the average width or the maximum/minimum width.
if ne1 does know then
Kindly reply to tis msg
Thank u
|
|
|
|
|
try to display all chars on a control, such as CEdit, then use CEdit::PosFromChar(...) function to receive their positions.
or use CDC::GetTextExtent(...).
LOGFONT doesn't contain info about a specified character.
A special image tool for Windows C++ programmers, don't miss it!
The world unique Software Label Maker is waiting for you and me ...
A nice hyper tool for optimizing your Microsoft html-help contents.
|
|
|
|
|
Hi,
I have taken and MDI application.CMainFrame class in OnCreate() function.
m_wndStatusBar.SetBorders(2,17,2,17);The height of the staus bar is increased as required,i have done this uisng VC.6...But when i did same thing in VC2005...the statusbar is drawn properly....is there any specific reason?.If i update my application from vc.6 to VC2005 will support new framework..? or is there any other to increase the height of the status bar, without changing the Font...
Thanks in before
Jamesrocky
-- modified at 0:53 Wednesday 5th April, 2006
|
|
|
|
|
in VC6, "the staus bar is increased as required"
in VC2005, "the statusbar is drawn properly"
what is your problem?
A special image tool for Windows C++ programmers, don't miss it!
The world unique Software Label Maker is waiting for you and me ...
A nice hyper tool for optimizing your Microsoft html-help contents.
|
|
|
|
|
Sorry in VC2005 its was not drawn properly....
|
|
|
|
|
Hi RockyJames,
what's your problem?Statusbar(Height)
CStatusBarCtrl maybe it is some helpful to you I'm not sure
|
|
|
|
|
I want to develop some standalone application. That is without having Operation System boot loader has to load my application. Is that possible?
M.Sendilkumar
Thomson
|
|
|
|
|
Sorry to say it, but I think that's impossible to do.
Do you want to create your own operating system for that?
|
|
|
|
|
of course that is possible !!
how do you think OS installer do ?
|
|
|
|
|
man, that's a big task you're asking about...
you may need to write a bootstrap from scratch !!
but as i don't know more about your project (target plateform, Proc SC, Dev IDE)...
|
|
|
|
|
Yeah,,That is what i want.How i can write bootstrap.Development tool and etc.. are not matter.Tell me is there any way that you know?
M.Sendilkumar
|
|
|
|
|
you have to peel your microprocessor's documentation and write the assembler code to what you need to do...
i cannot help you on this, as it is a very specific task.
|
|
|
|
|
Does anyone know where I can get information on writing a library (making a DLL of my own) for Parallel I/O Communication in C/C++?
Thanks
|
|
|
|