|
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
My guess would be that the 'from scratch in VS2008' version uses Unicode, the 'upgraded from VS6' one uses ASCII. I can see various places where you are (incorrectly) assuming ASCII, but the killer is in CSocketsDlg::OnReceive. Where you read a number of bytes and then append to a CString. The string you've received will have '\0' characters in it, because it's a wchar_t string that you've interpreted as char, so when you append it to a CString, the rlevant method will use strlen to find the string length, see the zero byte after the first character and say 'Aha, that's the end of the string!' - but not where you a) wanted, or b) expected.
So - fix the ASCII assumptions, man!!!! Or turn off Unicode
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Here's some data sent and received b/w both applications and their versions->
( Visual studio 6 ) ( VS 2008 Pro )
---------------------------------------------------------------------------------------
sent recvd | sent recvd
---------------------------------------------------------------------------------------
123456789 | 123456789
----------------------------------------------------------------------------------------
1 123456789
I hope this will give u a clear understanding about my BUG.
If u compile these applications then u should get these results.
Manmohan Bishnoi
|
|
|
|
|
monu_biosman wrote: I hope this will give u a clear understanding about my BUG.
I already understand what your bug is, well enough that I told you how to fix it - either turn off Unicode in your app developed from scratch with VS2008, or make your usage of Unicode/ASCII strings consistent.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
how to turnoff Unicode in current project in VS 2008 Pro
Manmohan Bishnoi
|
|
|
|
|
Select the project in solution explorer, right-click on it and select Properties from the context menu. Now go to the Configuration Properties->General property page and set the Character Set property to 'Use Multi-Byte Character Set'
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Debug version is working ok but not having xp common controls look.
Release version not working ok but having xp common controls manifest.
Manmohan Bishnoi
|
|
|
|
|
Did you change the property for Debug AND Release configurations - the properties are (unfortunately, in many ways) set separately.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
And the manifest file...ummm - is the project property Configuration Properties->Linker->Manifest File->Generate Manifest set to Yes in all cases?
Although it may be that XP themes need Unicode.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
done as u told me to do. But no use.
Anyway atleast debug version got somewhat debugged.
Manmohan Bishnoi
|
|
|
|
|
Hi.
I'm stuck with the same problem. Whenever my program receives data from any tcp/ip server, it displays it correctly, but when it sends data back to the server, the latter receives only the first character. Turning off Unicode is not an option, becouse the tcp/ip communication is only a small part of the project, and this change generates lots of other errors. I'm also using the tutorial from David Chapman's "Teach yourself Visual C++ 6...", and Visual Studio 2k8, so my code is almost exactly the same as monu_biosman's.
I'd like to ask Stuart, or anyone else for that matter, what exactly I need to change to make it work. I already made lots of tests, but none seem to work.
iLen = m_strMessage.GetLength();
iSent = m_sConnectSocket.Send(LPCTSTR(m_strMessage), iLen);
iSent = m_sConnectSocket.Send("blablabla", 9);
CString buffer = "blablabla";
iSent = m_sConnectSocket.Send(buffer, 9);
char[1024] buffer;
wsprintf(buffer,"%s",m_strMessage);
iSent = m_sConnectSocket.Send(m_strMessage, 1024);
I'm running out of ideas, or maybe I'm a retard i don't know. Any help would be greatly appreciated. Thanks in advance.
SquiZZlo
|
|
|
|
|
Ok, I've found the answer to my problem on another forum:
iLen = m_strMessage.GetLength();
CStringA ansiString(m_strMessage);
iSent = m_sConnectSocket.Send(ansiString, iLen);
Works prefectly!
|
|
|
|
|
The print dialog for CHtmlView is a non-modal dialog and I would like to know if there's a way to make it modal. It's annoying that you can close the view (in an MDI app) and the print dialog still sits there - if you then ok it you get an error (as expected as the document no longer exists). The MFC OnFilePrint function uses the OLECMDID_PRINT verb but the parameters available for this are vague. The print dialog in IE itself is modal so why should it be non-modal for other applications? Any answers appreciated.
|
|
|
|
|
hi,
i am working on a product based on visual c/cpp.
the product is gui base,and creates window and othe widgets on drag and drop basis.
on creation of a project it creates its own .rc file,a .dat(holds widgets' gui info such as width,color runtime)file,.c,.h and a make file for compiling the application.
now i am facing problem while trying to attach a colored(32x32) .ico file at title bar of a window.
till now i have done:
1.put the .ico file at the correct directory.
2.created a .rc file and put (1 ICON dalocsv.ico) in that file.
3.Now complied the make file with some of the added flags and tha created the .res file which shows the icon at its editor.Also the exe created. But the icon is missing.
CAN SOMEBODY PLZ HELP ME WETHER I AM MISSING SOME STEPS.
OR IS THERE OTHER WAY?????
Thanks in advance
Rajib
|
|
|
|
|
Rajib Podder wrote: i am facing problem while trying to attach a colored(32x32) .ico file at title bar of a window.
As far as I know, the icons in the title bar are 16x16.
If you use file explorer to browse the directory with your exe, you will probably see the 32x32 icon if you select that kind of view in explorer.
Rajib Podder wrote: CAN SOMEBODY PLZ HELP ME WETHER I AM MISSING SOME STEPS.
OR IS THERE OTHER WAY?????
Please don't shout in the forums.
Read the guidelines[^], especially item #6.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
hi,
as i have already...informed that i have the .res file containing the .ico file.
Now my question is that how can i attach the icon inside my application.
I have already described about my application.
or
please let mr know..if there are any other way out???????????????
|
|
|
|
|
Rajib Podder wrote: i am facing problem while trying to attach a colored(32x32) .ico file at title bar of a window
...
the icon is missing
Roger Stoltz wrote: the icons in the title bar are 16x16
Rajib Podder wrote: how can i attach the icon inside my application
As I have already...informed you can't since your icon has the wrong format.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Is ther any other alternative.
Can i attach any image?
if so,Please let me know the procedure
|
|
|
|
|
Hallo,
i have the following code:
void CTest_MyDocumentDoc::Print_Output()
{
m_ptrOutput->Invalidate (true);// m_ptrOutput= (CRichEditView *) m_wndSplitter.GetPane(1,0);
m_ptrOutput->UpdateWindow();
UpdateAllViews(NULL);
}
i have splitted SDI-appliction and i need to call OnDraw() indirectly to print / draw my results in the second part of my splitted sdi App., this code does not work , the OnDraw() does NOT be called ??
|
|
|
|
|
Don't do it that way. Put your code to draw the window in a separate method and call that method from both OnDraw and Print_Output, passing a suitable DC in both cases.
So, if you call it "DrawView", OnDraw would call DrawView, as would Print_Output.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
i tried to do it that way before, but i did not have any text drawen on the monitor, i am forced to do it that way, and how can i get a suitable DC ?
please explain in code . thanks
|
|
|
|
|
susanne1 wrote: a suitable DC
OnDraw[^] gives you a screen DC
CPrintDialog/CPrintDialogEx can be used to create printer DCs, if you aren't going to follow the standard MFC printing mechanisms.
So in each case, you have a way of calling your 'draw' code with a suitable DC.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,
write now i got every folder mails like for outbox, I used "PR_IPM_OUTBOX_entryid". Like this I got mails from every folder except from junk mail. What is id for junk mail
plz reply, thanks in advance.
sampath-padamatinti
|
|
|
|
|
Hi All,
i am using xmlhttp to fetch data from the server, now i have issue that i am fetching multiple pages one by one for the session, but with some pages i am getting this "Sorry, there are no results for the adjustments that you have selected" in response but data is available in the live environment, i think that i have to use time delay among request but i am not sure what exactly i am missing....please provide some ideas.
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
The reason you're not getting results back is probably more to do with the server-side software than with your use of XMLHTTP.
Very difficult to say when you've provided virtually no information.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|