|
how to draw a barchart on rightside of splitterwindow in SDI when a button with certain conditions is clicked on left side ?
|
|
|
|
|
Based on what parameters we can conclude that a process is in hung state.
( 100% CPU Usage?? Or if any thread is continiuosly in wait state for a long time??? or ???? )
Can we conclude the given process is in hung state or not based on any process or thread properties (% CPU usage etc).
How taskmanger is getting state of hung process? (Generally task manager displays "Not responding" if any process
is hang.)
Regards,
Koti
|
|
|
|
|
Check out IsHungAppWindow()
|
|
|
|
|
In addition to IsHungAppWindow() , you can use SendMessageTimeout() if you need this functionality on machines prior to Windows 2000.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Each time i make a global variable i get many errors like redefination.
Where should i declare Globals and how to handle them?
|
|
|
|
|
What i am tring is as follows:
<code>class CLogView;
CLogView* mLogView;</code>
I just want to declare an object of class CLogView which is global.
|
|
|
|
|
declare it like this
class CLogView
{
...
}*m_LogView;
int main(void)
{
...
}
here *m_LogView is a global variable
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
|
|
|
|
|
Hi
Write them down in MainFraim.cpp and refer by using extern.
Sample:
MainFraim.cpp
int hallo;
View.cpp
extern in hallo;
LOL T
|
|
|
|
|
Hi
Same with pointer!!
Have fun...
|
|
|
|
|
class CLogView;
CLogView* mLogView;
i just want to declare an object of CLogView class and its scope should be global.
|
|
|
|
|
the declaration using the class (here, declaring your pointer to CLogView) must appear after the definition of the class, not just the declaration...
class CLogView;
CLogView* mLogView;
ps: avoid global variables !!!
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi again
Last idea i have is to use namespace;
using namespace pViewLog;
??!?
|
|
|
|
|
karmendra_js wrote:
Where should i declare Globals and how to handle them?
I would first reevaluate if you really need a global variable. In all but rare cases, they are not needed.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
To answer your question, the problem you are probably running into is that you are declaring your global variable in an H file. Thus every CPP file that includes that include file gets another copy of the global variable.
Instead of saying "int MyGlobalVariable = 525;" in the H file, say "extern int MyGlobalVariable;" and in ONE CPP file declare the global varible "int MyGlobalVariant = 525;"
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
how to make msflexgrid can editable by user??
|
|
|
|
|
MSFlexGrid, by itself, does not support user editting.
You might want to try this[^] instead.
Software Zen: delete this;
|
|
|
|
|
Hi
I have to update an existing Software to make it mor comfortabel. By now i solved the problem starting the software by double Clicking the registrated filetype.
But how to manage to read and view the File?? All that happens is, that the software starts with the default settings!?!
And how to manage to start the software by dragging the reistrated file over the EXEcutable?? All my tries ends up in Debug errors - Access Violation 0x000005
Thanks
|
|
|
|
|
I have created user message as follows:
define a user message in stdafx.h
#define WM_MYMESSAGE (WM_USER+1)
now in message map on class X add following messagemap
ON_MESSAGE (WM_MYMESSAGE, MyMessageHandler)
MyMessageHandler function is defined in class X.
Now to post message use the following code in the function where you want to.
PostMessage(WM_MYMESSAGE, 0, 0);
Now MyMessageHandler function is executed.
but the problem here is MyMessageHandler function is executed only if message is posted from within the member function.
if i post it form some other class member function nothing happens.
Can anyone tell me How can i post message from outside the class X.
|
|
|
|
|
karmendra_js wrote:
Can anyone tell me How can i post message from outside the class X.
for example you want to post message from classY ,then add the message map
ON_MESSAGE (WM_MYMESSAGE, MyMessageHandler) , in this class also and make the MyMessageHandler a global function
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
|
|
|
|
|
... and don't forget to post the message to the destination queue...
If the instanstance of your class is, let's say, DDD, then you use
DDD.PostMessage()
SkyWalker
|
|
|
|
|
There is also
PostMessage(HWND_BROADCAST,WM_CONNECT_EVENT,0,0);
Which I use to post a message from a thread to the main frame
|
|
|
|
|
Hi all,
Can anybody kindly tell me how to get the system volume values using Mixer Apis.
|
|
|
|
|
DWORD vol;
waveOutGetVolume(0, &vol);
|
|
|
|
|
Hi,
I need to restrict some html files on my machine needs to be restricted before it open. So, I used Hook process and call Createprocess API, my application filter such html files and I put return TRUE. But it shows me error message as
---------------------------
C:\For Test Different Extensions\1.htm
---------------------------
Windows cannot find 'C:\For Test Different Extensions\1.htm'. Make sure you typed the name correctly, and then try again. To search for a file, click the Start button, and then click Search.
---------------------------
OK
---------------------------
If I put return FALSE, it shows me error messages as,
---------------------------
F:\differ ext\1.htm
---------------------------
There is not enough free memory to run this program. Quit one or more programs, and then try again.
---------------------------
OK
---------------------------
Let me know your ideas to quit those error messages.
My code is
DWORD WINAPI myCreateProcessW(
LPCWSTR lpApplicationName,
LPWSTR lpCommandLine,
LPSECURITY_ATTRIBUTES lpProcessAttributes,
LPSECURITY_ATTRIBUTES lpThreadAttributes,
BOOL bInheritHandles,
DWORD dwCreationFlags,
LPVOID lpEnvironment,
LPCWSTR lpCurrentDirectory,
LPSTARTUPINFOW lpStartupInfo,
LPPROCESS_INFORMATION lpProcessInformation
)
{
if (IsValidProcess == FALSE)
{
MessageBox (NULL,"ToughGuard Filter this Process","ToughGuard",MB_OK|MB_ICONINFORMATION|
MB_SETFOREGROUND|MB_TOPMOST);
return 0;
}
CreateProcessW( lpApplicationName, lpCommandLine,
lpProcessAttributes, lpThreadAttributes, bInheritHandles, dwCreationFlags,
lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation);
}
Be simple and Be sample.
|
|
|
|
|
Hi,
I am guessing it is long file names... See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/createprocess.asp
|
|
|
|