|
Hi,
I found some tuto to split a frame and it worked but i have an issue, what i wanna is to split a frame that is not the principal frame of my apps.
I followed those steps:
1:
class CMainFrame : public CFrameWnd
{
protected:
CMainFrame();
DECLARE_DYNCREATE(CMainFrame)
public:
CSplitterWnd m_wndSplitter;
2:
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
if (!m_wndSplitter.CreateStatic(this, 1, 2))return FALSE;
if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CSdiSplitterView), CSize(100, 100), pContext) ||
!m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CMyFormView), CSize(100, 100), pContext))
{
m_wndSplitter.DestroyWindow();
return FALSE;
}
return TRUE;
}
That works but it splits the first Interface, But i wanna split another intrface when the user go to a specific one.
What shoul i alter on that code to make it run. ?
Thx!!! I really Need Help.
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
IS it so Hard ???
No reply !!!!
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
Because CMainFrame is the first interface. Have you checked out CChildFrame?
I also recommend you to start reading some info about the MFC internals, at least in grosso modo, you seem to be quite lost with it.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
I m using an SDI apllication so i think tht there's no need for CChildFrame.
let's say that i wanna split the second Interface into 2 frames. so ??
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
Hello. I have a financial application that is being used by traders working on the floors (soon to be extinct) of some of the country's commodity exchanges. The application is mostly used on PC tablets with pen based input. To input data the user currently has to call up the data input dialog and then get the visual keyboard on the screen and then tap the data with a pen. I'm curious as to if there's a simple keypad (kind of like the on-screen calculator ) that I can embed in the dialog. All I would need are digits 0-9 and a +/- capability. I suppose I could write my own but, since I'm seriously backlogged, I'm wondering if anybody knows of a plug-in out there that will do the job without me having to commit scarce hours to creating this functionality. Thank you.
|
|
|
|
|
I have edit boxes, which accept int, float, date & CString.
If i check Style-Number of EditBox Number & retrive data via member variable associated with the control, I get some junk chars only or an empty string.
How can I get data and convert it back to int, float or date respectively.
Any guidance, examples, etc will be of great help & highly appreciated.
Thanks
Terry
|
|
|
|
|
try to use a CString var in which u read the text typed. and then use the atoi() funct/.
such :
CString TXT;
int Nbr;
m_EditContr.GetWindowText(TXT);
if (TXT.IsEmpty()!=0)
Nbr.atoi(TXT);
But when the user type such thing (ASD45O) it may not work. !!!
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
Blood_HaZaRd wrote: Nbr.atoi(TXT);
or
Nbr = atoi(TXT);
Typo?
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
LOL, yup it was a typo mistake :p
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
Then edit your answer... or are you lazy? :P
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Add a control variable to your edit box, may it be c_Edit . You can use this variable to get the text entered in your edit box by calling c_Edit.GetWindowText() . This function will always return an LPTSTR . You can use conversion functions like _ttoi() just in case you need numbers.
Here are some tutorials which may help you:
CEdit Tutorial 1[^] CEdit tutorial 2[^] CEdit tutorial 3[^]
I also suggest that you read a good book on MFC (well, if you are using MFC) and on Win32.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Trupti Mehta wrote: How can I get data and convert it back to int, float or date respectively
You can use of GetWindowText and then see CString::Format.
|
|
|
|
|
Hi all,
I have a static control into my formview and i wanna make it able to drew some shapes like ellipse, rectnagles etc...
My question is: How could i make it possible (i.e from a static to a smth like CView)
Thx
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
See here[^]
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Did you customize Static control(drived CStatic)? if yes we like to see it if not hurry up!
|
|
|
|
|
nada, i quit the idea to use a static, i alter to the split.
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
|
All reposts will be ignored. If your query is not solved, you are supposed to reply to the ones who responded to you previously.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Hello Terry,
Please check your old thread. "New Reply" waiting for you!!!
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Using Visual 6.0 C++ MFC in SDI application
I know how to enable/disable submenu items. However, when an SDI application is created a main menu bar is created with the following:
File Edit View Help
I added an item to this list (let's call it "Test"). That menu bar looks like:
File Edit View Test Help
Under certain conditions in my program I want to disable the user from selecting "Test" and other times enable this menu item. I can't see how to do that anywhere.
Thanks for the help!
modified on Saturday, May 31, 2008 11:31 AM
|
|
|
|
|
hi
i have dialog based application...
i want to know when i minimize the dialog ...and right click the minimized dialog ...a menu (taskbar menue ) with "restor" and "close" and "about" options will appear..for me its not
how can i do that....
any kind of help will be appriciated
thanks
|
|
|
|
|
Right click on your dialog box in design mode and open its properties. Enable the "System Menu" style.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
thank u for ur fast reply ....
but i use a BitmapDialog which to be applied, the dialog should have the style to "pop up" and the border to "none"..which disable the system menu..
so what should i do now???
|
|
|
|
|
lahom wrote: but i use a BitmapDialog which to be applied, the dialog should have the style to "pop up" and the border to "none"..which disable the system menu..
I think that you will need the border and a title bar menu. Because, by asking for a system menu, you merely are asking for the WS_SYSMENU style of the window object to be enabled. Enabling the WM_SYSMENU style will require the WS_CAPTION style to be enabled as well. The WS_CAPTION will require a title bar and a border (WS_BORDER style).
See and SetWindowLong()[^] and Window Styles[^] for details.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
CFileDialog fileDlg(TRUE,_T("wav"), 0,OFN_HIDEREADONLY|OFN_FILEMUSTEXIST,_T("Media files(*.*)|*.wav;*.wma;*wmv;*.asf;*.mp3;*.mpg;*.mpeg;*.avi||"));
if ( fileDlg.DoModal() == IDOK )
{
playFile = fileDlg.GetPathName();
}
this code for me is working nice but an instance of the same application is created in the taskbar with the just an small icon and no default right click menu when the filedialog popsup .Why its so???, my app is vc6 dialog based app.
|
|
|
|