|
You have to correctly identify the code page of the original string. You are not. If you have a multi-byte Japanese string using Shift-JIS, you need to use that, not UTF-8. The point is that UTF-8 is a very specific encoding, not just multi-byte in general.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
You are right. We need to identify the appropriate code page and then accordingly use UTF8/ACP.
I think for eastern languages it is UTF8 and for European languages it is ACP.
Thanks a lot for your help.
Sunil
|
|
|
|
|
I need to know if its possible to load a file from hard disk and then
set the quality of jpeg and save the file as a jpeg file
i am using Cximage class and the folowing code
CxImage image;
image.Load("D:\\mypic1.bmp", CXIMAGE_FORMAT_BMP)
if(image.IsValid())
{
image.SetJpegQuality(70);
image.Save("C:\\mypic.jpg", CXIMAGE_FORMAT_JPG);
}
But the code does not seem to work.
Help would be appreciated
Thanks
Thanks to Stuart Dootson and Hamid for making CxImage class work i have now included the header files
but this new problem
Regards
HASSAN
|
|
|
|
|
just a personal advice, why don't you use I Imagemagik library instead of CxImage?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I have a suggestion for you instead this code
you can use of CImage class(it has good methods for work on images) and its simple and like this:
CImage image;
image.Load(_T("D:\\mypic1.bmp");
....
....
image.Save(_T("C:\\mypic.jpg"));
or
image.Save(_T("C:\\mypic.bmp",Gdiplus::ImageFormatBMP);
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Thanks for ur help i have got it working
|
|
|
|
|
Im glad it was helpful.
You can give me 5 vote if you like.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
I am trying to use Cximage class in my own visual C++ project.
I am using Visual Studio 2008 Professional Edition
All i want is to read a BMP file from hard disk and save it as a Jpeg file
But when i use the object of the CXimage class upon compiling i get a large
number of error of unresolved external symbols e.g
cximage.lib(ximaraw.obj) : error LNK2019: unresolved external symbol
This repeats for all the tiff,jpeg.... objs
Any One can help me out i am having nightmares using cximage class.
Thanks
Hassan
|
|
|
|
|
Sounds to me like you haven't included all the associated libraries that CxImage uses to read/write the different image formats - they all look to be included in the source.
If that's all you want to do, though, and you're using VS2003 or later, I'd use an ATL/MFC CImage[^].
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Did you import lib file?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
I have only imported to cximage.lib file.
As rest of the library files to include i cant find.
I am downloading the linked library files from http://www.xdp.it/cximage/
But after unzipping the files i cant seem to find the ".lib" file of each of the linked libraries
Do i need to compile the downloaded projects if so with what settings
I am using Visual Studio 2008
Thanks
|
|
|
|
|
I have five records in 2D array (w/ pairs, X and y coordinates).
Wants to search position [records already sorted according to y ] and insert weighted number and leave the 2D array sorted.
Please help............
Thanks
|
|
|
|
|
Please elaborate.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Dear all
i am new in C++ but old in VB and other softwares my problem is i need to create a DLL which will browse for the folder and select a file i have surf the net but could not find a single solution for the same except i found some file which is nearby what i wanted but it creates and EXE and i wanted a DLL
i need sepecific things which will open the browse folder as soon i call the DLL and return the filename after it browse
Kindly help please
Sanjay Jobanputra
|
|
|
|
|
To create a DLL project, go to the "File" menu, select "New Project" and then "Class Library" - that will generate a DLL instead of an exe.
I'm not sure I really understand what you want the DLL to do but it sounds like a file open dialog, which you don't really need to have as a separate DLL unless it's going to do some other things with the file.
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
To expand on molesworth's answer, Win32 provides GetOpenFileName[^] (let the user select a file/files) and SHBrowseForFolder[^] (let the user select a folder).
Both are usable from VB6, if htat's what you need:
SHBrowseForFolder[^]
GetOpenFileName[^] - this example's VB5(!), but VB6 and VB5 are similar enough...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I think you dont need to make a dll for it you can use of these apis on VB(Stuart Dootson' answer).
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Any specific reason for creating dll, when you achive same by simply writing a function in your application?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Dear All
Thanks but my problems is different
A) I am not expert in C++
B) The software which we use calls only C++
C) i have checked the net where i found similar things but it creats only an exe whereas i wanted on DLL
What DLL i wanted is as soon i call the class it will open an opendialog like how it happend in windows the -->file->>open--> selcect the file -->>
Thanks in Advance
|
|
|
|
|
Can someone direct me to an article if this is possible.
I have 3 interloops in a process that takes about an hour or so to complete, based on the data it seems to be right.
However I have that process in it's own worker thread. I was wondering if that can be further multithreaded?
|
|
|
|
|
As you've mentioned a 'for' loop, I think OpenMP[^] is probably the simplest first thing to investigate, as it's aimed at that sort of thing[^].
Here's a CP article[^]...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
FISH786 wrote: However I have that process in it's own worker thread. I was wondering if that can be further multithreaded?
Yes and No!, answer is based on software design, your company software architect can help in this case. It very difficult to answer this question from remote.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
hi,
i want to simulate a key press on a window.
eg: ive handle to the notepad window and i want perform "ctrl+s" on notepad.
how to do that, please help me
Thanks & Regards
|
|
|
|
|
|
I am deleting a record from the table and then using the MoveNext()fucntion to move to the next record in the recordset.Below is the code for that.
How do i do that using the code below ??
<pre>void CSimpdbView::OnRecordsDelete()
{
CSimpdbDoc* pDoc=GetDocument();
_CommandPtr pCmd;
pCmd.CreateInstance(__uuidof(Command));
_ParameterPtr paramIsbn;
CString strIsbn;
CEdit* pEdit = (CEdit*)GetDlgItem(IDC_ISBN);
pEdit->GetWindowText(strIsbn);
_bstr_t sqlQuery("DELETE FROM lib WHERE ISBN = ?");
int val = MessageBox("This deletes the record.Continue ?",NULL,MB_OKCANCEL);
if(val == IDOK)
{
try
{
pCmd->ActiveConnection = pDoc->m_pConnection;
pCmd->CommandText=sqlQuery;
paramIsbn = pCmd->CreateParameter("strIsbn",adVarChar,adParamInput,-1,vtMissing);
paramIsbn->Value = (_variant_t)strIsbn;
pCmd->Parameters->Append(paramIsbn);
pCmd->Execute(NULL,NULL,adCmdText);
MessageBox("Record Deleted !",NULL,MB_OK);
pRs->MoveNext(); //Should move to the next reccord !
}
catch(_com_error &e)
{
TRACE( "Error:%08lx.\n", e.Error());
TRACE( "ErrorMessage:%s.\n", e.ErrorMessage());
TRACE( "Source:%s.\n", (LPCTSTR) _bstr_t(e.Source()));
TRACE( "Description:%s.\n", (LPCTSTR)_bstr_t(e.Description()));
}
catch(...)
{
TRACE("\n****Unhandled Exception****\n");
}
}
}
Help Please .
|
|
|
|