|
I believe display lists are limited to an OpenGL rendering context. Although you can share rendering contexts across windows (by changing the device context), they must all share the same pixel format. (found in OpenGL Superbible pg. 658)
hRC = wglCreateContext(hDC); //initially create rendering context
wglMakeCurrent(hDC,hRC); //change to a different hDC, keeping the original hRC
Can't say I have actually done this...
|
|
|
|
|
wglShareLists
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Hi,
We have developed one Win32 Console application in vc++6 and(named as A.exe),we are using this exe in my vc++ 6 application in shared memory and it works correctly.
But i created that win32 Console Application(A.exe) in vc++2005 Express edition,( built with no error, i got a EXE)my vc++6 application shows some application error.
I compared that vc++ 6 EXE(A.exe) and Vc++2005 Express edition(A.exe),vc++6 shows 246KB but express edition EXE shows only 88KB.
Whats the problem in this?
Anu
|
|
|
|
|
Anu_Bala wrote:
I compared that vc++ 6 EXE(A.exe) and Vc++2005 Express edition(A.exe),vc++6 shows 246KB but express edition EXE shows only 88KB.
Whats the problem in this?
Why would you think that's a problem? The size of a program on disk is indicative of very little.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
When i use this A.exe in my application it shows application error so i thought the size is vary from previuos thats why the error has occured.
Is there any solution for this?
Anu
|
|
|
|
|
Hi,
How can we display windows explorer in the tree control,which is placed in the form view .
Thanks in advance,
Radhika.
|
|
|
|
|
Create splitter control. Inside the splitter control , create the tree control on left side and list control on right side.
|
|
|
|
|
i want to display files and folders from the windows explorer into a treecontrol which is placed in a form view of my application.How can i do that.
Thanks in advance,
Radhika.
|
|
|
|
|
Do you want to show file/folder on a treectrl
|
|
|
|
|
Hi,
I am getting the windows explorer in the tree control.The files and folders are displayed.But when we again press the button to display the above for the second time in the tree control ,the images of files and folders are missing .And another problem is a debug assertion failure message box is opening when we click the button and if i click ignore 4 times the files and folders are populated in the tree control.How can i overcome the above two problems.
Thanks in advance,
Radhika.
|
|
|
|
|
|
Hi all,
I have designed a Dialog Based application using MFC Dialog Based option.
I have a form with an edit box on it. I want the edit box to diaplay a paticular text as soon as the form is loaded. How can i accomplish that. I tried the UpdateMethod(FALSE). But it is crashing my application. Is there any other way to accomplish the above.
Plz some one help me.
Thanks and Regards in advance
Kenny
|
|
|
|
|
Call updatemethod(False) after the CDialog::OnInitDialog() line. Otherwise the control is not created.
|
|
|
|
|
CEdit* pEdit;
pEdit = (CEdit*)GetDlgItem( IDC_EDIT ); // IDC_EDIT is the ID of Edit Control
pEdit->SetWindowText( "Required Text" );
Akkott
|
|
|
|
|
Add the above code in OnInItDialog
Akkott
|
|
|
|
|
G Thanks Very Much. It is now working perfectly.
With Kind Regards
Kenny
|
|
|
|
|
call..
SetDlgItemText( ID_EDIT2, csText );
Where csText is the text u need to set and ID_EDIT2 is the id of the edit control.
nave
|
|
|
|
|
|
I want to show the data in edit control with Notepad or Microsoft Excel.
Anybody know how to write the code
|
|
|
|
|
Write the data in the Edit control to a file. Open the file with Notepad using WinExec.
Akkott
|
|
|
|
|
::ShellExecute(NULL,NULL,_T("Test.txt"),NULL,_T("C:\\MyProjects"),SW_SHOW);
From above
The system will run Test.txt in C:\MyProject.
Normally it use Notepad.
If I want to use Microsoft Word or Excel to run this file.
How to write the code?
|
|
|
|
|
Max++ wrote: If I want to use Microsoft Word or Excel to run this file.
How to write the code?
You can still use ShellExecute() , but you'll need to explicitly indicate that word.exe or excel.exe is to be used.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
ShellExecute(handle, "notepad", filename, NULL, NULL, SW_SHOWNORMAL);
ShellExecute(handle, "excel", filename, NULL, NULL, SW_SHOWNORMAL);
|
|
|
|
|
Do you want insert datas to editbox on Notepad?
|
|
|
|
|
I am thoroughly stumped by an
error C2064: term does not evaluate to a function taking 1 arguments
The comments preceding the code should make it pretty clear what algorithm I want to make. I've commented the line of code where VC.NET 2003 says the error occurs.
Thanks for any assistance rendered!
-alex
The following can be directly cut and paste as a .h or .cpp file and run.
-----------------------------------------------------------------
#include <functional>
#include <numeric>
#include <vector>
/// A stream processes a vector of unary_functions in order. The return value
/// of the first unary_function becomes the argument to the second.
///
/// Functionally equivalent to:
/// return functor_n(functor_n-1(...(functor_0(initial_value))));
///
/// Procedurally equivalent to:
/// arg_type result = initial_value;
/// for each functor func {
/// result = func(result);
/// }
/// return result;
template <typename arg_type>
class FunctorStream : public std::unary_function<arg_type, arg_type>
{
public:
FunctorStream() { }
FunctorStream(const
std::vector<std::unary_function<arg_type, arg_type>*>&
functors)
: mFunctors(functors)
{ }
/// Runs the argument through each functor in the stream and returns the
/// last return value.
arg_type operator() (const arg_type& initArg)
{// Technically this method should be const since we are using accumulate.
return std::accumulate(mFunctors.begin(), mFunctors.end(), initArg,
MonoidAccumulator<arg_type>());
}
private:
const std::vector<std::unary_function<arg_type, arg_type>*> mFunctors;
};
template <typename arg_type>
struct MonoidAccumulator :
public std::binary_function<arg_type,
std::unary_function<arg_type, arg_type>*,
arg_type>
{
arg_type operator() (arg_type lastResult,
std::unary_function<arg_type, arg_type>* functor)
{
return (*functor)(lastResult); // COMPILER ERROR POINTS HERE
}
};
struct TestFunctor :
public std::unary_function<int, int>
{
int operator() (int arg) {
return arg + 1;
}
};
int main( int argc, char *argv[] )
{
std::vector<std::unary_function<int, int>*> functors;
TestFunctor func0;
TestFunctor func1;
functors.push_back(&func0);
functors.push_back(&func1);
FunctorStream<int> stream(functors);
int foo = stream(2);
return 0;
}
|
|
|
|