|
The list control can neither read from or write to your database. But in the same way that you've looked up data and displayed it, so long as you're retrieving the primary key for records in the database, there's no reason you can't write back changes.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I retrieve the record in the database with a CDaoRecordSet object.
of course I write back data with this CDaoRecordSet , too, but it seems that the data in the List Control can not be changed by the user, this is the problem .
besides,is CDaoRecordView an alternative?
-------------------
I am learning C++ and English
|
|
|
|
|
Oh, I see. You need the MSFlexGrid, or Chris Maunders grid control ( on this site ). They give you a more flexible control than the listControl.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
I don't have permission to access that image.
I believe that either a list control or a list view allows editing, but you need to write a bit of code to make it work. You should check out the C++ controls section of the site.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I see ,thank you so much all your help
-------------------
I am learning C++ and English
|
|
|
|
|
Hello,
in good old Atari-days I used to love my ramdisk. On PC this doesn't seem to be a serious topic (I wonder why).
Compilation-time is the dominant bottleneck for most C++-programmers. So, in times of GB-Ram: why not use a ramdisk to reduce the heavy amount of harddisk-access?
Has anyone experience in setting up such an environment?
(which ramdisk? how large? what moved to the ramdisk: the temp-dir? the PCH? the whole project-files? how to setup this in VC++ ?
expected speed-gain?)
Thanks
Christof
|
|
|
|
|
Christof Schardt wrote: On PC this doesn't seem to be a serious topic
The current generation of PC's and Windows has overall better performance when any 'extra' available RAM is left to the operating system. Windows uses a portion of free RAM as a disk cache (there's the RAM disk you wondered about). The advantage today is that the O/S manages it for you, and you don't have to worry about copying files back and forth.
There are a number of things you can do to improve build performance. Make sure that any header files that don't change a lot are included in your precompiled headers. Break your projects into smaller pieces that are linked into the final application as object libraries (.LIB's), or even at runtime as DLL's. Your objective here is to reduce the amount of code that gets recompiled when you make changes, rather than to decrease the overall compile time itself. Most of the time, you are working on a small portion of the code, and don't need to recompile the whole thing.
Software Zen: delete this;
|
|
|
|
|
You can also try to use the
#pragma once
in your header fils so they are not parsed multiple times, even if included multiple times.
I also find that keeping my HD defragmented helps a lot too.
If you run a virus scanner with 'on access' scanning, disable the folders containing your source files.
Disable some output options you might not use, such as class browser (I don't use it, speeds up build times since not making the BSC file for each project).
|
|
|
|
|
Of course I have an include-guard in all my headers.
BTW:
Is there a difference between
<br />
#pragma once<br />
...
and
<br />
#ifnded XY_INCLUDED<br />
#define XY_INCLUDED<br />
...
#endif<br />
or is it just a MS-shorthand for this?
Thanks anyway for your additional hints.
Christof
|
|
|
|
|
I do not know for certain.
It is my suspicion that the #pragma once will cause the file to be added to a table that it has already been processed, whereas the #ifndef does not necessarily preclude reparsing of the entire header, as one does not necessarily include or preclude the entire file within the confines of an #ifndef/#endif set.
The #pragma once , however, seems to imply, "hey, once you read this file for this compilation unit, don't bother reading it again". I favor adding the #pragma once if I now a header would never require reparsing within a single compilation unit. I prefer to create headers that do not depend upon such reparsing activity.
|
|
|
|
|
Christof Schardt wrote: On PC this doesn't seem to be a serious topic (I wonder why).
I used a RAM disk exhaustively back with MS-DOS and Windows 3.x. It was a real time saver for compilations.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
hi all
ive made an activex control (button) but i dont know how to insert it into another application window. but i don know how?
|
|
|
|
|
Can someone give me an advice?
I use mciSendString() (a c++ .dll)
how can came back from fullscreen to windowed mode?
|
|
|
|
|
Hello everybody.I am new in this forum.I would like to know how to connect to an SQL server 2000 database by using C++ using ODBC. I have found a way of connecting to the database by using the AppWizard but i want to know if there is another way also.
The second question i would like to ask is how to connect to an ODBC sql server 2000 database by using the C language and not C++.
I would be grateful to anyone who can help me.
Thank you.
A.K.Silot
|
|
|
|
|
It's very simple just try to find in the books, e.g Kruglinski.
Get the spirit if tomorrow
|
|
|
|
|
First you'll need to create a DSN. Check out Administrative Tools --> Data Sources (ODBC). Then your code can use that DSN to communicate with the database.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
-I have gotten the handle "HWND" of the window then how can i get it name ?
-Are there any way to get all the name of all process are running on te computer?
|
|
|
|
|
You use this:
int nLen = ::GetWindowTextLength(hWnd);
TCHAR *tszWindowName = new TCHAR[nLen + 1];
::GetWindowText(hWnd, tszWindowName, nLen + 1);
Now tszWindowName contains the name of the window. Don't forget to delete []tszWindowName; it when you no longer need it.
For enumerating all process names, have a look at this article:
http://www.codeproject.com/threads/processes.asp[^]
Best regards
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
-- modified at 8:47 Sunday 30th October, 2005
|
|
|
|
|
I am currently working to create the windows calender in visual C++. So is there anyone who can send me either source code or explanation that how could I create it. Will waite, okay bye
Don't have time to create signature
|
|
|
|
|
Hi,
If you are using MFC, why not to use CMonthCalCtrl .
If not, take a look at Manth Calendar control in MSDN;
for example, make a search for MonthCal_SetToday function.
--
======
Arman
|
|
|
|
|
Not a Icon on a pane and a string on another pane.
I mean on the same pane with the icon on the left and the string on the right.
Thank you
|
|
|
|
|
Yes, this is possible.
You need to use the CStatusBarCtrl::SetIcon method which sets the icon for a pane in a status bar.
If you are using the Prof-UIS CExtStatusControlBar class, then you can use the following code:
<code>bool bRet = m_wndStatusBar.AddPane( IDS_PANE_TEXT, 1 );
if( !bRet )
return;
int nIndex = m_wndStatusBar.CommandToIndex( IDS_PANE_TEXT );
m_wndStatusBar.SetPaneWidth( nIndex, 100 );
HICON hPaneIcon = NULL;
HINSTANCE hInstResource =
AfxFindResourceHandle(
MAKEINTRESOURCE( IDR_PANE_ICON ),
RT_GROUP_ICON
);
ASSERT( hInstResource != NULL );
if( hInstResource != NULL )
{
hPaneIcon = (HICON)
::LoadImage(
hInstResource,
MAKEINTRESOURCE( IDR_PANE_ICON ),
IMAGE_ICON,
16,
16,
0
);
ASSERT( hPaneIcon != NULL );
}
m_wndStatusBar.GetStatusBarCtrl().SetIcon(
nIndex,
hPaneIcon
);
IDR_PANE_ICON is a resource identifier of the icon.
Best regards,
Dmitriy Yakovlev
|
|
|
|
|
i was not sure whether to post this in this forum or the xml page but i hope someone can help me.
my problem is that when i try to include an xml file to my code i get a syntax error '<' from the line "< ?xml version="1.0" encoding="utf-8" ? >" but that code has to be there just like that doesnt it? i cannot figure out why it is giving me this error.
any help would be greatly appreciated.
Thank You
- Kyle
-- modified at 1:40 Sunday 30th October, 2005
|
|
|
|
|
gr8coaster329 wrote: ?xml version="1.0" encoding="utf-8" ? >
Hi
I think you most change "< ?" to "<?" , you have an space between < and ? , ? and >
<? xml version="1.0" encoding="utf-8" ?>
Iman Ghasrfakhri
-- modified at 1:26 Sunday 30th October, 2005
|
|
|
|