|
You could always use edit.com
Sprudling
|
|
|
|
|
edit.com was introduced with DOS 5.0 [it was part of the qbasic set]
later it became stand-alone
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
You can use IsTextUnicode and see what it returns. This is probably what notepad does..
/moliate
|
|
|
|
|
According to the Microsoft "What's New In MFC7" information (that I've seen some time ago on the net), it is possible to enable standard Windows/MFC application to consume Web Services. Has somebody seen any sample/code or detailed technical article about the topic? Thanks.
Dejan Petrovic
|
|
|
|
|
I have a service that appears to eat memory at a pretty steady rate. If I bring up Task Manager, I can watch the Virtual Memory (and real memory) counter climb steadily.
In trying to solve the problem I used the CRT library to checkpoint the memory periodically. This technique has allowed me to find and fix several leaks.
Now, however, the CRT library machines are telling me there are no more leaks, while the task manager says there are still some left (real and VM still rises steadily). Following the example in MSDN, I've declared 3 _CrtMemState variables as globals (s1, s2, s3).
My app does a check point into s1 and then sets a timer.
When the timer goes off, the handler executes and then does another checkpoint into s2. The two checkpoints are compared into s3 and the result reported, as usual. The report shows differences in allocated memory between s1 and s2, as you would expect. The interesting part is that none of the allocation numbers change, while the Task manager keeps saying I'm eating memory!!
I know the checkpointing is working because the display shows a higher total allocations count each time.
Any ideas would be appreciated.
Here's the code I'm using for the checkpoints.
_CrtMemState s1, s2, s3;
_CrtMemCheckpoint(&s1);
::SetTimer(NULL, NULL, 1, OnPollTimer );
VOID CALLBACK OnPollTimer( HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime )
{
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
_Module.m_bProcessRunning = TRUE;
::KillTimer(hwnd, idEvent);
DoPollTimer();
TRACE0(_T("OnPollTimer 1\r\n"));
_CrtMemCheckpoint(&s2);
_CrtMemDifference(&s3, &s1, &s2);
_CrtMemDumpStatistics(&s3);
TRACE0("----------------------------------------------------------\r\n");
::SetTimer(NULL, NULL, g_lPollFreqSecs * SECOND, OnPollTimer );
_Module.m_bProcessRunning = FALSE;
}
I don't have access to the server right now, so I can't provide a sample of the output. It shows some memory allocated as normal, client and CRT. The numbers don't change from one iteration to the next.
Any ideas would be greatly appreciated.
Thanks for the help,
Bill
|
|
|
|
|
(Some of my information might be outdated...)
Those routines can only check for memory managed by the C runtime library (this is where I could be wrong if they have changed how this works.)
Thus, things like ATOMs, heap allocations, native WIN32 allocations, etc can all still be leaking. Are you creating a bunch of GDI objects and not properly destroying them?
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
My app is a service running on NT. It has no UI, so I don't think its a GDI leak. Do you have any suggestions on how to detect/isolate the other possiblities for leaks?
I don't know how to monitor the rest of the memory usage.
Thanks for the help,
Bill
|
|
|
|
|
InsertItem don't work :
void CMyListView::OnInitialUpdate()
{
CListView::OnInitialUpdate();
ModifyStyle(NULL, LVS_REPORT,0);
// this code only works for a report-mode list view
//ASSERT(GetStyle() & LVS_REPORT);
// Gain a reference to the list control itself
CListCtrl& theCtrl = GetListCtrl();
// Insert a column. This override is the most convenient.
theCtrl.InsertColumn(0, _T("Names"), LVCFMT_CENTER);
// The other InsertColumn() override requires an initialized
// LVCOLUMN structure.
LVCOLUMN col;
col.mask = LVCF_FMT | LVCF_TEXT;
col.pszText = _T("Version");
col.fmt = LVCFMT_CENTER;
theCtrl.InsertColumn(1, &col);
theCtrl.InsertColumn(2,"Description",LVCFMT_CENTER);
// Set reasonable widths for our columns
theCtrl.SetColumnWidth(0, 200);
theCtrl.SetColumnWidth(1, 100);
theCtrl.SetColumnWidth(2, 100);
GetListCtrl().InsertItem(0, "First row"); //Don't work ??
// TODO: You may populate your ListView with items by directly
//accessing
// its list control through a call to GetListCtrl().
}
Please Help Me ,thanks
|
|
|
|
|
je wrote:
ModifyStyle(NULL, LVS_REPORT,0);
That's your problem. You need to turn off all the view styles (icon, large icon, list, report) as well as turning on the report style. (Also, NULL is not a window style.) Change it to:
ModifyStyle ( LVS_TYPEMASK, LVS_REPORT, 0 );
--Mike--
"Everyone has figured out what 'service pack' really means, so they had to go and change the language. Perhaps this is what Bill was talking about in the 'security is top priority' letter."
-- Daniel Ferguson, 1/31/2002
My really out-of-date homepage
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
the item text is invisible but this insertion is good, why?
I don't see the text!!!
|
|
|
|
|
PostQuitMessage() and PostMessage(WM_QUIT,...) do not seem to work in WinCE PocketPC. I have an MFC WinCE app that uses CreateProcess() and WaintSingleObject() to create another MFC process. When the created process exits, I need to capture its exit code. I use GetExitCodeProcess() to do that. GetExitCodeProcess() always provides an exit status of 0. If the created process is just a simple Win32 WCE app, the exit code is correct.
Any hints ? Is there something I'm missing?
Thanks for any responses.
|
|
|
|
|
GetExitCodeProcess() always provides an exit status of 0. If the created process is just a simple Win32 WCE app, the exit code is correct.
So, what's your complaint? I don't get what's your problem here.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I'm having the exact same problem....try as I might, I cannot get my CE application to provide a non-zero exit code. Did you find the solution for this problem?
Paul
|
|
|
|
|
No I did not. Instead, I have the application what was spawned create a file if it successfully terminates. Then I check for the existance (or absence) of this file to determine the program's status.
|
|
|
|
|
I was afraid of that. I was considering the same approach, but wanted to avoid it. I hate having files sitting around on a computer.
|
|
|
|
|
Hi
I am looking for help in writing a parsing / data mine function to extract information from a message received from a windows socket. An example of the message is
SLF {name cakjl} {Location 123, 123, 321} Rotation {0, 0, 0}
Where I want to extract the three number in the Location part of the message and place them in a
struct { int x, int y, int, z} etc...
I am converting the buffer to a large string and matching the letters SLF, but am wondering how to extract the numbers?? I also need to do this for other types of messages and am trying to come up with a generic way of extracting the information and formatting it so I can use it.
Any help would be greatly appreciated
Thanks
Martin
|
|
|
|
|
A fairly general approach is using regular expressions for doing the parsing. If you're into hardcore C++, check John Maddock's Boost Regex++ library.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I've created an icon using Microangelo 5.5 and I've inserted it into my application as the main icon. It also has an image for the standard, no alpha channel 32 x 32 icon, but the problem is that even on xp it shows this standard icon instead of the xp one. How do I get the xp icon to show up on xp?
Cheers,
swinefeaster
Check out Aephid Photokeeper, the powerful digital
photo album solution at www.aephid.com.
|
|
|
|
|
Main has caused an error in Main.exe
Main will now close.
if you continue to experience problems,
try restarting your computer.
my program works fine, but it runs once throw the error above?
|
|
|
|
|
In debug or release mode ? You're saying it does this the second time you run it ? Try running it in debug mode, and hit the debug button in the dialog to see where it crashes.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
I am doing a project on TAPI 3.0, as u know its Com based,,i ve just entered the project and facing some crutial problems while initializing TAPI.. I tried to get CLSId from "clsidfromProgiD",, with parameter1"TAPI3Lib.TAPI".. but it dosent give me any ID! When i checked this is VB,,, here it showss TAPI3Lib as a namespace and there it works properly,, but in VC it created poblems,, can u people tel me,, is there any way to find out the namespaceof TAPI3.dll,, cazi am failed here!!!
i need this for initializing TAPI object!
Actually... there is no such help for TAPI3.0 with VC++ on intenet.. so can u ps help me,,!
and if u ve worked in TAPI 3.0(VC++),, do tell me!
Email me at : af_raja@hotmail.com
A F Raja
AF Raja
|
|
|
|
|
MSDN section TAPI Quick Start provides you with several C++ code snippets and recommendations to get you started with TAPI.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
just wanted to say a big THANK YOU to all those that helped with my first.cpp
I really appreciate your help.
special thank to jon Sagara, Christian, kilowatt, Tim, Joaquin, jon hulatt,
lucy.
forgive me if I forgot anyone.
and sorry for posting the long long code again.
|
|
|
|
|
Hi all,
I have a trouble problem in Closing a modal window !!!
I load a modal window from here:
BOOL CMainDlg::OnInitialDialog()
{
.
.
.
CModalDlg wnd_m;
if(2 == wnd_m.DoModal()) MessageBox("Window is closed !!!");
.
.
.
}
Source code below is in a modal window:
void CModalDlg::OnOK()
{
.
.
.
if(a == 1) EndDialog(2);
MessageBox("Hi i'm here !!!");
if(a == 2) EndDialog(1);
.
.
.
}
Result is wonderful !!!
First my modal loads and when i hit OK button (a = 2), then window will close(by EndDialog(2)) ...
but the messagebox enables and show me "Hi i'm here !!!", WHY ???
I closed the window so why did the messagebox enable ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
if(a == 1){
EndDialog(2);
return;
}
MessageBox("Hi i'm here !!!");
if(a == 2){
EndDialog(1);
return;
} EndDialog instructs the framework to terminate the dialog after OnOK exits; it is not equivalent to a return sentence.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|