|
Hello,
I have a template class where I want to initialize it with the constructor of class CRICH
template <class T> class TDataTable
{
TDataTable();
}
TDataTable<crich*>myRichTable;
but the above statement does not call the constructor of CRICH.
How should I write the constructor for CRICH?
The statement
CRICH* myRichTable = new CRICH;
calls the constructor of CRICH
So how can I write the construtor so that I can have CRICH* in my template class
Prithaa
|
|
|
|
|
prithaa wrote: but the above statement does not call the constructor of CRICH.
It should not.
prithaa wrote: TDataTablemyRichTable;
I think its like this,
TDataTable<CRICH> myRichTable;
Above statement with instantiate template TDataTable with typename CRICH .
So obviously TDataTable's c'tor will be called not CRICH's .
|
|
|
|
|
Hello
So what should I do if I want
TDataTable<crich*>myRichTable
Prithaa
|
|
|
|
|
|
Hello
So what should I do if I want
TDataTable<CRICH*>myRichTable
Prithaa
|
|
|
|
|
prithaa wrote: TDataTable<crich*>myRichTable
It depends on how you template class is designed, if it expects type name (place holder) then above code should work.
I recommend you some reading about templates.
|
|
|
|
|
Dear all,
I need to develop bootstrapper setup package ,which install more than one msi packages.So i tried to use the Bootstrapper samples in vs2005.
When i tried to build using MSBuild in visual studio command prompt,
I got the follwoing error . "MSB4068:<product>pattern unrecongnised"
Please guide me regarding the same. Is that correct way iam trying to build
and if correct, how to build it successfully.
Thanking you
Manjunath S
GESL
Bangalore
|
|
|
|
|
Hi Everybody!
I m working on a VC++ application in which i m creating a SDI application. IN this application I create a list Ctrl on CView at run time to show the data.The part of the code which i use to create the list on the CView at run time is
void CMyApplicationView::ShowListView()
{
if(p_ListView == NULL)
{
p_ListView = new CMyListView;
CRect rect;
GetClientRect(rect);
p_ListView->Create(NULL,
NULL,
LVS_EX_GRIDLINES|WS_CHILD|WS_VISIBLE,
rect,
this,
1012,
NULL);
CFont *SimpleFont = new CFont;
CDC *dc = GetDC();
int size = 12;
CString FaceName = "Times New Roman";
SimpleFont->CreatePointFont(size*10,FaceName,dc);
CListCtrl& MyCtrl = p_ListView->GetListCtrl();
MyCtrl.GetHeaderCtrl()->SetFont(SimpleFont);
MyCtrl.SetExtendedStyle(LVS_EX_GRIDLINES|LVS_EX_FULLROWSELECT);
delete SimpleFont;
p_ListView->ShowWindow(WS_MAXIMIZE);
}
}
This code is working properly on all the OS except 98. In win 98 the ListView is not show in the Right pane of my application window.
Pls help me so that this code also works in Window 98.
Ansh
|
|
|
|
|
hi,
I want to get the width and height from the user through the edit control and storing it in the RECT structure but it's getting the only one value at a time and strucking,can you tell me what is the problem here???
CRect reect; (I want to store height and width here)
CString s,s2;
m_height.GetWindowText(s); //m_height is the edit control
s=reect.Height();
m_width.GetWindowText(s2);
s2=reect.Width();
GetClientRect(&reect);
m_shockwave.FOPSetClientRect(reect);
Siddharth
|
|
|
|
|
What makes you to post same question twice ?
|
|
|
|
|
Sorry,
I got some problem while posting.Error page was displayed when I posrted the message???
Siddharth
|
|
|
|
|
HI,
Is there any utility to find the crash in the application in release mode? In Debug mode the application exits normally. But in the Release mode if the "Close" button is clicked, it crashes.
Put message boxes in suspected places. But unable to find the reason for the crash. Is there any tool/utility to find the crash location in Release mode?
Thanks
Raji
|
|
|
|
|
|
hi,
I want to get the width and height from the user through the edit control and storing it in the RECT structure but it's getting the only one value at a time and strucking,can you tell me what is the problem here???
CRect reect; (I want to store height and width here)
CString s,s2;
m_height.GetWindowText(s); //m_height is the edit control
s=reect.Height();
m_width.GetWindowText(s2);
s2=reect.Width();
GetClientRect(&reect);
m_shockwave.FOPSetClientRect(reect);
Siddharth
|
|
|
|
|
You need to reword your question to make others understand. I'm sure, you have not tested this code. Its very difficult to understand your problem, seeing this descriptioni.
|
|
|
|
|
What you are trying to say.Without testing how can I blindly post it here.
I want to get height and width that is two parameters from the user ,and I want to set it in a RECT structure(I think here it's clear).
Siddharth
|
|
|
|
|
siddharthsan wrote: Without testing how can I blindly post it here.
From your original code, watch the line in bold
CRect reect; (I want to store height and width here)
CString s,s2;
m_height.GetWindowText(s);
s=reect.Height();
m_width.GetWindowText(s2);
s2=reect.Width();
GetClientRect(&reect);
siddharthsan wrote: I want to get height and width that is two parameters from the user ,and I want to set it in a RECT structure
For this you can use DDx to associated edit controls with integer variables and assing it to RECT .
|
|
|
|
|
Hi
All
I want to set font for particular application. for exp., suppoose i want to display all menu, messages,windowtext of particular application in marathi. while seting font, it should not affect other part of WinXP menu and messages.So plz send me code of this.
Thanks and Regards
Atul Mahajan
|
|
|
|
|
Set the locale using _create_locale
Cheers
|
|
|
|
|
Hi all ,
I want to implement a dynamic timer. By dynamic timer i mean that first my thread should execute
1) at 0 min
2) after 5 min
3) after 10 min
and then after every 1 hour......
can anybody guide me in this or could provide me with a link in which how to do this task is given...
thanks in advance
|
|
|
|
|
When IE is configured to use "automatic configuration script" -- is there any easy way to programatically figure out the type and location of the proxy in use?
Do I need to execute the script myself?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc.</A>
|
|
|
|
|
I wanted to program my parallel port, but unfortunately it is on a PCI card and has a base address of E800. I am also running XP so there doesn't seem to be any easy way of just changing my port settings. I wanted to know how to send data to my PCI parallel port. If anyone could help me out it would be greatly appreciated. Thank you.
|
|
|
|
|
|
hi dudes:
i need to transfer a simple text file through serial port by loop back connection to the same PC as win 32 application in visual C
as a first step i opened the serial com port and configured the serial port now i need to read the data in text file and put it in the buffer and want to transfer and i need to recieve it in another buffer and write it back
1.i got strucked in the reading part and writting part
let me know your suggestion for further improvement
thanks for your time
---------
Zealot
|
|
|
|
|
saranjeganinvent wrote: 1.i got strucked in the reading part and writting part
are you able to transfer single character at a time... if yes.. then it pretty much easy.. create some header mechanism or handshaking .. i.e.
communication between two port,
Port5 : connect to Port 6 com port!
Port5: File K0 (0x03) //end character
port6: File 10 codeproject.cpp (0x03)
port5: Data K0 (0x03)
port6: Data 20 12345678901234567890 (0x03)
loop back till you recv whole file!
here File and Data are Command and
File K0 asking for file name and in return it's getting File [Length of FileName] [Actual FileName]
Data KO format will be Data [Length of Data] [actuaLData]
|
|
|
|