|
you have to call the program which is expected to open the file, and pass it the file as parameter as it wants you to.
lets take an easy example :
your default text editor is UltraEdit (of course, you have a license for it ), but you want to open you text file within Notepad...
just call ShellExecute making it call "notepad.exe textfile.txt"...
however, all program are not always waiting for same parameter, and not even in same orders, so check it out then...
understand ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
You can use the "runas" verb with ShellExecute() .
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Thanks alot David, this was what i was looking for.
Thanks.
|
|
|
|
|
I want to use a button on a
DialogBar created from the
resouce.
How can i enable the button as
it appear's disable on compilation.
How do i get the message from the
dialogbox.
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Could you be more clear
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
|
|
|
|
|
I am thank full to u
but i have found the answer to my query .
I wanted to diaplay a CDialogBar with
a CButton in my MFC applicaton .
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
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
|
|
|
|