|
can you help me in this scenerio . some quick api . I want to connect excel file with by gui .
also that excel file is updating continously from some other application and cell is updation the value with some formulae
Trioum
|
|
|
|
|
|
Here is a semi-related example (the latter part of the article).
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I want to Hide the my command window using createprocess
i m using this like but not able to hide
PROCESS_INFORMATION pInfo;
STARTUPINFOA sInfo;
DWORD exitCode;
sInfo.cb = sizeof(STARTUPINFOA);
sInfo.lpReserved = NULL;
sInfo.lpReserved2 = NULL;
sInfo.cbReserved2 = 0;
sInfo.lpDesktop = NULL;
sInfo.lpTitle = NULL;
sInfo.dwFlags = 0;
sInfo.dwX = 0;
sInfo.dwY = 0;
sInfo.dwFillAttribute = 0;
sInfo.wShowWindow = SW_HIDE;
memset (&sInfo, 0, sizeof(sInfo));
sInfo.cb = sizeof(sInfo);
bool type = CreateProcess(NULL, cmdpath, NULL, NULL, FALSE, 0, NULL, NULL, &sInfo, &pInfo);
|
|
|
|
|
I'm a little rusty, but doesn't that memset completely clear the STARTUPINFOA structure?
|
|
|
|
|
now i remove
//memset (&sInfo, 0, sizeof(sInfo));
// sInfo.cb = sizeof(sInfo);
but it is not also work........
|
|
|
|
|
Why have you commented out the line which holds the size of sInfo?
|
|
|
|
|
Is this your command window or cmd if its cmd you can use of cmd/h.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
It is not cmd window
this is my copymovie.exe which i run through createprocess in my mfc application
|
|
|
|
|
Of course you have a way you can use of FindWindow for get hwnd to your window and then use of ::ShowWindow(hwnd,SW_HIDE);
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
You are shure that the windows isnt opened from the cmdpath?
Greetings from Germany
|
|
|
|
|
Your problem is in the Flags:
sInfo.dwFlags = STARTF_USESHOWWINDOW;
PROCESS_INFORMATION pInfo;
STARTUPINFOA sInfo;
sInfo.cb = sizeof(STARTUPINFOA);
sInfo.lpReserved = NULL;
sInfo.lpReserved2 = NULL;
sInfo.cbReserved2 = 0;
sInfo.lpDesktop = NULL;
sInfo.lpTitle = NULL;
sInfo.dwFlags = STARTF_USESHOWWINDOW;
sInfo.dwX = 0;
sInfo.dwY = 0;
sInfo.dwFillAttribute = 0;
sInfo.wShowWindow = SW_HIDE;
BOOL ret = ::CreateProcess(m_PathToExe, lpExePlusArgs, NULL, NULL, FALSE, 0, NULL, NULL, &sInfo, &pInfo);
if(ret)
{
WaitForSingleObject(pInfo.hProcess, INFINITE);
::CloseHandle(pInfo.hThread);
::CloseHandle(pInfo.hProcess);
}
Read MSDN carefully and with patience.
kostas KEL
|
|
|
|
|
MyApp.exe is working fine in debug mode but it is giving above error when i am trying to run in release mode.
In my application i have 1 button, when clicked(left click) on button, it shows popup menu and when i click on sub popup menu it displays 1 dialog, this dialog has 1 send button when clicked on send button my application sends message to other application and at the same time it will save that sent msg data to .xml file.
Thanks in advance
|
|
|
|
|
|
|
It is a common problem that Release builds are crashing while Debug runs. In Debug build are the buffers bigger, so it doesnt crash if you overwrite some bytes. You only got to find where the too small buffer is...
Greetings from Germany
|
|
|
|
|
Hi,
im using GetPrivateProfileString() to retrieve a value from a key of a particular section in INI file...
I want to know how many keys (along with their keynames) are there in the particular section of an INI file and one by one i need to read the values of those keys....
Please let me know...
|
|
|
|
|
pradeep455 wrote: I want to know how many keys (along with their keynames) are there in the particular section of an INI file and one by one i need to read the values of those keys....
You can use GetPrivateProfileString() for this.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
hi to all,
I want to use a couple of tables with information in MFC (vc6).
could anyone please tell me what is the common way we can handle database with MFC. I am comfortable to use MS access. Can I use it? If so how?
Also please suggest, other then database is there any other efficient way to store the details(may be in a file).
thanks in advance
I am a beginner
|
|
|
|
|
|
thanks for your valuable reply
It works fine.But not able to create an object of CDatabase in a generic class.
Actually I want to access the database reading functions from different dialogs. So I thought of having a class in the application, and I can create the object of that class from any dialog class and use the functions(read_database_data).
But I am not able to create the CDatabase object , since it is a generic class. I know I have to inherit something .
Could you please suggest.
Also please suggest if the idea of creating the global class is alright.(All I needed is to call a function from different dialog classes).
thanks
I am a beginner
|
|
|
|
|
himangshuS wrote: But not able to create an object of CDatabase in a generic class.
This makes no sense. You can do the following from within any class:
CDatabase db1;
CDatabase *db2 = new Database(); himangshuS wrote: Also please suggest if the idea of creating the global class is alright.(All I needed is to call a function from different dialog classes).
I see nothing wrong with that approach.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hello,
I have created ac CView object for a CMDIChildWnd but now I am not able to destroy it.It works fine otherwise . But how to destroy an object of type CView .
I am not useing Doc-View Achitecture and have no idea or little about CRuntime Class.
Prithaa
|
|
|
|
|
Give more details, please, how do you mean "destroy it", how/when you try to do it and what happens?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
thanks for your reply
I got my problem
|
|
|
|