|
I believe PJ is correct. When I want splitters inside a view I always use Paul DiLascia's CWinMgr[^].
led mike
|
|
|
|
|
After 4 years I found this thread...
I solved the problem with a MoveWindow after the call (maybe unuseful) to RecalcLayout, and I also provided the method IsFrameWnd in my container View that returns TRUE.
It seems to work
|
|
|
|
|
Post the fix then. I no longer work in C++/MFC, but I'm sure others would be interested in what you found.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
The fix is very simple, and it seems to work
// without this method, an ASSERT fails when you click on the splitter to resize the inner windows
BOOL CMyView::IsFrameWnd() const
{
return TRUE;
}
int CMyView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFormView::OnCreate(lpCreateStruct) == -1)
return -1;
CCreateContext cc;
memset(&cc, 0, sizeof(CCreateContext));
CRect cr;
GetWindowRect(&cr);
if (!m_splitter.CreateStatic(this, 2, 1, WS_CHILD | WS_VISIBLE))
return FALSE;
cc->m_pNewViewClass = RUNTIME_CLASS(CLeftView);
if (!m_splitter.CreateView(0, 0, RUNTIME_CLASS(CLeftView), CSize(cr.Width(), 100), &cc))
return FALSE;
cc->m_pNewViewClass = RUNTIME_CLASS(CRightView);
if (!m_splitter.CreateView(1, 0, RUNTIME_CLASS(CRightView), CSize(cr.Width(), 0), &cc))
return FALSE;
// without this, it seems that the splitter created has negative size
m_splitter.MoveWindow(0, 0, cr.Width(), cr.Height());
return 0;
}
|
|
|
|
|
Hi, everybody!
I have a problem. Please, share your experience with me!
My problem:
" A faulty volume was ghosted into an image (MyIMAGE.DAT). Please, Code to find what happened and recover it (so that we can use it as ussual)."
Killer
|
|
|
|
|
Nice error message!
Isn't there a poltergeist board for this stuff?
Sorry, I have no experience to share
|
|
|
|
|
I am not going to do you homework, but I am willing to give you a few pointers.
You need to find out the following:
What is the format of the image file?
Does the image file just contain the data, or the file-system as well?
If so, which filesystem was used on the volume?
If you have the format and filesystem, you might be able to mount it using an image mounting tool, even in software.
You could then scan the files for damage (e.g. checking against CRC32 checksums in the filesystem).
That is the point at which you might actually begin to Code a tool to find and repair damaged data.
Actually, with just an image, you are missing one of the most important sources of information: SMART. You are unable to check on possible hardware defects, so my suggestion ALWAYS would be: move the (repaired) data to a new disk.
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
buddy!
Thanks for your advice so much.
Nice day!
Killer.
Killer
|
|
|
|
|
hey buddy, i think its bad for you...
by the way, for you question, listen to this : NO !
|
|
|
|
|
Why you get four votes(2.0).next vote is 5
|
|
|
|
|
don't know... some certainly didn't noticed that one guy abused CP in a first time
|
|
|
|
|
I did not vote that guy a one. I marked it as spam, instead
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
brahmma wrote: I did not vote that guy a one. I marked it as spam, instead
it isn't spam, it is abuse...
|
|
|
|
|
Hi
I was wondering if anyone knows of a good example of how to turn static text into a URL. I have found
www.codeproject.com/staticctrl/hyperlinkdemo.asp
but it seems too theoretical. I was looking for an example.
Thanks for your help.
|
|
|
|
|
There are a few hyperlink articles on this site (mine included). I would advise avoiding most of the implementations based on the static control for the reasons mentioned in my article.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Hey thanks for that
I'll have to work through it but is far easier to follow that other information I have found.
|
|
|
|
|
Hello
I tried to implement your code for the hyperlink text into mine. Ummm, it almost works... but when I put my mouse over the static text it is not changing the ptr to a hand. And if I click on it, it is not doing anything. I was wondering if you have any ideas? It is displaying the text as a hyperlink, its just not behaving like one.
Thanks for any advice.
|
|
|
|
|
Hello
I tried to implement your code for the hyperlink text into mine. Ummm, it almost works... but when I put my mouse over the static text it is not changing the ptr to a hand. And if I click on it, it is not doing anything. I was wondering if you have any ideas? It is displaying the text as a hyperlink, its just not behaving like one.
Thanks for any advice.
|
|
|
|
|
Check out CHyperLink in WTL. There is a also a hyperlink common control, available on XP and later.
|
|
|
|
|
|
WhiteSky wrote: see http://www.codeguru.com/
|
|
|
|
|
Spell-check it again whitesky ..
:Gong: 歡迎光臨 吐 西批 :Gong:
|
|
|
|
|
Hey thanks for the suggestion of using CHyperLink. The solution was dead simple. It was only about 3 lines of code ! !
Goes to show what an elegant solution it is !
|
|
|
|
|
Anyway , welcome
:Gong: 歡迎光臨 吐 西批 :Gong:
|
|
|
|
|
Paul DiLascia was among the first to develop something like that and he wrote about it in a MSDN Magazine article. See his PixieLib.NET MFC Class Library[^] and look for the CStaticLink.
|
|
|
|