|
i'm not sure to totally understand your question, but you can create a splitter in the Child Frame window by using a CSplitterWnd in it.
Add a CSplitterWnd attribute to your child frame, then overload the virtual method virtual BOOL CFrameWnd::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext); to create the splitter window object:
For example:
BOOL CSplitterFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
if (!m_wndSplitter.CreateStatic(this, 2, 1))
{
TRACE0("Failed to CreateStaticSplitter\n");
return FALSE;
}
if (!m_wndSplitter.CreateView(0,0,
pContext->m_pNewViewClass, CSize(50, 50), pContext))
{
TRACE0("Failed to create first pane\n");
return FALSE;
}
if (!m_wndSplitter.CreateView(1,0,
pContext->m_pNewViewClass, CSize(50, 50), pContext))
{
TRACE0("Failed to create second pane\n");
return FALSE;
}
SetActiveView((CView*)m_wndSplitter.GetPane(0,0));
return TRUE;
}
Have a look to http://freedom2.pcupdate.easyspace.com/nt/ch07/182-186.html[^] for more info.
HTH,
K.
Fold With Us!
"A leader is a man who can adapt principles to circumstances - Georges S. Patton, 1885–1945"
|
|
|
|
|
Hello,
Whenever the application's InitInstance is executed, what is the best way of preventing the OnFileNew method from being called without removing the command line parser? Is this possible to do without recurring to the use of flag variables?
|
|
|
|
|
isn't OnFileNew() a function of the CView or its derived class? I'm not sure, but can't you just override in your derived class and not call the base class's function?
Who are all these people and what are they doing in my house?...Me in 30 years, inside a grocery store
My articles[^]
bdiamond
|
|
|
|
|
you could use CCommandLineInfo::FileNothing as a parameter to ParseCommandLine
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
If I have an "x" number of threads that I need started and will be passing messages to and from. Can I set my thread creating function like....
<br />
<br />
CWinThread myThread[nThreads];<br />
<br />
for (int i = 0; i < nThreads; i++)<br />
{<br />
myThread[i]= AfxBeginThread(MyThreadProc, this);<br />
}<br />
<br />
Thanks for the help.
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
I just checked and AfxBeginThread returns a POINTER to a CWinThread.
You might want to do this instead:
//nThread = the number of threads I need to start
CWinThread* pMyThreads[nThreads]; // <-- note array of POINTERS now
for (int i = 0; i < nThreads; i++)
{
pMyThreads[i]= AfxBeginThread(MyThreadProc, this);
}
I think that will work.
|
|
|
|
|
I need to be able to fetch bulk records on tables that contain binary columns such as images.
RFX_Binary_Bulk seems to be limited to INT_MAX and I didn't find something like RFX_LongBinary for bulk.
Any suggestions ?
Regards,
Yariv
|
|
|
|
|
I know with using ADO, you use GetChunk(). maybe you can find something equivalent for what you are doing.
Who are all these people and what are they doing in my house?...Me in 30 years, inside a grocery store
My articles[^]
bdiamond
|
|
|
|
|
Well, the title could be a little misleading. I have a CFormView as my main 'dialog'. I have a modeless dialog that I use for a chat window. When a user minimizes the main window, I want the chat window to still be visible. I've tried changint the style of the chat window to 'child','popup', and 'overlapped' and it still doesn't work. Likewise, I'd also like the chat window to show on the desktop without the main form if the main form is minized when new chat comes in. Right now the chat window isn't visible after receiving a message until the main window is restored. I've also tried using the hWnd of the desktop when creating the dialog, but that still doesn't help. Any suggestions are appreciated. Thanks!!
Who are all these people and what are they doing in my house?...Me in 30 years, inside a grocery store
My articles[^]
bdiamond
|
|
|
|
|
The only other thing I thought to try really quick was to give it a NULL parent.
Failing that, you might not be ablke to make it a 'dialog' at all, and will have to make it a full-blown window - a regular window derived from CWnd doing its own processing. Then it should be relatively independent of the main window.
|
|
|
|
|
thanks! I already tried the NULL parent thing also, and that didn't seem to work. I changed the SetForeGround property to true, and that seems to make it work for when I receive a message, but it still minimizes with the main app, so I'm thinking of seeing if it' actually a window when I minimize, and if so, show it again, the way I regularly do.
Who are all these people and what are they doing in my house?...Me in 30 years, inside a grocery store
My articles[^]
bdiamond
|
|
|
|
|
I think this is because MFC is traversing the window chain and 'windows' associated with the main user interface thread and just minimizing the whole lot of them when it is going down.
IF you were to place your modeless dialog into a separate user interface thread and parent it to the desktop it might not get minimized with the rest of the applications windows.
I have not tried this before, but that is the direction I would head next.
|
|
|
|
|
I fixed it in the CMainFrame class so that when my app is minimized, it makes a call to these three functions:
pView->m_pDlg->ShowWindow(SW_SHOW);
pView->m_pDlg->SetForegroundWindow();
pView->m_pDlg->SetFocus();
Who are all these people and what are they doing in my house?...Me in 30 years, inside a grocery store
My articles[^]
bdiamond
|
|
|
|
|
Three methods for dealing with dangling pointers are tombstones, lock-and-keys and garbage collection. What are the advantages and distadvantages of these ?
Regards,
Asim
|
|
|
|
|
Wasn't this covered in class?
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
You would have to attend class to know though!
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
I don't know, but it sounds like an interesting article for you to write and post on CP if you ever find the answer!
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
You should really do your own homework, but I'll help you out just this once...
Tombstones
(adv) Not limited by the system's run length encoding limits.
(dis-adv) Can only be used once in an application.
Lock & keys
(adv) Easy to implement.
(dis-adv) Cannot be used in Unicode mode or when an app needs to divide by zero (eg: during complex mathematical computations).
Garbage collection
(adv) Can be used for procedures as well as functions.
(dis-adv) Not supported in languages like Java or C#.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
OK, you are right.
Thank you very much anyway, Ravi.
Regards,
Asim
|
|
|
|
|
Garbage collection
(dis-adv) Not supported in languages like Java or C#.
Are you sure with this?
|
|
|
|
|
I coded like this:
#pragma data_seg("Shared")
HWND g_hWndCaller = NULL;
HHOOK g_hHook = NULL;
#pragma data_seg()
#pragma comment(linker, "/SECTION:Shared, RWS")
but it does not work, why?
|
|
|
|
|
Do MSDN articles Q100634 or Q125677 help?
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Just in case it is sotehing as STUPID as this..
I notice the documentation shows /INCLUDE, but the sample shows this:
#pragma comment(linker, "include:__mySymbol")
So, as a suggestion, why don't you try using all lowercase for the word 'section':
#pragma comment(linker, "/section:Shared, RWS")
Also, you might want to call your section something besides 'Shared' so you don't confuse the compiler or linker over another keyword. Use your company initialz in front of it or something..
#pragma data_seg("YCIShared")
HWND g_hWndCaller = NULL;
HHOOK g_hHook = NULL;
#pragma data_seg()
#pragma comment(linker, "/section:YCIShared, RWS")
|
|
|
|
|
Hi,
I am working on vc++ project and i have store the details of that application in registry, is it possible to rename a registry key(hive) through coding.
can anyone help me through this.
Thanks and Regards,
R.Sundaram.
R.Sundaram
|
|
|
|
|
There is no single function to do this. One way would be to use RegSaveKey() and RegRestoreKey() , but those only work on Windows NT 3.1 and later. Another way is to use a series of copy and delete calls.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|