|
Hi!
I have projects and DLLs made with Visual C++6 and I try to pass to Visual C++7.
I have a link error when I use a function (contained in a DLL) that uses a CString as parameter.
ERROR LINK 2019 non resolved symbol CStringT ...
Everything was alright with VC++6.
How to solve my link problem?
Will any other problems happen soon during the passing of VC++6 to VC++7???
Thanks.
|
|
|
|
|
Hi all
does ne1 know the easist way of deleting a file
i have a txt file which i need to remove in certain situations
i tried using
remove(str_SettingsPath);
but that doesnt work
any ideas ??
si
|
|
|
|
|
Use unlink() , CFile::Remove() or DeleteFile() . Be sure to specify the file's full pathname.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
si_69 wrote:
i tried using
remove(str_SettingsPath);
but that doesnt work
It should, if used correctly. What value does it return? The file must not have the read-only (and probably the hidden) bit set. You must also have the right privileges.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
silly me, still had the file open while i was trying
to delete it
|
|
|
|
|
I first selected some files from an input directory, and then set the output directory to be some other location. Then I processed my input files and had it do a system() call for "dir/b > list.txt".
Its odd that it created the list.txt in the input files directory . I also checked with getcwd and sure enough it was the input directory. What is the reason for this?
Thanks,
sb
|
|
|
|
|
Working directories are specific to a drive. You're much better off using an API to get the list of files in a dir instead of calling system() .
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Ravi Bhavnani wrote:
...instead of calling system().
Agreed.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
How did you select the output directory? dir /b > list.txt WILL create a list.txt file on the current working directory. I am just curios to know how you set the output directory because there is no such function as setcwd(), unless you used chdir(). But if you did that then dir /b list.txt will work only on the new directory.
On the other hand, "dir /b > C:\...\outputDir\list.txt" will do the trick and probably you knew that already. "dir" command will take as parameters the full path to the input directory and the full path to the output directory.
i.e. dir c:\...\inputDir /b > c:\...\outputDir\list.txt
Some code posted here would help.
But just as the others did, I would recommend API.
// Afterall, I realized that even my comment lines have bugs
If the sun were to blow up, it would take us 7-8 minutes to realize it.
|
|
|
|
|
Hi all,
I want to track the printer messages send by any application.
I want to do this using windows Hook... but I dont know which Hooking message i should use here...
If anybody knows this please help me...
Thanks
|
|
|
|
|
Try the WH_CALLWNDPROC, WH_CALLWNDPROCRET or the WH_GETMESSAGE hook types.
Look for a message id of WM_PRINT.
Bikram Singh
|
|
|
|
|
I already use that, but it is not working....
I get the WM_PRINT message when i just click on the menu... and not when i press print command from menu...
I don’t know how this is happening...
Hear is my code...
LRESULT CALLBACK HookProc(int nCode, WPARAM wParam, LPARAM lParam)
{
// return immediately if system required
if (nCode < 0){
return CallNextHookEx(g_hInitMenuHook, nCode, wParam, lParam);
}
// get window procedure struct
CWPSTRUCT *wps = (CWPSTRUCT*)lParam;
switch(wps->message)
{
case WM_PRINT:
/// code for loging the print command
break;
}
return CallNextHookEx(g_hInitMenuHook, nCode, wParam, lParam);
}
I tried this HookProc for both WH_CALLWNDPROC and WH_GETMESSAGE... but it is not working
Can anybody suggest me any other way to trace the Print Command
Thanks
|
|
|
|
|
Hi,
I am using DC 's ScrollDC to scroll the contents of a custom control.
There are some problems though...
Whenever a window is hovering the control, the DC does not scroll the contents properly. Example:
Custom Control's pos/size: [0,0] - [100, 200]
Now imagine a window hovering at [75, 60] - [outbounds control]
The DC does not scroll from [75,0] - [100,60] !!!
Why?
Note: I am calling ScrollDC without passing (nulling) pRgnUpdate and lpRectUpdate (the last two parameters), as I don't really understand their meaning.
BOOL ScrollDC( int dx, int dy, LPCRECT lpRectScroll, LPCRECT lpRectClip,
CRgn* pRgnUpdate, LPRECT lpRectUpdate );
|
|
|
|
|
hi friends,
i m working on a radar display in vc++.i.e.i want to plot a trajectory using xyz coordinates.i have to display a number that should move with the trajectory.as i know the xyz co ordinates and the no as well, i m able to display it.but the problem is that as the trajectory moves the no should also move with it.so that the no now gets displayed on the new coordinates and the one that was on the last coordinates gets deleted.so that it also seems to be moving witjh the trajectory. i m displaying the no using textout function.if anyone can give some idea on how to delete the no on the previous points so that it gets erased as soon as we get the new coordinates or if there is some other method of displaying the no so that it is visible only on the current point.
waiting for a reply....
Aarti Vimal
Scientist 'B'
Defence research & Development Organisation,
Bangalore,
Karnataka,
India.
|
|
|
|
|
I once did something like this in 2D. I'm not sure if I <i>deleted</i> the textobject, or I drew a rectangle over it. I think it was the second though. Draw a rectangle over your text and draw new text @ new position.
good luck!
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
Keep track of the point's current coordinates. When the point moves, first overwrite the existing text using a pen whose color is that of the background, then write your new text.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
okay...i understood whatever u said but i suppose my problem is somewhat different.i have something drawn in the background of the view.Whenever i draw a rectangle over the text or overwrite it with the pen, the background also gets erased and if the trajectory is circular the previous path also gets erased.So please if there can be some solution specific to my problem..............
Aarti Vimal
Scientist 'B'
Defence research & Development Organisation,
Bangalore,
Karnataka,
India.
|
|
|
|
|
Hi all the guru, I am currently using ODBC to access MS SQL. Can anybody tell me how to get number of columns if given table name? Thanks thanks thanks!!!
vivi
|
|
|
|
|
Try Desc "tablename" query. Get the recordcount from the recordset. The count you get is the column count.
|
|
|
|
|
Vikram,
You need to be careful if you are suggesting to use CRecordset's GetRecordCount() function. According to MSDN, this function only returns the number of seen records in the set. So, right after opening the set, the function will return only 1. You would want to execute another SQL query that counts the records in the resulting set using the COUNT aggregate, or (more inefficiently) loop through the recordset with CRecordset, and then call GetRecordCount().
If your suggestion did not depend upon CRecordset, this, of course, doesn't matter.
Sincerely,
Alexander Wiseman
Est melior esse quam videri
It is better to be than to seem
|
|
|
|
|
I was also told the same thing that you just said, but was told to use MoveLast, then MoveFirst, and the count should be right.
If it's broken, I probably did it
bdiamond
|
|
|
|
|
Hmm, that's interesting. I've never tried that, but MSDN says this:
[MSDN]
Caution The record count is maintained as a "high water mark," the highest-numbered record yet seen as the user moves through the records. The total number of records is only known after the user has moved beyond the last record. For performance reasons, the count is not updated when you call MoveLast. To count the records yourself, call MoveNext repeatedly until IsEOF returns nonzero. Adding a record via CRecordset:AddNew and Update increases the count; deleting a record via CRecordset::Delete decreases the count.
[/MSDN]
It might work, though that paragraph seems to mention it specifically.
Sincerely,
Alexander Wiseman
Est melior esse quam videri
It is better to be than to seem
|
|
|
|
|
I've never seen that before, so thanks!! BTW, when I was told this it was in reference to an ADO recordset object I was using in VB; don't know if that makes any difference.
If it's broken, I probably did it
bdiamond
|
|
|
|
|
If you have MSDN I would also suggest searching for the file "catsets.h". This is a bunch of CRecordset-derived classes that allow you to use a table name to get the names, types, and everything else you want to know about the columns. There's also ones to list all the tables, stored procedures,queries, views, primary keys, foreign keys, etc. Hope this helps!!
If it's broken, I probably did it
bdiamond
|
|
|
|
|
Hi!!! How am I be able to Get all URLs placed in the History Folder?! I have a Code here but it has an Error in its Include (unexpected end of file...)... Im trying to find another way... thanks in advance!!!
|
|
|
|