|
coda_x wrote:
recset.GetFieldValue("Last Name",sLastname);
Now you simply need to call the SetWindowText(sLastname) method of one of the edit control variables.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
like this:m_str_lastname.SetWindowText(sLastname);?
|
|
|
|
|
Yes, assuming m_str_lastname is a CEdit variable.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
oso when i try to run the program, when i click on my button2, a pop out box read:
Database error: Syntex error (missing operator)in query expression "Address ID"
and erm I din add code in Oninit dialog. Thanx for ur help!
|
|
|
|
|
That's why it is considered a bad idea to embed spaces into field names.
SqlString = "SELECT [Address ID], [Last Name] FROM Categories";
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Is there an easy way to modify the VS_VERSIONINFO resource in a Win32 EXE. We currently open the file, search for the unicode string VS_VERSIONINFO, assume thats the start of the resource in the EXE and overwrite the required fields. This method seems a bit flakey as you need to reserve the correct number of characters for each string (file version, file description etc.) when the resource is defined. Also the structure seems to change according to the length of the strings which I think is due to 32bit boundaries. Can anybody recommend better method?
Systems AXIS Ltd - Software for Business ...
|
|
|
|
|
you can use some resource editor tools for doing this activity.
I would recomment 'ResHack'. Search and download. A very handy tool.
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
No can do. The programs are stamped with the current version number as part of our product generation procedure which involves updating 400+ programs. I was hoping there were API calls available or that someone had written a class to do it. Thanks for trying...
Systems AXIS Ltd - Software for Business ...
|
|
|
|
|
|
Ahh, thats more like it. Thanks for the info.
Systems AXIS Ltd - Software for Business ...
|
|
|
|
|
Forgive if I am failing to understand the situation properly but hacking the win32 executable seems like dangerous way of adjusting the VS_VERSIONINFO. Would it not be better remove all the existing VS_VERSIONINFO resources from your source code, and then have a separate .rc file that only contains your up-to-date VS_VERSIONINFO. Each compoenent can then be compiled with the same instance of the VS_VERSIONINFO resource and the need to hack the executables has gone.
|
|
|
|
|
Is there a way to delete a complete folder (short of finding all files, deleting them individually, then delete the folder)?
I can assume that I have Delete access, and the files are no longer used, and that there are no sub folders.
"Dor säggsische Dialeggt eechnet sich wie keeen onderor für den Ausdrugg zäärdlischor Gefiehle."
sighist | Agile Programming | doxygen
|
|
|
|
|
RemoveDirectory() deletes a folder, but the folder has to be empty. This code should do the trick :
void DeleteFolder(const CString & strFolder)
{
CFileFind finder;
if (finder.FindFile())
{
while (finder.FindNextFile())
{
if (!finder.IsDots())
{
if (finder.IsDirectory())
{
// Folder - recursively delete it
DeleteFolder(finder.GetFilePath());
}
else
{
// File - delete it
DeleteFile(finder.GetFilePath());
}
}
}
}
// And delete the folder
RemoveDirectory(strFolder);
}
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
SHFileOperation() operates recursively.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi,
It's possible to use a WebService as a client from a Visual C++ 6.0 application ? Or I'm force to make the client install the .net framework and make an .net COM Component that will communicate with the old VC++ application ?
Greetings
Braulio
|
|
|
|
|
Hi I have the following situation:
SetWindowLong(hWnd,GWL_WNDPROC,(LONG)MyOwnWndProc);
MyOwnWndProc is a member function of a class I've made. Now I was wondering if it's possible to somehow convert a pointer to the function or something to a LONG. In its current state this won't compile. I've already tried making a class member pointer, and tried to convert that to a LONG, but alas no go.
And no, I don't want to use a non-class function. I really need to know if it's possible with a class function.
Many thanks in advance,
DanglingDude
|
|
|
|
|
Its possible with class member functions.
Try this
LRESULT CALLBACK YourClass::MyOwnWndProc(HWND hWnd, UINT msg,
WPARAM wParam,
LPARAM lParam)
{
}
and then use
SetWindowLong(hWnd,GWL_WNDPROC,(LONG)MyOwnWndProc);
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
This is exactly what I have now.. and doesn't work.
Are you sure this is supposed to work?
|
|
|
|
|
DanglingDude wrote:
And no, I don't want to use a non-class function. I really need to know if it's possible with a class function.
MyOwnWndProc() would need to be a static member in order for this to work.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
i want to control my mouse cursor for open "my computer"
how i do?
somebody help me , i would like to know there.
thank you very much
|
|
|
|
|
Does MFC calls is syncronized by created STA appartement?
CoInitialize(NULL) is called in App:InitInstance.
What if I choose MTA model?
To avoid blocking and reenterance behavior?
I created some threads in MFC app.
I can not create Windowless controls in CDialog than...
Is There any slution?
thanks
|
|
|
|
|
If you choode MTA model, you need to call CoInitializeEx( ).
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
To join the MTA of a process, a given thread must call CoInitializeEx(0, COINIT_MULTITHREADED). Any objects created within this thread must be thread-safe.
I would suggest to use the MTA model. If you implement it properly, then COM will come in and take care of synchronization for us.
After working with "Apartment", "Both", and "Free", I would take MTA anytime over STA model.
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
You incorrectly inderstand my question -
I had read article you cited,
but need to esplain not how to create MTA,
but how to define precisely that MFC based on it -
is made safe.
|
|
|
|
|
MFC is not threadsafe!!!
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|