|
The SDK is the software development kit. DirectX8 refers to major version 8 of the directX
runtime. For the most part, DirectX interfaces are backward-compatible - if you are using
version 8 then that includes all previous versions.
So, if you are developing using a version of the SDK that supports DirectX version 8 and you run
your software on a machine with DirectX version 9 installed then you're fine. Using version 9
interfaces on a machine with version 8 installed wll not work.
Did that make any sense?
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Hi,
I need to draw something in the background area of the edit control.
I tried to do it in the OnEraseBkgnd. But the text has its own background, so i just made the bk mode transparent using SetBkMode in the CtlColor. Now I could draw the background but the antialiasing of text makes problem. Also there is repainting problem while scrolling.
- NS -
|
|
|
|
|
You need to change the backgroundcolor of a Textbox?
|
|
|
|
|
Not simply the background color. But want to draw some lines, etc., (for eg. some grid lines of 2 pixel spacing) in the background.
- NS -
|
|
|
|
|
You can use of WM_CTLCOLOREDIT for change color of text and background
|
|
|
|
|
Hello,
If I have
class A
{
A();
};
A::A()
{
}
Now I want an object which I get like this
A *Aobject = new A;
But If I have a template class B whose type is A* then
while initializing the template class B the constructor A() has to be called.
But what happens is that the constructor A() is not called while initializing template class B.What must be the problem.
The same template class works for my other classes where there is no use of new operator.
In what way should I incorporate new in the costructor A,since I want A* as my template type.
Prithaa
|
|
|
|
|
prithaa wrote: But If I have a template class B whose type is A* then
while initializing the template class B the constructor A() has to be called.
Then you need to do it. I think you should first review how template works, this has nothing to do with inheritance.
How is your template 'parameter' used ? Is it a template member of your class B ? Something like this:
template <class T>
class B
{
...
...
T* m_Object;
};
And used this way ?
B<A> classB;
If yes, then you will need to instanciate the object in the constructor of B.
But, this highly depends of how you are using your template... Can you post some code so that we have a better view of your problem ?
|
|
|
|
|
Hello,
Thanks for you reply
This is my code snippet
class CRICH : public CRichEditCtrl
{
// Construction
public:
CRICH();
void Fill(CFont& H,Variant Data);
void Create1(CView *pView,CRect Rect,int index);
bool operator =(CRICH& c);
};
The following is a template class
template <class T> class TDataTable
{
public:
TDataTable();
TDataTable(int m, int n);
void constructor(int m,int n);
void clear() {m_numRow=m_numCol=0; TData.clear();};
void InsertRow(int rowno);
void DeleteRow(int rowno);
void AddRow();
int numRow() {return m_numRow;};
int numCol() {return m_numCol;};
T& operator() (int i,int j) {return TData[m_numCol*i+j];}
vector<T> GetOneRow(int i);
//virtual ~TDataTable();
private :
int m_numRow, m_numCol;
vector<T>TData;
T tdefault;
};
The following is the function constructor which I want to call while initializing objects in a vector
template <class T> void TDataTable<T>::constructor(int m, int n)
{
tdefault = T();
m_numRow = m; m_numCol = n;
TData.assign(m_numRow*m_numCol, tdefault);
}
If I call the function constructor() like the following
TDataTable<crich*> m_TableForDisplay;
m_TableForDisplay.constructor(row,col);
now TData is not initialized and while debugging if I press F11 at the point
tdefault = T();
then the constructor of CRICH is not called.
but for other of my classes their respective constructors
are called and tdefault gets initialized
Thanks
Prithaa
|
|
|
|
|
Can any one tell to me thet how to use SetPrinterDataEx() function to set the registry value. i am trying to do this:
DWORD dw=SetPrinterDataEx(hPrinter,"PrinterDriverData","monica",REG_BINARY,(PBYTE)p,1);
it compiled overall prgram but not set registry key(name "monica").it returns 'dw =5'. what is meaning of '5 value of dw'.
Thanks
Monica
|
|
|
|
|
mo_nica881 wrote: DWORD dw=SetPrinterDataEx(hPrinter,"PrinterDriverData","monica",REG_BINARY,(PBYTE)p,1);
Can you show how variable p is defined ?
mo_nica881 wrote: what is meaning of '5 value of dw'.
Access denied.
Check you have all right to do this operation.
|
|
|
|
|
Hello,
If I have a class
class A
{
int *myint;
};
I can initialize the above member variable like this
int *myint = new int;
so that a pointer is initialized on the heap and I will have to delete it.
But if I have to initialize the member variable in the constructor of a class how should I do it using new?
Thanks
Prithaa
|
|
|
|
|
Exactly the same but in the constructor:
A::A()
{
myint = new int;
}
Don't forget to destroy it in the destructor of your class then.
|
|
|
|
|
Although you can simply write,
myint = new int;
Be aware while using assignment operator or copy constructor. If you are not cautious, will end up with dangling pointers.
|
|
|
|
|
WTF ??
This was posted more than 3 years ago !! Furthermore, you are replying to me and not to the OP.
|
|
|
|
|
|
You could use a std::auto_ptr but should beware of the transfer of ownership on copy semantics. This could mean, for example, that an assignment breaks the object on the right hand side.
Steve
|
|
|
|
|
Hello,
Thanks I got it.
Prithaa
|
|
|
|
|
Can anybody forward me code that will implement multithreading in VC++?
|
|
|
|
|
|
I dont know I cant see your answer or your answer is inside Quote;P
|
|
|
|
|
reposted
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
|
Can i convert a SDI application to MDI application in VC++?What's the procedure & what are required changes i will have to do in SDI application?Please reply as soon as possible.
Thanks & Regards
Pankaj
|
|
|
|
|