|
It depends what database acces are you using.
CDaoRecordset is dor DAO, CRecordset is for ODBC.
It is recommended to use ADO or ODBC, i'm using this wrapper class for ADO : http://www.codeproject.com/database/caaadoclass1.asp
CADODatabase + CADORecordset
rrrado
|
|
|
|
|
my function for easy copying of recordsets is here :
void CSynchronizeDlg::CopyRecordset(CADORecordset &dst, CADORecordset &src)
{
CString tmp;
for (int i=0; i<src.GetFieldCount(); i++)
{
if (src.IsFieldNull(i))
{
tmp.Empty();
dst.SetFieldValue(i,tmp);
}
else
{
src.GetFieldValue(i,tmp);
dst.SetFieldValue(i,tmp);
}
}
}
rrrado
|
|
|
|
|
hi
file drag and drop from my namespace works, i use CFSTR_FILECONTENTS and IStream for the content. but how to drag whole directories using CFSTR_FILECONTENTS ?
thanks
|
|
|
|
|
Does CWinApp::Run() gets called automaticaly when starting the app, or do you have to do this yourself?
I've deprectated the Run-function, just added a messagebox in there and a call to the parent-Run. But the messagebox never appears, so I guess Run() isn't called automaticaly. (or am I wrong?)
And how do I have to call Run()? Just calling Run(), or is there a Start() function like in java? And from where? From Initinstance()?
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
|
So Run() is called automaticaly.
So, why is my deprecated Run() method not called???
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
What api should i be using to determine how much data was transferred or currently transferring for a network adapter?
|
|
|
|
|
You should check inside the "performance registry" under: HKEY_PERFORMANCE_DATA key.
--
Looking for a new screen-saver?
Try FOYD:
http://digilander.iol.it/FOYD
|
|
|
|
|
Hi
How can you change the default IDOK for the "Enter" button on your keyboard. My problem is that the program exits when i hit "Enter"...I am not looking for a "Accelerator solution" because then you cannot use "Enter" for the buttons in my app if a button is selected.
By the way its for a dialog based app.
Tnx in advance
Frank
|
|
|
|
|
|
Hehe well I dont feel stupid
I worked - tnx Nish!
|
|
|
|
|
Hello All!
I am writing simple mail program and need to get e-mail addresses from adress book. In Win98 - no problem, but in Win2k - has some problems - some adress is returned, some not.
Thank you.
P.S. i use MAPI because i dont know other method
P.P.S. sorry for my poor English.
|
|
|
|
|
Hi all,
I have a qiestion about Norton AntiVirus and SetWindowsHookEx().
In Win98, I installed Norton AntiVirus (ver.2000) and my program using SetWindowsHookEx(WH_GETMESSAGE...) to get the mouse message.
The purpose of my program is to redirect the mouse button's performance.
For example, when I click right button, I don't want system to show a popup menu but I want to simulate 'Enter' key.
It works well in all O.S.. But in Win98 and WinMe, if I installed Norton Antivirus, my program will delay about 1 second.
I write some values in registry and when I click mouse button, it will open and read the registry key value which I wrote.
Is that the main reason to cause the delay ??
But in WinXP and Win2000 don't have this question.
Does anyone can help me to check this issue ?
If you need my source code to check , please let me know, I'll send to you .
Thanks a lot.
|
|
|
|
|
I want to understand that if we give a same ID to a CWnd derive window while creating it, Would it be erronous. If yes then how ?
Also I want to understand let me frame my question with an example
I create a EditBox whose parent is my view class lets say the id of this editbox is 1001.
Now I create a Modeless Dialog which has also got a EditBox with the same ID that is 1001.
So are these two CWnd going to clash in some way or the other ?
Please throw some light on this.
Abhishek Narula
"Learn to appreciate others ... World would appreciate you"
|
|
|
|
|
Abhishek Narula wrote:
I want to understand that if we give a same ID to a CWnd derive window while creating it, Would it be erronous.
Of course.
Abhishek Narula wrote:
If yes then how ?
Those ID's are used to map messages, I believe. Imagine two controls in one dialog both with the same ID. They are used to interact with your code - your variable name is mapped to an ID. Now imagine if two were both the same ID.
They obviously won't clash, or at least they are unlikely to. If two different dialogs have an edit box named IDC_EDIT, they will both have the same ID and not clash.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
Is there a limit to these IDs ? except for the range of UINT, is there any reserver range or something ??
why does Resource.h has got various IDS starting from different values.
what is the significance of these ranges !!
Abhishek Narula
"Learn to appreciate others ... World would appreciate you"
|
|
|
|
|
Abhishek Narula wrote:
what is the significance of these ranges !!
Just to group like things together.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
There are defined limits for the various ID ranges in resource.h. Microsoft describes these ranges in technical note 35.
From TN035:
---------------------------------------------------------------------------------------------------------
_APS_NEXT_RESOURCE_VALUE is the next symbol value that will be used for a dialog resource, menu resource, and so on. The valid range for resource symbol values is 1 to 0x6FFF.
_APS_NEXT_COMMAND_VALUE is the next symbol value that will be used for a command identification. The valid range for command symbol values is 0x8000 to 0xDFFF.
_APS_NEXT_CONTROL_VALUE is the next symbol value that will be used for a dialog control. The valid range for dialog control symbol values is 8 to 0xDFFF.
---------------------------------------------------------------------------------------------------------
It is best to keep your resource #defines within these ranges, as some things may break if you use values outside these ranges.
Certain MFC data types are written assuming that the resource id values fit within a 16 bit unsigned int. For instance, the CString object allows a string to be loaded from the resources during its construction by passing its resource id to the constructor, but only works if HIWORD(id) is 0.
In order to load a string this way, you use the following form of the constructor:
CString string( LPCTSTR(RESOURCE_ID) );
This constructor distinguishes between a resource id and a pointer to an existing character buffer by looking at the hiword of the LPCTSTR pointer. If the hiword is 0, a string is loaded from the resources. If the hiword is not 0, a string is copied from an existing buffer.
Best regards,
John
|
|
|
|
|
Linking...
Creating library ReleaseMinSize/Deskband.lib and object ReleaseMinSize/Deskband.exp
LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
ReleaseMinSize/Deskband.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Deskband.dll - 2 error(s), 0 warning(s)
Please Help me. What could I do ?
Thank you for your kindness
|
|
|
|
|
What are you building ? Probably it's an ATL project and you need to remove the #define ATL_MIN_CRT from stdafx.h.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
Hi All,
I'm on Windows 2000 and am trying to get the status of a directory which has the permission to write files turned off.
When you click on the properties of a directory and click on the "security" tab you can set certain permissions of that directory, such as ability to write files turned off.
My question is how can I get these permissions in Visual C++? What API call do I have to do?
Thanks,
Philip
|
|
|
|
|
Use _taccess with mode = 2
|
|
|
|
|
I feel dumb asking this question ... but
what the heck.
You know how sometimes a program writes to the
console stuff like ...
main.cpp line 345 cannot open file blah.dat
... I want to open the file main.cpp and
have to cursor go to line 345.
How do you do that with the VC++ 6 editor?
Thanks
|
|
|
|
|
As i recall, it's either an option under the Edit menu, or Edit->Advanced menu.
--------
Have you hugged your monitor today? --Shog9 --
|
|
|
|
|
Ctrl+G, In the dialog that appears type the line number.
I have never wasted time worrying about such insignificant things. Keep your eye upon the donut and NOT upon the hole. - Bill Sergio about posting in the right forum. The Lounge - June 23, 2002
|
|
|
|