|
You see the ASCII Output of "\r\n".
Check that your control is multiline enabled.
Try Status.Format( %s\r\n", aCString )
Try this @ home. (B&B)
|
|
|
|
|
Ya! I adjust the mutiline option and it works fine now Thanks!
|
|
|
|
|
some windows controls use \n only and some use \r\n, try just using \n alone, that might fix your problem, although the fact that it displays II means it isn't understand either \r nor \n, so you may be out of luck, try to figure out some other way of using newlines i guess.
|
|
|
|
|
What is _T("") used for? I see it a lot....
Thanks.
nds
|
|
|
|
|
The _T macro cares for proper encoding of the text (argument). Subject to your compiler preferences _T("zorro") will result in a simple character string "zorro", or in the Unicode equivalent "zorro"L, or in a MBCS encoding.
To prepare for I8N, you should use the _T macro to embrace all text constants, only use the "T" types (TCHAR, LPTSTR, LPCTSTR), and "T" functions ("_tcscmp", etc). Also, you should stop using Format or Printf-like functions but prefer the arkward FormatMessage() functions instead.
Of course, all this only matters if you use MSDEV, and if I8N is a (potential) issue for you.
Bernd
|
|
|
|
|
Sorry about my ignorance, but what is I8N?
|
|
|
|
|
Ooops... Should have been I18N, short for internatialization (the letter I, 18 other characters, then the letter N).
Bernd
|
|
|
|
|
Make build compatible between UNICODE, ANSI and MBCS.
Basically, in an Unicode build, you want all "normal" string constants to be Unicode (wchar_t *), and in an ANSI build, all of them to be ANSI (char *).
A UNICODE string constant is indicated by an L : L"Hello" is a UNICODE Hello (independent of UNICODE or ANSI build)
_T("Hello") evaluates to "Hello" in ANSI builds, and L"Hello" in UNICODE builds.
If you go to war, you will destroy a great country a stoned greek chick to the richest man of the world
[sighist] | [Agile Programming] [doxygen]
|
|
|
|
|
|
Q1:
Does anybody know the overhead of a complete APC "round trip" vs. a synchronous execution - i.e.
Thread A: QueueUserAPC
Thread B: processes the request, and sets an "ready" Event at the end
Thread A: Waits for the "ready" event
vs.
Thread A processes the request
Assuming Thread B is in an alertable state already.
Q2:
Are there limitations on the APC queue, how many can / should be queued?
If you go to war, you will destroy a great country a stoned greek chick to the richest man of the world
[sighist] | [Agile Programming] [doxygen]
|
|
|
|
|
Threading is a cool feature, because it cost not much on performance. If you have an UI and a long process you should do this, because than the UI is released (for refresh, user actions)
If I knew what an APC is maybe I could answer Q2.
Try this @ home. (B&B)
|
|
|
|
|
Asynchronous Procedure Call: using the QueueUserAPC function, you can "ask" another thread to execute a function. It's a simple replacement for the worker thread to wait for a message or "kickToGo" event.
I just ran some tests today, and I'm pretty pleased. The operations I have to run are as short as 3 ms; APC overhead seems to be only up to 3% in the long run (tested on 3 systems).Behavior gets a little bit weird (on one box, the async processing takes 30% more on one box, and 30% less on another - which really is puzzling)
If you go to war, you will destroy a great country a stoned greek chick to the richest man of the world
[sighist] | [Agile Programming] [doxygen]
|
|
|
|
|
Hi Everyone
How do I detect when a a pc has been connected to internet? Is any event fired at that time
WinInet has got InternetGetConnectedState() which will tell me if pc is connected to internet or not. but since I want to be exact I want to know immediatly when the user is connected to the internet.
Can anyone help me please?
I need this urgently.
Ashish
|
|
|
|
|
If you're only interested in RAS connections, you can use the function RasConnectionNotification which informs you about connections established by RAS.
We are men. We are different. We have only one word for soap. We do not own candles. We have never seen anything of any value in a craft shop. We do not own magazines full of photographs of celebrities with their clothes on. - Steve
|
|
|
|
|
Hello,
I have application where i need to show modal message window.
It should be custom ( not AfxMessageBox ) , so i built a class
CPopupDlg which is inherited from CDialog and it's a DLL , because i need to call it from different dialogs ( and i don't want to duplicate it . It doesn't have title bar.
CPopup constructor gets "CWnd* pParent" ( for z-order , etc )
So , i call for it in following way ( from another dialogs ):
CPopupDlg* pPopupDlg;
pPopupDlg = new CPopupDlg( this );
pPopupDlg->SetPopupMessage( m_strPopupMsg );
pPopupDlg->DoModal();
The dialog itself works fine , showing needed msg with custom
colors , custom buttons , etc.
BUT , there is a problem.
There's a title above CPopup dialog ( while originally it doesn't
have title bar ) of dialog calling for it.
For example , if calling dialog has title text "My Test Window"
this text will appear in title above CPopup dialog .
Here's screenshot
Here's entry from .rc file
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_POPUP_DIALOG DIALOG DISCARDABLE 0, 0, 187, 92
STYLE WS_POPUP
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,130,7,50,14,NOT WS_VISIBLE
PUSHBUTTON "Cancel",IDCANCEL,130,24,50,14,NOT WS_VISIBLE |
WS_DISABLED
CONTROL "popupOK",IDC_POPUP_OK,"Button",BS_OWNERDRAW | NOT
WS_VISIBLE | WS_DISABLED | WS_TABSTOP,15,65,55,15
CONTROL "popupCancel",IDC_POPUP_CANCEL,"Button",BS_OWNERDRAW |
NOT WS_VISIBLE | WS_DISABLED | WS_TABSTOP,115,60,50,20
END
Any help greatly appreciated ( it's pretty urgent ),
thanks a lot
|
|
|
|
|
The information you provided is probably not sufficient.
I made a test program and it works fine; i could have send it to you if i would have know your email address...
rechi
|
|
|
|
|
hi,
i have this problem wenn convert a COleCurrency to a string with "Format" but if the currency is: 149.5 it will NOT be converted to the string "149.50", how can i do this?
[]D [] []D []
|
|
|
|
|
strCurrency.Format("%.2f",nNumber);
|
|
|
|
|
Friends,
I am trying to set the line size and the scroll size for the CRichEditCtrl.Please help me because i am not able to customize the page up,page down and simple scrolling commands.
Thanks in advance.
Vivek Dabral
|
|
|
|
|
HI ALL,
Anybody knows how windows get painted on the Screen? As far as I know GDI32 does most of the works.But as far as actual windows concern,We do not have more then CreateWindow.So how the CreateWindow does it's work? anybody has an idea? Also I want to know some clear differences between Windowing System and GDI stuff.
VikramVS
|
|
|
|
|
Does anyone have any ideas on reading the information from .dsp/.dsw files, or, failing this, using the Visual Studio automation interface to read project settings (if thats even posible) ??
My aim is to be able to dump out a projects settings - compile and link options etc so that they can be compared to a reference (read working) project.
I guess I can export a makefile and use that ... Ideally I would convert the relevant parts to XML.
Thanks, 'G'
sorry, no humour today - Ive had 6 hours sleep for the past 3 days, anything I could say would be interpreted as thinly veiled sarcasm....
|
|
|
|
|
Garth J Lancaster wrote:
, using the Visual Studio automation interface to read project settings
Don't waste you're time on this. The automation interface is pretty stupid, and one of the many things you can NOT do is enumerate all the project's files (or if you can I have yet to figure it out - now watch, you'll be undaunted by this and figure it out in 15 minutes making me look like an idiot!). You can enumerate all the windows that are open, but this is not very useful.
If all you want is basic project settings from the configuration, you can get this info. Look at the IConfiguration interface for this
But if you really want to deal with what files are in the project, then you'll have to write/hack/cobble together some little parser to read in the dsp file.
Cheers
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
|
|
|
|
|
Yeah, Jim is right, you'll have to hack together a DSP parser. Trust me, it sux. There's some classes which can give you a start on this, in my article:
http://www.codeproject.com/useritems/includefinder.asp
The classes you may be interested in will be in DSObjects.h, DSObjects.cpp, VC6Objects.h, and VC6Objects.cpp.
They are very far from perfect (and only interpret some of the compiler settings), but like I said, it's a start. If you were working with VC7, you'd be in a lot better shape to accomplish this task.
Chris Richardson
C/C++ Include Finder[^]
|
|
|
|
|
Many thanks - went back to your article, and its a ripper - I didnt connect 'how' you found the files, I took (without checking the details) the naive opinion that 'he probably found all the '.h, .cpp etc' files from a directory list and then parsed & mapped them'
your solution is much better ...
roll on the day I get VC7 at work !!!!
'G'
|
|
|
|
|
Garth J Lancaster wrote:
My aim is to be able to dump out a projects settings - compile and link options etc so that they can be compared to a reference (read working) project.
Why can't you just compare the master .dsp with the current one?
I've got some basic code to read the list of files in a .dsp which Chris Richardson has used in his C/C++ Include Finder. See his post. I assume Chris's code will be more usefull as I assume he's built extra stuff on top of what I sent him, and made some nice classes.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|