|
ya i have checked IsClipboardFormatAvailable(CF_UNICODETEXT)
it's working
e.veera raghavendra
|
|
|
|
|
Veera Raghavendra wrote:
When i use GetClipboardData(CF_UNICODETEXT), i am not getting any data.
So what does GetClipboardData() return? If NULL , what does GetLastError() return?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
locoone wrote:
is there something im missing?
That's hard to say without seeing the relevant code.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
this is copyed from the class word for word
//Base destructor
CTextFileBase::~CTextFileBase()
{
Close();
}
//Close file
void CTextFileBase::Close()
{
if(IsOpen())
{
#if PEK_TX_TECHLEVEL == 0
m_file.close();
#elif PEK_TX_TECHLEVEL == 1
::CloseHandle(m_hFile);
m_hFile = INVALID_HANDLE_VALUE;
#else
if(m_closeAndDeleteFile)
{
m_file->Close();
}
#endif
}
#if PEK_TX_TECHLEVEL == 2
if(m_closeAndDeleteFile)
{
delete m_file;
m_file = NULL;
}
#endif
}
CTextFileWrite::~CTextFileWrite()
{
Close();
}
//Write and empty buffer
void CTextFileWrite::Flush()
{
#if PEK_TX_TECHLEVEL==0
m_file.write(m_buf, m_buffpos+1);
#elif PEK_TX_TECHLEVEL==1
DWORD nWritten;
if (!::WriteFile(m_hFile, m_buf, m_buffpos+1, &nWritten, NULL))
{
//Something bad has happend! Close file
CTextFileBase::Close();
//Throw exception
throw CTextFileException(GetLastError());
}
#else
m_file->Write(m_buf, m_buffpos+1);
#endif
m_buffpos = -1;
}
when i tryed to debug it had a yellow arrow pointing to this line m_file->Write(m_buf, m_buffpos+1);
PEK_TX_TECHLEVEL = 2 for me incase ya need to know
|
|
|
|
|
For starters I would not even begin to debug this. It looks to be way too convulated with all of the preprocessor statements. A well-designed class should be an entity that knows all about itself. When the file-related object is constructed, it should at that point know how it will later be closed.
Have you single-stepped through each statement and noted the value of the variables along the way?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
i figured out the problem
but thanks anyway
|
|
|
|
|
I came across a custom control in an example Project here at The Code Project. I want to use that custom control in another application. How can you use a custom control from one application to another without retyping all the code over again? I tried copying the .cpp and .h files and adding them to my new project but could not get the control classes to be recognized....
Thanks.
|
|
|
|
|
You can remake the .dsw file .
The steps is in the following :
1 Delete the old .dsw file in your project's directory
2 goto VC6 ,it will notify you to recreate the dsw file . Then you should select all files int listbox and create it .
Above is all.
Try it
AntonlioX
|
|
|
|
|
AntonlioX wrote:
1 Delete the old .dsw file in your project's directory
2 goto VC6 ,it will notify you to recreate the dsw file . Then you should select all files int listbox and create it .
How can you do step 2 if you delete the dsw file? Once I delete this file, I cant open the project in VC6?
|
|
|
|
|
Do not believe everything you read on the internet. The file that you are to delete is the .clw (class wizard) file, not the .dsw (project workspace) file.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
I figured this out when after deleting the .dsw file the project was gone!
Thanks.
|
|
|
|
|
Sorry for my carelessness ,I typed the .clw as .dsw .
AntonlioX
|
|
|
|
|
No problem. It got me thinking along the right track and eventually led to a solution. Thanks for your input.
|
|
|
|
|
|
Trollslayer wrote:
Did you put the header file into your stdafx.h file ?
Tried this. Nothing gets better by doing this.
|
|
|
|
|
Hi-
Is there documentation about how to use the visual c++ MS Flex Grid in a View, instead of the usual dialogue box?
Thanx, rich
rich
|
|
|
|
|
Using FormView?
<italic>Work hard, Work effectively.
|
|
|
|
|
How does one get the default bar color used by the CProgressCtrl? (non-themed of course)
Is there a system color setting used for this or is it always dark blue?
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
Painted on the side of a dog trainer's van: SIT HAPPENS
|
|
|
|
|
After screwing around a bit, it looks like it's the system highlight color.
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
Painted on the side of a dog trainer's van: SIT HAPPENS
|
|
|
|
|
Dear all,
Can anyone stop the flicker occuring in the CTabCtrl? I add WS_CLIPCHILDREN and WS_CLIPSIBLINGS styles to the dialog, and insert that dialog to my TabCtrl, but it still flickers when resizing the TabCtrl.
Sincerely,
|
|
|
|
|
I am trying to figure out how to set, replace and remove an imagelist for a CListCtrl at runtime.
If, during the creation of the CListCtrl, I set an imagelist, using SetImageList(), I am able to remove it using RemoveImageList(). But, the list control appears to still leave some space between the edge of the control and text items for an image of some kind (in report mode). Also, after removing the image, I am not able to re-set it.
If I do not set an imagelist when creating the control, the text items appear next to the left edge of the control (in report mode). But, I am not able to set one after the fact.
Any help would really be appreciated.
Thanks in advance,
-Dale
|
|
|
|
|
Do you destroing old imagelist object after you remove?
|
|
|
|
|
No, I do not destory it for I might want to use it again later. But, I call CListCtrl::RemoveImageList() which sets the handle to the image list to NULL. So, now I have no image list, but my items still indent the width of an item image - they are not flush against the left edge of the control.
-Dale
|
|
|
|
|
I understand this behaviour is unsual. I would play with that.
Try to desroy it. Just for experiment. I undersand you want to switch different ILs. Just in case if IL internaly uses GlobalAlloc, to make sure nothing is left.
The other thing did you try to:
1. Set first IL
2. Set another (I guess that's what you doing now)
3. Set first IL again
Now is 3rd case has no problems?
or
1. Set first IL
2. Set IL with very small size (one image with size 4x4 pix)
3. Set first IL again
?
One more question size of IL (16x16) are the same for both IL?
Is background masks are same for both IL? (RGB(255, 0, 255)) or ...
|
|
|
|
|
How do I add a tree control to the second or third tab of a tab control in c++?
Normality is a weakness...
|
|
|
|