|
Thanks for ur help
I created a dialog based application.
I selected a tab control and moved to my dialog .
I have created an MFC class named CMyTabCtrl derived from CTabCtrl.
I added ur code to it.
I created a member variable in the dialog class for the tab control using class wizard which is
CMyTabCtrl m_Tab
I have selected the owner draw fixed properties
But still the drawitem of CMyTabCtrl does not called.
Please implement this and if u r getting let me know what u did.
|
|
|
|
|
I did the same - I used a DDX_Control() call in DoDataExchange() to
subclass the control...
void CMyDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_TAB1, m_Tab); <-- make sure you use the right ID!!!
}
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I have done that. But still does not work
Can u send me ur sample project.
|
|
|
|
|
It's a VS2008 project - is that OK?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
Am I doing anything wrong in setting the properties of the tab control.
Shall I send the sample code.
|
|
|
|
|
It seems like you're doing everything....
Send me an email from here and I'll reply with the project.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I am waiting for ur reply
|
|
|
|
|
It works now when i call insert item
Thanks
|
|
|
|
|
Ohhh you had no tabs
I guess the email through CodeProject isn't working yet....I sent one
so I could get your address to send the project.
Glad you got it working!
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
You're welcome!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I forgot how to read from a text file, line by line, help!
|
|
|
|
|
CStdioFile::ReadString
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
|
Thanks Johpoke it worked, and thanks to the other guys too for their responses.
|
|
|
|
|
i have a file which contains hex values. i want to convert that to human readable form. please give me some leads.
|
|
|
|
|
try itoa function for more help LOOK MSDN
|
|
|
|
|
Chandrasekharanp wrote: i have a file which contains hex values. i want to convert that to human readable form. please give me some leads
hex format is human readable. Do you mean a binary file (as opposite to text one)?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
ya right... i am sorry for the wrong query.. i need to read it from a file and convert that to ascii and then print it to another file.
|
|
|
|
|
Oh,that's not difficult, for instance:
Supposing ANSI build and error handling left to the reader
FILE * fpin = fopen("MyBinaryFile.foo","rb");
FILE * fpout = fopen("MytextFile.txt","w");
int c;
int count = 0;
while ( (c=getc(fpin)) != EOF )
{
fprintf(fpout, "%02x ", c);
if (count % 16 == 15) fprintf(fpout, "\n");
count++;
}
fclose(fpin);
fclose(fpout);
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
|
Chandrasekharanp wrote: thanks GURU!!!!!!
Oh, I'm not.
Anyway, you're welcome.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Hello,
I have one structure contains char * variable. I want to store the CString data to char* variable.
struct _iobuf {
char *_ptr;
int _cnt;
char *_base;
int _flag;
int _file;
int _charbuf;
int _bufsiz;
char *_tmpfname;
};
I have one CString variable like m_Username. I want to store m_Username to char *_base.
Could you please help me how to do.
|
|
|
|
|
_base = m_userName.GetBuffer
or
_base = new char[]
strcpy(_base, m_userName.getbuffer)
|
|
|
|