|
Yes it work smoothly in "Traditional Chinese"... Trust me, Other applications which reads are ANSI based... I am really confused why it's not working in the case of "Simplified Chinese".
Thanks.
|
|
|
|
|
My program is in UNICODE, and other applications(Which read from LAN) as i mentioned earlier were written long back and in ANSI... But when i make "Traditional Chinese" lan files the applications read the right data and i get right data in GUI.. I'm writing the unicoded data in the file(notepad) in my program...
So isn't there any way for "Simplified Chinese".
Thanks.
|
|
|
|
|
|
Also when i tried "Traditional Chinese" LAN files in "Simplified Chinese" operating system, It shows everything in English..I mean when i check LAN files it is in "Traditional Chinese" but when applications read from LAN files and display on GUI, it shows everything in English.. The OS is Windows7..
Also in Win XP, The application shows the mixture of right data and "?", It must mean that whatever application understand it shows it and for the rest it shows "?"..
Thanks.
|
|
|
|
|
I have a CMFCRibbonComboBox (which is derived from CMFCRibbonEdit), and I've captured the event of the user selecting an item by overriding OnSelectItem. However I don't know how to capture the event of the user typing inside the edit box and pressing enter. I looked at CMFCRibbonEdit::OnKey, but it is not called. Should I place a message-map entry instead? In spyxx the class of the edit box is isn't "EDIT", but "RichEdit20A".
Here's my code so far:
class MyCMFCRibbonComboBox : public CMFCRibbonComboBox
{
public:
MyCMFCRibbonComboBox(UINT nID, BOOL bHasEditBox = TRUE, int nWidth = -1, LPCTSTR lpszLabel = NULL, int nImage = -1)
: CMFCRibbonComboBox(nID, bHasEditBox, nWidth, lpszLabel, nImage)
{
}
virtual void OnSelectItem(int nItem)
{
CMFCRibbonComboBox::OnSelectItem(nItem);
}
};
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Just override the rich Edit EN_CHANGE message.
It will be notified.
Величие не Бога может быть недооценена.
|
|
|
|
|
I tried overriding it in CMainFrame message map like this
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWndEx)
...
ON_EN_CHANGE(ID_RIBBON_BTN_COMBO, OnRibbonBtnComboChange)
...
END_MESSAGE_MAP()
But my function didn't get called.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
modified on Friday, August 7, 2009 7:51 AM
|
|
|
|
|
Did u checked with spy++, which message is coming on clicking the Rich edit
From which control does your control derived from Combo box?
Величие не Бога может быть недооценена.
|
|
|
|
|
Well, while typing inside the edit control mostly 0x400 notify message is sent (EN_UPDATE). But it's called even when I'm not typing anything.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Hello Friends
I m reading one .bmp file using Bitmap and BitmapiNfo class.I m getting RGB value for each pixel and file size is around 27kb having pixels 96*96 .
And now the problem is I can write this much data as ASCII into my XML file so first how do i converto them as Binary then after that Can i write binary data into XML file?
Thanks IN Advance.
Regards
Yogesh
|
|
|
|
|
why XML?
It is Possible, but i afraid whether it is a good solution.
Величие не Бога может быть недооценена.
|
|
|
|
|
b'coz I m using XML as database.so thats y i need to save all this information IN XML.
|
|
|
|
|
yogeshs wrote: b'coz
yogeshs wrote: y
You use such a conciseness in your posts and such a verbosity in your databases, let's try the opposite...
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]
|
|
|
|
|
Why do you want to save your bitmap into your xml file ? This looks like a very ugly solution to me... Waht are you trying to achieve by doing this ?
|
|
|
|
|
b'coz i m using XML as database .Thats y i need this.
|
|
|
|
|
Yeah but the question is: why do you want to use XML as a database ? Why not a plain standard database then ?
|
|
|
|
|
You may encode binary data using, for instance, Base64 representation, see [^].
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]
|
|
|
|
|
//XSocket is sub class of CSocket
XSocket*psk;
//connect etc.
assume:
psk->Send(...)
is guaranteed to send a message to other side.
If the socket is colosed immediately after Send(...) as
psk->Send(...);
psk->Close();
is the Send(...) function still guaranteed to send the message to other side?
|
|
|
|
|
I guess that if Send is a synchronous call, it is guaranteed to send the message when the function returns.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Yes, given that the 'other side' is connected and active, the operation is guaranteed. You might want to check the return value of XSocket::Send() , just in case...
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
includeh10 wrote: psk->Send(...)
is guaranteed to send a message to other side.
This just copies it into the socket send buffer, there is no guarantee that all data will be sent completely. Returning from CSocket::Send()[^] does not indicate that the remote peer has received all data. What you do might work in the LAN (in some cases), but it won't work reliable over the internet. Also see what's the proper way to close a TCP socket[^].
Hope it helps!
/M
|
|
|
|
|
Hi,
to capture video screen in DirectShow , I did as follwing...
it's woring well in case of *.wmv file...
but in case of *.avi didn't work...
After calling ...GetCurrentBuffer(&lBufferSize,NULL);
the value of lBufferSize is minus...(for example -2838382392 )
I don't know why lBufferSize is minus value...
void CTest::play()
{
m_pGB = NULL;
m_pMC = NULL;
m_pVW = NULL;
m_pBV = NULL;
m_pME = NULL;
m_pMS = NULL;
m_pSampleGrabber = NULL;
m_pSG = NULL;
CoInitialize(NULL);
CString m_file;
WCHAR wFileName[MAX_PATH];
TCHAR m_szFileName[MAX_PATH];
m_file = m_,"C:\\cs\\mds\\movie\\a.avi";
#ifndef UNICODE
MultiByteToWideChar(CP_ACP, 0, m_file , -1, wFileName, MAX_PATH) ;
#else
lstrcpy(wFileName, m_szFileName);
#endif
CoCreateInstance(CLSID_FilterGraph,NULL,CLSCTX_INPROC,IID_IGraphBuilder,(void**)&m_pGB);
CoCreateInstance(CLSID_SampleGrabber,NULL,CLSCTX_INPROC,IID_IBaseFilter,(void**)&m_pSampleGrabber);
m_pGB->AddFilter(m_pSampleGrabber,L"Sample Grabber");
AM_MEDIA_TYPE m_pMedia;
ZeroMemory(&m_pMedia,sizeof(m_pMedia));
m_pMedia.majortype = MEDIATYPE_Video;
m_pMedia.subtype = MEDIASUBTYPE_RGB24;
m_pSampleGrabber->QueryInterface(IID_ISampleGrabber,(void**)&m_pSG);
if(m_pSG != NULL)
{
m_pSG->;SetMediaType(&m_pMedia);
m_pSG->SetBufferSamples(TRUE);
}
m_pGB->QueryInterface(IID_IMediaControl,(void**)&m_pMC);
m_pGB->QueryInterface(IID_IVideoWindow,(void**)&m_pVW);
m_pGB->QueryInterface(IID_IBasicVideo,(void**)&m_pBV);
m_pGB->QueryInterface(IID_IMediaEventEx,(void**)&m_pME);
m_pGB->QueryInterface(IID_IMediaSeeking,(void**)&m_pMS);
m_pGB->RenderFile(wFileName,NULL);
m_pMC->Run();
}
void CTest::ScreenShot()
{
m_pSampleGrabber->QueryInterface(IID_ISampleGrabber,(void**)&m_pSG);
if(m_pSG == NULL)
{
return;
}
long lBufferSize;
m_pSG->GetCurrentBuffer(&lBufferSize, NULL);
BYTE* pBuffer = new BYTE[lBufferSize];
if (!pBuffer)
return;
m_pSG->GetCurrentBuffer(&lBufferSize, (long *)pBuffer);
if (m_pSG != NULL)SaveImage(...);
delete pBuffer;
}
|
|
|
|
|
Please, read the posting guidelines before posting (use the code tags to format your code properly, to make it more readable).
For your question, did you check the return value of GetCurrentBuffer ? See the documentation[^]
|
|
|
|
|
Hey,
So I am just trying to utilize some of the built-ins for from the stl containers. I want to be able to store a class in a map, using one of the params as the key, and then retrieve it via an iterator.
It looks like this:
typedef std::string NodeName;
typedef std::set<NodeName> NodeSet;
typedef std::map<NodeName, NodeSet> NodeMap;
class Node : public std::pair <NodeName, NodeSet>
NodeMap NMap;
...some code...
I can insert objects easily enough:
Node n (...);
NMap.insert (n);
lets say i do that a bunch.
I then want to iterator over the map, extracting the data as I go.
for (NodeMap::iterator it = NMap.begin (); it != NMap.end (); it++)
{
Node &node = *it; <-- fails
}
I get the following error:
"~/testing/nodelist% g++ NodeList.C
NodeList.C: In function âvoid compute()â:
NodeList.C:40: error: cannot dynamic_cast â& itâ (of type âstruct std::_Rb_tree_iterator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::set<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > >*â) to type âclass Node*â (source type is not polymorphic)
NodeList.C:51: error: âclass std::set<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >â has no member named âneighborhoodâ"
I tried dynamic casting but i couldn't seem to find it properly. Is there a legal way that I can do this? In the node class I made some handy little functions (nothing special), and I'd really like to be able to use them.
Could you please point out what my mistake is?
|
|
|
|
|
what you're doing looks terribly complex/convoluted - but anyway ..
you have an iterator 'it' to your map - which is a string 'NodeName' ->NodeSet , so,
it->first will be the string/NodeName
it->second will be the NodeSet
(ie, look up the properties of the iterator for a map)
|
|
|
|
|