|
Hi, everybody, this is my first query in Code Project, so pardon me for any mistakes.
I hv a MDI project. Currently it opens binary image files and displays its data, in few different child frame windows. I m using splitter windows in child frames class(derived from CMDIChildWnd), so i hv some experiance in using them.
My requirement is such that i want a two splitter window in CMainFrame class (derived from CMDIFrameWnd). Pane 1, contains view of a class derived from CRichEditView and Pane 0, should be able to handle child windows as before. For this i created
virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
in CMainFrame class and tried to create splitter windows in it. But i m not sure what class view to pass to CreatView function for Pane 0. This is what i have coded:-
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
if (!m_wndTestSplitter.CreateStatic(this, 2, 1))
{
return FALSE;
}
if(!m_wndTestSplitter.CreateView(0, 0, RUNTIME_CLASS(???), CSize(320, 400), pContext))
{
m_wndTestSplitter.DestroyWindow();
return FALSE;
}
if (!m_wndTestSplitter.CreateView(1, 0, RUNTIME_CLASS(COutputWnd), CSize(320, 400), Context))
{
m_wndTestSplitter.DestroyWindow();
return FALSE;
}
return TRUE;
}
|
|
|
|
|
Member 4635088 wrote: if(!m_wndTestSplitter.CreateView(0, 0, RUNTIME_CLASS(???), CSize(320, 400), pContext))
Do you need to place the second splitter window here in "???" ?
|
|
|
|
|
yes, but i don't know what class to put in here, so that it handles child frames as if cmainframe was being used without splitter windows.
|
|
|
|
|
|
Hello All
i am working in Win32 VC++ using VS 6.0
My window works fine and is Minimized in TaskBar....
if i click the mouse on Desktop (i.e not on my window).....is there any way so that my window come to know that the mouse has clicked down......i.e in short i want to send the mouse events to my window from anywhere.
Thankx In Advance
regards
aabid
|
|
|
|
|
Aabid wrote: is there any way so that my window come to know that the mouse has clicked down......i.e in short i want to send the mouse events to my window from anywhere.
You need a global mouse hook [^].
See also this article [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
modified on Wednesday, November 19, 2008 6:40 AM
|
|
|
|
|
I am writing program to validate xml with schema.
but it fails when
schemaColl.raw_add(_bstr_t(),_variant_t(L"XSDFileName.xsd"))
is called.
I don't find any way to get detail errors.
Has anybody know about why it could fail?
is it the case that path related (xsd file's path) problem?
Thanks,
Perry
|
|
|
|
|
Hi i have a problem of concatenation two CString variables and assign to std::string
here i need to convert CString to std::string and have to concatenate
if any possible help me
Thanks in advance
----------------------------
KRISHNA KUMAR T M
|
|
|
|
|
The problem with your approach is when you have support for UNICODE. CString support both non-unicode and unicode while std::string support only non-unicode strings. Take a look at this post[^] to see how support both unicode and non-unicode strings.
I also suggest you have a look at this excellent article[^] to get a better grip on all the different strings and 'conversions'.
|
|
|
|
|
And what's the problem? Are you doing a UNICODE build?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Yes i am building in UNICODE mode
----------------------------
KRISHNA KUMAR T M
|
|
|
|
|
Then
CString sFirstName=_T("Foo"), sLastName=_T("Goo");
CT2A sANSIFullName(sFirstName + sLastName);
std::string sResult(sANSIFullName);
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
no !
use std::wstring instead !
|
|
|
|
|
No need to be integralist, my friend i.e. I usually don't make philosophical assumptions on the reason behind the question. If he really needs a std::string (maybe he need to call a function of a library out of his control), then the proposed code works; on the other hand, since he probably needs that, someone else already gave the right links to get more insights on using UNICODE or ANSI strings in his own project.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: No need to be integralist, my friend
but we are not sheeps, we are thinking human being too, and answering the board also means advising well...
Using CT2A() or CW2A() will potentially loose data if the OP is using "true" wide-characters (those which really need more than 1 byte to be).
Using std::wstring will not though.
BTW, your point about the external lib is true
|
|
|
|
|
Saying thistoxcct wrote: no !
use std::wstring instead !
is integralism.
Saying this toxcct wrote: but we are not sheeps, we are thinking human being too, and answering the board also means advising well...
Using CT2A() or CW2A() will potentially loose data if the OP is using "true" wide-characters (those which really need more than 1 byte to be).
Using std::wstring will not though.
is of thinking human.
Saying this
toxcct wrote: BTW, your point [...] is true
is great!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
ROTFL !
|
|
|
|
|
|
SeshaSridhar wrote: they should be opened in xml file format
What do you mean by that ? A csv file has a specific format, why do you want to "open it in xml format" ? This doesn't make a lot of sense to me...
|
|
|
|
|
|
Well, you still say exactly the same thing. What has xml to do here ? A csv file is not an xml file so if you try to parse it as an xml file, it will simply no work. It's a bit like trying to use a hammer to mow your grass...
So please, try to explain clearly what you are trying to do.
|
|
|
|
|
I think he might be saying he wants it to be displayed in a grid, like excel.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
But I still don't get it. Why do you have to use xml for that ? Or I am completely missing the point...
|
|
|
|
|
|
SeshaSridhar wrote: when .csv files are clicked they should be opened in xml file format
Read point #2 in the guidelines[^]
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|