|
|
Hi I got it.
It 's mstask.lib
Thanks
|
|
|
|
|
I would like to display 2 fields from a database in a tabular form.
I know how to write a query, but I want to know what control I should use to display the data.
Thanks
|
|
|
|
|
|
Hi there,
I want to move a certain hidden/readonly file (namely thumbs.db) from one folder to another in C++. However, this fails, because the "::rename(src, dst)" function does not like hidden/readonly/systems files.
Now, how can I change one file's attributes in Visual C++? In Visual Basic you have the SetAttr() procedure, but I cannot find a similar function in C++?
Regards,
Marco van der Kolk
|
|
|
|
|
In MFC using CFile::SetStatus, in WIN32 API using function SetFileAttributes
Pavel
Sonork 100.15206
|
|
|
|
|
|
Hi Marco,
Take a look here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/setfileattributes.asp
|
|
|
|
|
Trying to use SHFileOperation to copy files to/from FTP server, but without success (for a while). Anybody tryed to do such things? Guess, theoretically is possible...
|
|
|
|
|
This one should be a TAPI FAQ...
I'm using TAPI 2 in an application. I need to be able to tell the modem not to wait for a dial tone before dialing a number. I could find no such option in the TAPI API, but I found a checkbox in the modem control panel. Is there a way to disable "wait for dial tone" using a C++ program, without the user having to go through the control panel to do this?
Thanks!
--Two Magic Lovers
|
|
|
|
|
Did you try with lineSetCallParams function? because
typedef struct linedialparams_tag {
DWORD dwDialPause;
DWORD dwDialSpeed;
DWORD dwDigitDuration;
DWORD dwWaitForDialtone;
} LINEDIALPARAMS, FAR *LPLINEDIALPARAMS;
ÿVOTD: 14 "Make every effort to live in peace with all men and to be holy; without holiness no one will see the Lord.
15 See to it that no one misses the grace of God and that no bitter root grows up to cause trouble and defile many." - Heb 12:14-15
|
|
|
|
|
I need to know how to write a try catch for this. What goes iinto the catch? In the try I will be openeing and reading registry keys. If the keyOpen operations fail I dont want keyClose to be called. Is try-catch the way to organize this, or an if statement?
Thanks,
ns
|
|
|
|
|
If you're using bare Win32 API, then you'll get no exception - you'll have to check return values. If you're using one of class wrappers for registry... it depends on class. Read the class documentation to check how error handling works.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
Exception handling is intended as it's name says for handling of exceptional/error conditions. Don't use it to control a normal flow of your program - it has it's cost. Throw an exception if an error occured, which you don't want or can't handle in place.
Maybe you're using a class to access registry which generates exceptions. Then you need to use try/catch, see the class doc.
If you are using API functions or a class which doesn't use exceptions, the choise is on you.
The exceptions would be appropriate, if more error conditions can occure in your code with the same handling. State of your data (close or not close) is in your hands. Simple example throwing na int for simplicity:
try
{
if(!keyOpen(...)) throw 1;
if(!keyRead(...)) throw 2;
keyClose(...);
if(!keyOpen(...)) throw 1;
if(!keyRead(...)) throw 2;
keyClose(...);
...
}
catch(int i)
{
if(i>1) keyClose(...);
MsgBox("err");
return false;
}
Pavel
Sonork 100.15206
|
|
|
|
|
Thanks very much. It resolved my problem.
|
|
|
|
|
Hi,
You must also take into account that throwing exception will call the destructors of all stack-created objects. That's why there are times when it is more efficient to return an error code rather than throw an exception.
Best regards,
Alexandru Savescu
|
|
|
|
|
I want to monitor my computer's share directory in the LAN, when some files are deleted or renamed or modified by other computer. I can recored it.
but I don't know all this being done by which computer! How can i do it ?
Thanks a lot!
How can I know which remote computer access which file of my computer?
How can I finished it with MFC or VC?
|
|
|
|
|
I want to monitor my computer's share directory in the LAN, when some files are deleted or renamed or modified by other computer. I can recored it.
but I don't know all this being done by which computer! How can i do it ?
Thanks a lot!
How can I know which remote computer access which file of my computer?
How can I finished it with MFC or VC?
|
|
|
|
|
All my buttons are passed through OnCtlColor() but I can't change the text colour or background. I could subclass the control (seen the article in CP) but I am lazy so is there a way to do it in OnCtlColor?? If not, then why doesn't it work when edit boxes, static boxes, etc.. do.
cheers!
Adam.
"I spent a lot of my money on booze, birds and fast cars. The rest I just squandered"
George Best.
|
|
|
|
|
From MSDN docs on WM_CTLCOLORBTN:
Buttons with the BS_PUSHBUTTON, BS_DEFPUSHBUTTON, or BS_PUSHLIKE styles do not use the returned brush. Buttons with these styles are always drawn with the default system colors. Drawing push buttons requires several different brushes-face, highlight and shadow-but the WM_CTLCOLORBTN message allows only one brush to be returned. To provide a custom appearance for push buttons, use an owner-drawn button.
In other words, "this feature is by design"
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
Tomasz,
You are de man. Thanks! How come you know all this stuff? You and Nish seem to be the most prolific contributors.
cheers once again
Adam.
"I spent a lot of my money on booze, birds and fast cars. The rest I just squandered"
George Best.
|
|
|
|
|
How can I know which remote computer access which file of my computer?
The remote computer and the local files are not certain?
How can I know it?
How can I finished it with MFC or VC?
|
|
|
|
|
Hi,
I have written a small utility that generates a small setup program. The setup program uses an icon, bitmap and ini file that is selected by the user in the initial utility (the info about the icon and bitmap it should use are contained in the INI file). Essentially this works as follows:
Utility -> User selects a bitmap, icon and output path
-> Presses "Create"
-> The icon, bitmap and a premade executable are copied to
the output path
-> An ini file is generated with info about the bitmap and icon
Whenever the user opens the generated executable, the EXE looks for the INI file to find out which bitmap and INI file it should display.
So far, so good. However, what I really want to do is, instead of having the icon, bitmap and INI file stored as separate files in the same folder as the EXE, I would like to somehow compile them INTO the generated EXE. ie. So that instead of four files being created (EXE, icon, bitmap, INI), only one executable is created. (Perhaps an INI file isn't even needed if it is done this way?) In other words, I need to compile a new executable dynamically, from my program, based upon a premade EXE (I take it that it needs a premade EXE?).
Does anybody know how to do this? I see a lot of tools that do it, but I can't work out how they work.
Many thanks for any help,
Keith
|
|
|
|
|
code project article.
You may also find source code on the net (look for Matt Pietrek's articles on PE (Portable headers)).
And I swallow a small raisin.
|
|
|
|
|
Hi,
Thanks for your reply. I don't exactly want to create a setup program. What I want to do, I have realised, is append the files in a similar way to the DOS copy instruction. Eg. in DOS:
copy /b launcher.exe + bitmap.bmp + icon.ico + config.ini newfile.exe
I basically need a C++ way of doing this. I then need to make it so that the launcher.exe can read from the config.ini file that has been appended to it and find the bitmap and icon that have also been appended to it etc.
I'd be really grateful for any ideas on how to do this.
Many thanks,
Keith
|
|
|
|