|
Thanks Terry.
I had almost this code except I had a syntax error with a single "=" instead of "==" to test the character.
|
|
|
|
|
Allan D Richards wrote:
I had almost this code except I had a syntax error with a single "=" instead of "==" to test the character.
That is one of the most frustrating of bugs if you don't force yourself to remember that right off the start. It compiles and on many passes it even evaluates to the correct value.
Glano perictu com sahni delorin!
|
|
|
|
|
Dear Wizards:
Are there any Time functions available on this
web page, all written in "C" with some DOC's?.
Thanks(TIA), VBFingers.
|
|
|
|
|
Ahem.
Look at the top of the page. You see our green friend Bob, the Code Project mascot? Below him in the orange bar is the word Search: and to the right is an edit field. Type the word 'time' (quotes not required) and click on the Go button to the right.
Software Zen: delete this;
|
|
|
|
|
|
Was wondering how i would increase an integer in a c++ program for every second that passes by. Is this possible to do without making a connection to the windows systray timer? hopefully this could work in at most a few for loops
|
|
|
|
|
Hi,
Check the Platform SDK documentation, "Timer Functions"
Function Description
KillTimer Destroys the specified timer.
QueryPerformanceCounter Retrieves the current value of the high-resolution performance counter.
QueryPerformanceFrequency Retrieves the frequency of the high-resolution performance counter.
SetTimer Creates a timer with the specified time-out value.
TimerProc An application-defined callback function that processes WM_TIMER messages.
So, create a TimerProc function where you can increase the variable by one, then use the SetTimer function to set the callback every 1000 milliseconds, that's it.
Fabian
|
|
|
|
|
Another solution is a thread that increment the variable very time interval.
Kuphryn
|
|
|
|
|
Hi. Does anybody know how I could monitor CPU usage (in %) in my Win32 application. Kinda like the Windows XP/2000 task manager. I know of performance counters, but I'd like a portable solution (the app must run on Windows 98 too).
And one other thing, how do I check if a given process (by name or ID), is, in fact, a Windows XP/2000 service?
Does it matter? Even if it does matter, does it matter that it matters?
|
|
|
|
|
Hi, I was wondering on how difficult it is to convert a working in-process COM component (a dll) to an out of process COM component (an executable). The reason I am asking this is because I would like to move a dll to 64-bit while having the client in 32-bit. Due to the different architecture, they cannot run in the same process, so the only way to to this that I can think of is to have the server run as an out-of-process component. Any ideas? TIA.
|
|
|
|
|
Are you using ATL?
Kuphryn
|
|
|
|
|
I am actually using MFC, I would like to convert the COM component created in this tutorial:
http://www.codeproject.com/com/COM_from_scratch_1.asp?target=COM%7Cscratch
to an out of process COM component.
Thanks!
|
|
|
|
|
COM will let you run your in-proc server in a surrogate process. Try using dllhost.exe.
To do this, you can change your components settings by going into the OLE/COM Object Viewer. Select All Objects; Find your Component; Select the Implementation Tab and then check the "Use Surrogate Process" check box.
|
|
|
|
|
Thanks, I have looked into it and it makes sense. I have also looked into the 64-bit SDK documentation and found the following:
"...On 64-bit Windows, an out-of-process 32-bit COM server can communicate with a 64-bit client, and an out-of-process 64-bit COM server can communicate with a 32-bit client. Therefore, if you have a 32-bit DLL that is not COM-aware, you can wrap it in an out-of-process COM server and use COM to marshal calls to and from a 64-bit process..."
So if I use a native 64-bit dllhost.exe as a surrogate process for my native 64-bit dll component and call use it from a 32-bit exe, it will be running as an out-of-proc? Thanks for the help.
|
|
|
|
|
Hi,
Please can someone help me. I have designed an App in MFC on Windows 2000. There are a lot of dialogs in this application which are 'skinned' (in the resource editor) by images I have created in photoshop. I am trying to transfer the code to Windows XP and have found that the dialogs I have created have increased in size. This is a problem as all of the controls on the dialog are misplaced compared with the bitmap underneath. Does anyone know why this is?
Any help would be grealy appreciated?
Thanks in Advance ,
Richard
|
|
|
|
|
Is your WinXP system running with large fonts?
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
When you use a skinned window, you should usually turn off themes for your window, so the physical dimensions are the same as previous versions of windows.
SetWindowTheme ( hwndYourWindow, L"", L"" );
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
You cannot truly appreciate Dilbert unless you've read it in the original Klingon.
|
|
|
|
|
I've finally reached my limit on adware and tracking software, to that point that there's so much protection software now running on my development system that it's getting hard to get real work done.
The last straw was SpamNET; a P2P email anti-spam application that seemed to be the best thing since sliced bread, until I realized they're accessing Internet Explorers Cookie and History index files and uploading that data.
I want a utility or good pointer to info that will allow me to restrict access to particular files on a per-process basis (e.g. only allow IEXPLORE.EXE access to ..\Content.IE5\index.dat).
I'm familiar with process wide hooking and filter drivers, but would like this to have minimal impact on the system and don't want to start from scratch unless absolutly necessary. What's the best way?
Thanks In Advance!
nb
|
|
|
|
|
I've used a method that DavidCrow gave me to iterate through all the messages in a user's inbox. That works fine. But the _MailItem object has functions for GetSenderName, which returns the name (John Doe), and also the subject, body and HTMLBody. But I can't get the sender's email address. Any help on how I may be able to do that? Thanks in advance
If it's broken, I probably did it
bdiamond
|
|
|
|
|
Hi
My company is looking for a visual c++ (MFC) programmer to freelance on a few small apps we need writing.
We have written a few simple apps before but just don't have the time anymore so would rather call in an expert.
Serial and IP experience required. Experience with graphics and bitmaps a must.
Located in wimbledon, SW london
Get in contact if you think you may be able to help.
Best regards
Scott
|
|
|
|
|
In the sample code given with crystal report 'Pro Salaries' it gives an error on the line which says :
m_Report = m_Application->NewReport();
the error is mentioned in subject.
Please send an immidiate reply please...
|
|
|
|
|
Hello..
I'm reading a book that describes how I can use build in wizards in Visual Studio 6.0 to add message handlers. It tells me to right click the class, and click add windows message handler.. But i'm using VC7.0.. Where can I find this functionallity? Specifically I want to add an OnCreate handler.
|
|
|
|
|
A message handler is just another function.
In your header file add this declaration:
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
In your implementation file where it says,
BEGIN_MESSAGE_MAP(CYourWindow, CWnd)
this is where you tell it what method is going to handle which message.
Add this ON_WM_CREATE() somewhere in the MESSAGE_MAP.
Then add your function to the implementation file like this:
int CYourWindow::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
}
BTW, I'm assuming MFC is used. Otherwise you'll have this huge switch statement to modify.
"We have done so much in the last 2 years, and it doesn't happen by standing around with your finger in your ear, hoping everyone thinks that that's nice." - Donald Rumsfeld
|
|
|
|
|
Yes, but I was getting tierd of writing code like that and wanted the wizard to do it for me. I just can't seem to find the "Add Message Handler"-wizard in VC 7.0.
|
|
|
|
|
If its in a dialog, you can right click on the control.
"We have done so much in the last 2 years, and it doesn't happen by standing around with your finger in your ear, hoping everyone thinks that that's nice." - Donald Rumsfeld
|
|
|
|