|
You need to use something like this. This code was from a splitter windows app so ignore some of it
<br />
CCreateContext context;<br />
<br />
context.m_pNewDocTemplate = NULL;<br />
context.m_pLastView = NULL;<br />
context.m_pCurrentFrame = NULL;<br />
<br />
switch( iNewView )<br />
{<br />
case ENTER:<br />
context.m_pNewViewClass = RUNTIME_CLASS(CEnter);<br />
break;<br />
case DEUX:<br />
context.m_pNewViewClass = RUNTIME_CLASS(CDeux);<br />
break;<br />
case TROIS:<br />
context.m_pNewViewClass = RUNTIME_CLASS(CTroisDia);<br />
break;<br />
default:<br />
return;<br />
}<br />
<br />
m_uActiveView = iNewView;<br />
<br />
CDocument* pDoc = GetActiveDocument();<br />
context.m_pCurrentDoc = pDoc;<br />
<br />
CView* pActiveView = (CView*)m_wndSplitter.GetActivePane();<br />
CRect rectWnd;<br />
pActiveView->GetClientRect( &rectWnd );<br />
<br />
pDoc->m_bAutoDelete=FALSE; <br />
(m_wndSplitter.GetPane(0,1))->DestroyWindow();<br />
pDoc->m_bAutoDelete=TRUE;<br />
<br />
m_wndSplitter.CreateView(0, 1, context.m_pNewViewClass, rectWnd.Size(), &context);<br />
<br />
CFormView* pNewView = (CFormView *)m_wndSplitter.GetPane(0, 1);<br />
pNewView->SetOwner(this);<br />
pNewView->OnInitialUpdate();<br />
SetActiveView(pNewView);<br />
<br />
m_wndSplitter.RecalcLayout(); <br />
|
|
|
|
|
|
Hi all,
I made two dialogs (MainDialog - SubDialog)
I loaded SubDialog from MainDialog::OnInitialDialog by DoModal ...
when i close the subdialog and then close maindialog(closing program), and i see subdialog again after closing program, for a minute !!!
WHY ????
HOW CAN I SOLVE THAT ????
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Well, I don't see that your problem has to do with SQL. Nevertheless, the behavior you describe shouldn't be happening. Maybe you can do a global search on your project files for DoModal to see if you're creating the subdialog twice and forgot about it. Apart from this, if you could post some code that'd help us help you.
Regards,
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I'm very very very sorry, about my topic ...
I wrote wrong topic for it !!!
My problem is not about SQL, it is about dialogs !
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I was wondering about something. I have an interface written on my laptop. Then I ran the program on another computer. I set both computer resolutions to the same (1024 X 768). However, On one computer, I can't see the bottom but on my laptop, it is fine. What's the problem? Also, this is on two different languages of WinNT. I don't think this should be a problem though.
|
|
|
|
|
Maybe the font size selected on the two systems is different (you can check it on the desktop properties).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hello,
How exacty can one implement DirectX?
What are the files to be included?
Thanks in advance.
|
|
|
|
|
You need to download the Direct X SDK.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
In fact, directx programming have three parts, COM programming (it is very little and easy) and API programming, and DirectX classes, data types, functions ...
DirectX is collection of: DirectDraw(2d) - Direct3d(3d) - DirectMusic - DirectSound and etc.
I wrote something in my homepage, checkout it !
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
In DX 8 there are some slight differences and modiffications. E.g. there isn't DirectDraw - instead, Direct3D handles all its interfaces...
"Needless redundancy is the hobgoblin of software engineering." - Peter Darnell
|
|
|
|
|
Yes, exactly !
In DX8, DirectDraw and Direct3d are in DirectGraphics part !
But you can use DDraw 7 in your DX8 applications, still !
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
How can I retrieve name of all files and directories in
a folder(or files with specific extention)?
|
|
|
|
|
Look up CFileFind in MSDN.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Thanks for your help,
Is there any way ,except MFC?
|
|
|
|
|
You should have said non-MFC. Look up findfirstfile/findnextfile.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
hi,
How are these MFC*.dll different from the other standard dlls present in a regular system?
Please explain.
Bye.
|
|
|
|
|
What do you mean ? Why do you think they are different in some way ?
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Hi,
Thanks for noticing
Because, a program that has no static dlls does not run in a system without one of the MFC*.dll it needs.
So, what is the difference?
|
|
|
|
|
The MFC*.dll files contain the runtime libraries for the microsoft foundation class libraries. Many windows programs that are written in Visual C++ use MFC.
When you build a program in VC you can choose to link with MFC statically or dynamically. Static linking means a larger executable size, but no dependancy on MFC dlls at run time. Dynamic linking is the opposite: smaller exe, but runtime dependancies.
If you're developing with VC++ 6, then 99% of your users will already have the MFC dll's, because they come with the OS in 2000 and above, and are a part of newer versions of IE.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Michelle Turner-Lee wrote:
Because, a program that has no static dlls does not run in a system without one of the MFC*.dll it needs.
So, what is the difference?
The difference is if you statically link, the stuff you need from the dll is in your exe.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Hi,
I have a big problem, I´m using Inplace an instance of Ms. Word ( with MFC), all works fine but if I run Norton Antivirus then it doesn´t work at all !!!
Do you now if this guys has solved this some way, or if somebody knows a solution ? ( shhh... symantec ????)
Thanks, Bye !
Braulio
|
|
|
|
|
That's probably NAV's script blocking kicking in. You can turn off script blocking thru the NAV options.
--Mike--
My really out-of-date homepage
"Hey, you wanna go to the Espresso Pump and get sugared up on mochas?"
-- Willow Rosenberg
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
System : Win2000Profession VC6SP5 MDAC2.6 SQLserver7
When I retrive 15,000,000 records,the memory raise slowly to 2G,how to resolve this memeory problem?
The main routine is blow:
m_ptrRecordset->Open(
bstrSQL,
m_ptrConnection.GetInterfacePtr(),
ADODB::adOpenForwardOnly,
ADODB::adLockUnspecified,
ADODB::adAsyncExecute );
//--------------------------------------------------
while(!ptrRS->adoEOF)
{
lRow ++;
ptrFields = ptrRS->Fields;
nCols = ptrFields->Count;
for(long n = 0; n < nCols; n++)
{
vCol=n;
hr = ptrFields->get_Item(vCol, &ptrField);
VARIANT _result;
VariantInit(&_result);
hr = ptrField->get_Value(&_result);
CString str((LPCTSTR)CHelpers::CrackStrVariant(_result));
fwrite(str.GetBuffer(2048),sizeof(char),str.GetLength(),file);
if(n<ncols-1)
fwrite(",",sizeof(char),1,file);
="" }
="" fwrite("\n",sizeof(char),1,file);
="" hr="ptrRS-">raw_MoveNext();
if(FAILED(hr))
break;
}
ptrRS = ptrOldRS->NextRecordset(&vRowsAffected);
}
while(ptrRS != NULL);
Please pardon my weak English!
|
|
|
|
|
I want to draw something on Clock tray
I want to replace the clock with my drawing?
what did I should do?
How did draw on clock area?
thank in advance
|
|
|
|