|
nice of ur wallpapers.
why don't you attempt for my algorithm in corresponding forum.
|
|
|
|
|
Im sorry but I dont understand what you said?
|
|
|
|
|
i mean
please go to algorithms forum and try to attempt my post.
thanku
|
|
|
|
|
_splitpath[^] in the CRT lib.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
thanks for your reply roger.
i shall definitely look into it if all my other choices disappoint me.
|
|
|
|
|
Try GetCurrentDirectory()
|
|
|
|
|
Try with...
CString m_szNewFileName = "";
char FileName[MAX_PATH];
GetModuleFileName(NULL, FileName, MAX_PATH);
m_szNewFileName = FileName;
m_szNewFileName = m_szNewFileName.Left(m_szNewFileName.ReverseFind('\\'));
m_szNewFileName += "DesiredNewName.ext"
CFile f (m_szNewFileName, CFile::modeCreate | CFile::modeWrite);
it worked good for me.
This would create the new file in the forlder where the App.exe is.
And afterwards you can delete the file with:
if (f.Open (m_szNewFileName, CFile::modeRead))
{ f.Close ();
f.Remove (m_szNewFileName);
}
EDIT: Nice, my post is the newest one, but has the answers of the post just above (older than mine) :P
-- modified at 5:21 Monday 29th October, 2007
-- modified at 5:22 Monday 29th October, 2007
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
thanks for your response.
GetCurrentDirectory() gave me some clue, to achieve my goal.
but it still fetches me the previous selected file's directory.
how ever with GetCurrentDirectory() , in the initdialog, i can find the folder of the application and preserve it and use it though user changes the current folder.
but instead of that, if i get it directly, it would be better.
did you get my point or do i have to explain better?
|
|
|
|
|
Here you go, this should do what you want.
TCHAR szBuffer[_MAX_PATH] = {'\0'};
DWORD dwLen = _MAX_PATH;
GetModuleFileName(GetModuleHandle(NULL), szBuffer, dwLen);
|
|
|
|
|
no boss
i'm still getting the recent selected file's folder by the user.
thanks for your concern.
|
|
|
|
|
is you application is executable or dll!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi!
Where is SPY++ in Visual Studio 2005 ?
cheers..
Imtiaz
|
|
|
|
|
at this path
<window drive>:\Program Files\Microsoft Visual Studio\Common\Tools\
Regards,
Pankaj Sachdeva
There is no future lies in any job but future lies in the person who holds the job
|
|
|
|
|
I've learned some code and idea from others, I can achieve my goal by mapping the message ON_WM_DRAWITEM, and override the method
void CMyListCtrl::DrawItem(somecode) But I have no idea when does my CMyListCtrl trigger the DrawItem? Even I add the code AfxMessageBox(_T("tell me you DrawItem")); in void CMyListCtrl::DrawItem(somecode), it doesn't kick my ass at all. I am so confused.
My ideas got from others,
if( bHighlight )<br />
{<br />
pDC->SetTextColor(::GetSysColor(COLOR_HIGHLIGHTTEXT));<br />
pDC->SetBkColor(::GetSysColor(COLOR_HIGHLIGHT));<br />
<br />
pDC->FillRect(rcHighlight, &CBrush(::GetSysColor(COLOR_HIGHLIGHT)));<br />
}<br />
else<br />
{<br />
CRect rcClient, rcRow = rcItem;<br />
GetClientRect(&rcClient);<br />
rcRow.right = rcClient.right;<br />
<br />
pDC->FillRect(rcRow, &CBrush(nItem%2 ? ::GetSysColor(COLOR_WINDOW) :<br />
RGB(255,255,0)));<br />
}<br />
So I thick I just need some demo code to teach me. Does Anybody kind to make a demo project implementing that: in the list control, in the odd row, fill color 1, but in the even row, fill color2.
pDC->FillRect(rcRow, &CBrush(nItem%2 ? ::GetSysColor(COLOR_WINDOW) :
RGB(255,255,0)));
is what I want actually.
Do I describe my problem clearly?
|
|
|
|
|
See this[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I'm currently using the Beep method to make, well a beep , sound when an action occurs. This works well on my development machine (a laptop) in the fact that it plays the beep through the sound card to my headphones/speakers. However on the machine the program will run on the beep comes out of the system speaker (the one that makes beeps on startup). Does anyone know if there is a similar method that will allow me to always direct the output through the sound card?
I don't want to start playing sound files as all I need is to play a beep at a set frequency for a set period of time, so something very basic
cheers,
|
|
|
|
|
Are you looking for MessageBeep()?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hello everyone,
Are there any tool or other methods which could be used to monitor which class/method exe is accessing a DLL?
Now I met with an issue that when I provide the DLL I developed to a 3rd parth application, it will crash sometimes and I suspect the 3rd party application is invoking some class/method which I do not implement the DLL. I have the full source codes of the DLL, but has no source codes of the exe so I am wondering whether there are some methods to monitor the interactions -- e.g. I can monitor which class/method the exe is invoking and at the same time my DLL has not implemented.
I am using Visual Studio 2005 to develop native (unmanaged) C++ DLL, and I expose the interface of the DLL to exe through COM interface.
thanks in advance,
George
|
|
|
|
|
|
Thanks Jonathan,
I have used the tool before and I think it could only find the static dependencies of an EXE, for example the DLLs which is implicited linked to the EXE. For the DLLs which the EXE uses LoadLibrary to dynamically load at runtime on demand, does this tool provide the function to monitor?
regards,
George
|
|
|
|
|
Hi George,
It does you need to use the profile menu item, you'll then see all dynamically loaded DLL's as your application loads them, either on start up or using LoadLibrary()
regards,
|
|
|
|
|
Thanks Jonathan,
I have tried to enable all the checkbox in Profile menu and it could monitor which module is loaded at runtime, but it could not tell which method is invoking -- does the tool support? Do I need some special settings?
regards,
George
|
|
|
|
|
Hi All,
I m using NetWkstaUserEnum() function for getting active users of system.
1) But when I m using this function on windows XP, it works fine on some XP system & for some XP system it gives one user name twice which I don’t want.
2) In server system like windows 2k3 server, we can add other users as remote desktop users other than actual users of system. Total users of that system will be actual users & remote desktop users. More than one users can login to that system at a time.
Consider user1, user2, user3 are actual users of system & user4, user5, user6 are remote desktop users of windows 2003 server system. User1 is currently login. Remote desktop user user4 is logged in & logged out. Remote desktop users user5 & user6 are also logged in. now when I use function NetWkstaUserEnum() for getting active users, expected result is user1, user5 & user6 but it gives the user1 three times & user4, user5, user6. User4 is logged in & logged out, still it giving that user name. I verify this output with one of the tool available on codeproject, it also giving same output which I getting using that function. I don’t whether I m making mistake or is the problem with system. If I m using other API, let me know the API which will give me exact result.
3) Currently I m extracting past local users means which are not currently login from registry. I want to know the API if available for getting past local users.
Thanks,
Subhash
|
|
|
|
|
Subhash Karemore wrote: I want to know the API if available for getting past local users.
What is "past local users?" Are those accounts that have not been logged into for some period of time?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Ya, past local users means u can say passive users or the users which are available on system but not currently login.
Thanks,
Subhash
|
|
|
|