|
I am working with an MFC application. I want, user should be able to invoke only one process for the application. If it's already running in a system, then user should not be able to invoke another instance of the same exe. How can I achive that?
|
|
|
|
|
|
|
Also several methods you can find here[^]
--
=====
Arman
|
|
|
|
|
Hello all,
I want to execute a jar file from my Visual c++ application and want the result of that execution in my application. Does anyone know how to proceed on this ?
Any help is appriciated.
Nikhs
Nikhil Trivedi
|
|
|
|
|
At last I got it working. Now one new thing is there. Can I call Jar file in such a way that the return value of the function can be available in the Visual C++ application for processing furthur.
Thanks for your prompt reply.
Nikhs
Nikhil Trivedi
|
|
|
|
|
int temp = GetItemCount();
int nRow = CListCtrl::InsertItem(&lvItem);
int temp1 = GetItemCount();
// after this code, temp1 still equal to temp = 0, and nRow is not -1 (failed),
// nRow is 0(index of the item just inserted)
// what would cause this problem?
|
|
|
|
|
Can you post the entire function? This might help ...
|
|
|
|
|
When creating a new class in SDI application the constructor creates as a public, but the view class constructor is protected why?
P.Madhusudhan
ECIL
|
|
|
|
|
This is because usualy in an SDI application the View class constructor is called by the framework and not directly by your code.
If, for any reason you need to call the view constructor directly (not that I can see any) - you can change it to public.
|
|
|
|
|
Hi all,
I'm trying to get the directory structure of a remote computer using FTP.
It works but, if the directory name contains a space, for example: My Directory, it only takes the "My" part.
This is what I have done:
fceGetList(0,FCE_FULL_LIST,(LPSTR)DataBuffer,MAX_BUF);
Lines = fceGetString(0, FCE_GET_LINE_COUNT, (LPSTR)DataBuffer, MAX_BUF);
int i=0;
while (i<Lines)
{
Code = fceExtract((LPSTR)DataBuffer, n, 9, (LPSTR)LineBuf, 100);
Total += Code;
if(Code>0)
{
_splitpath(LineBuf,drive, dir, fname, ext);
if (strcmp(ext, "")==0)
printf("** Directory: %s\n",LineBuf);
i++;
n++;
ZeroMemory(LineBuf, 100);
}
}
Can someone please help me??
Many Thanks.
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
It seems like the problem is not with _splitpath funtions, but with my fceExtract function.
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
|
Hi all.
I have "*.dbf" file and I am trying to read it like "*.txt" file.
If you can help, tell me how can I read "*.dbf" file, or
whot is format "*.dbf" file.
|
|
|
|
|
You can use ADO to read DBF files.
The connection string should be something like this:
"Driver={Microsoft Visual FoxPro Driver}; SourceType=DBF; SourceDB=Path_to_DBF_Folder"
-- modified at 4:28 Thursday 26th April, 2007
|
|
|
|
|
Thanks, but I need to read it like file.
|
|
|
|
|
Hi All,
I need to add column header to my tree ( using CTreeCtrl ).
How can i add it in simple way ? i don't want to define some new class that inheritor from CTreeCtrl class. . .
Thanks for any help.
|
|
|
|
|
A standard tree control doesn't have columns (or column headers) - only list controls.
You might want to try using one of the many CTreeCtrl or CListCtrl derived classes located here in CodeProject that implement this exact stuff ...
-- modified at 4:04 Thursday 26th April, 2007
|
|
|
|
|
Hello together,
#include "stdafx.h"
void letsgo(int *var);
void pair(int *var);
void unpair(int *var);
int _tmain(int argc,_TCHAR *argv[])
{
int var=0;
while(var < 1000)
letsgo(&var);
printf("READY --> %d",var);
return 0;
}
void letsgo(int *var)
{
if((*var % 2) > 0)
unpair(var);
else
pair(var);
}
void pair(int *var)
{
(*var)++;
}
void unpair(int *var)
{
(*var)++;
}
Is it possible to set a breakpoint globaly on the hole "project" that a breakpoint stops if
var is equal 501 ?
But not by setting a breakpoint into function "pair" or "unpair".
It's an example to see how to set a globaly breakpoint.
The real project has a huge number of functions and loops.
There is a problem and a struct-variable gets a specific value, so i need to know
at which time the variable gets the specific value.
Big thanks !
|
|
|
|
|
If you're using VC2005 you can add a condition to a breakpoint. Here's how:
1. Add a breakpoint anywhere you want.
2. Open the "Breakpoints" window from "Debug-->Windows-->Breakpoints".
3. In the "Breakpoints" window, right-click the selected breakpoint and select "Condition...".
4. In the edit box write "var == 501" nad make sure that the "Is true" radio button is selected.
5. Run your app in debug mode.
Hope this helps ...
Guy.
|
|
|
|
|
Ok, but then i know that the variable had changed at this breakpoint.
But not where exactly the variable changed,
in my example i don't know if it's incremented at "pair" or "unpair"
But thanks for your help
|
|
|
|
|
In VS2003 you could set a breakpoint to occur when a variable changed or based on a condition
without breaking at a certain location in the code.
It doesn't look like you can do that in 2005
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Thanks Mark Salsbery
Okay, i use VS2003 (german version, so the titles of the items are propably mis-translated ).
I add a new Breakpoint, choose the tab "variable" then i add the name of the variable.
But i don't know what to add into the context.
Does the variable needs to be global?
Thanks
|
|
|
|
|
Hi,
Sorry it took so long to reply. Did you get it to work yet?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi Mark,
no, i don't get it to work
I don't add a breakpoint into the left margin, but over the menu "Add new breakpoint"
Then i add into the tab "variable" the name of my variable to test.
The condition to i==5001 and the context to {,test.cpp,}
The debugging should stop at one of the (*i)++; exactly where the variable has beeing changed
into 5001
Thanks in advance
|
|
|
|