|
Thanks for the reply,
but I want an approach that works for large icons view.. Any Idea?
Thanks
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
I want to achieve an effect of fading in and out. In other words, I want to make a full black picture gradually disappear and let the original picture reveal. Could anybody help me out of this? Thank you! And I really appreciate that you can email me a sample that contains the source code.
GoGoGo!
|
|
|
|
|
|
I just ran a game I wrote a while back, and the sound is messed up. This is the first time I have used it since I installed Xp Home. DirectX diagnostics told me that Microsoft MIDI Mapper was not running. If I run WinAmp DirectX dig says Microsoft MIDI Mapper is running and my game sounds fine.
Help!!??
|
|
|
|
|
When you run WinAmp then your program is working,right?
|
|
|
|
|
Yes, WinAmp has to playing something. If I pause WinAmp it still works but if I stop WinAmp it quits. I've got MIDIMapper working and it is not the problem.
The only audio function my program uses is PlaySound, and it seeems to be taking a long time to execute. The sounds I use are very short most 0.4 sec some 0.05 sec. If I use the SND_SYNC flag the sounds are fine but my game runs really slow waiting on PlaySound. If I use SND_ASYNC like normal the game gets way ahead of PlaySound.
I've had this game for 2 years and never had any problems with it, friends who have copies of it report no problems. This is the first time I have tried it since I upgraded to XP sp2.
Thanks for any help you can give me.
|
|
|
|
|
I asked this question because I had wrote a program many years ago It opened movie files but I had a problem if I run my program it opened almost more file except dat files but if i run Xing and run my program it could open dat files then I researched and I understood when I open xing it load some drivers and they are on memory and when I close xing it free memory.Now I guess for it maybe when you open WinAmp it load some drivers on memory and your program use from them.
|
|
|
|
|
Hi,
I want to rename a file or a directory so I use MoveFile function, but the problem with this function is that when I place invalid characters in the filename like (/?*<>) and it fails, I use FormatMessage() to get the error message, and the result error message says 'there is not enough disk space to complete the operation' and this seems stupid..
I thought about CFile::Rename, but it cant rename directories-only files.. so are there any options available?? please provide me with all options you know.
Thanks
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
Can't you just write a SmartMoveFile function or something that scans for those characters first? You can get a nice list of invalid characters by putting a ':' in a filename in Explorer.
Or maybe I'm missing something?
Mike
|
|
|
|
|
|
Rename a file or directory.
Renames the file or directory specified by oldname to newname.
If oldname and newname specify different paths the file is moved.
Parameters.
oldname
Path and name of the file to be renamed or moved. This file must exist and we must have write access to it.
newname
New path and name for the file. This filename must not be the same of an existing one.
Return Value.
If the file is succesfully renamed/moved a 0 value is returned.
On error a non-zero value is returned and the errno variable is set to the corresponding error code that can be printed using perror.
Portability.
Defined in ANSI-C.
Some systems do not allow to move directories.
Example.
/* rename example */
#include <stdio.h>
int main ()
{
int result;
char oldname[] ="oldname.txt";
char newname[] ="newname.txt";
result= rename( oldname , newname );
if (result != 0 )
perror( "Error renaming file" );
return 0;
}
If the file oldname.txt existed before the execution and we meet the permission requirements to call this function the file will be renamed to newname.txt, otherwise a message similar to this will be written to stderr:
Error renaming file: Pemission denied
Errors
Rename will fail and neither of the argument files will be affected if: [ENAMETOOLONG] A component of a pathname exceeded {NAME_MAX} characters, or an entire path name exceeded {PATH_MAX} characters.
[ENOENT] A component of the from path does not exist, or a path prefix of to does not exist.
[EACCES] A component of either path prefix denies search permission.
[EACCES] The requested link requires writing in a directory with a mode that denies write permission.
[EPERM] The directory containing from is marked sticky, and neither the containing directory nor from are owned by the effective user ID.
[EPERM] The to file exists, the directory containing to is marked sticky, and neither the containing directory nor to are owned by the effective user ID.
[ELOOP] Too many symbolic links were encountered in translating either pathname.
[ENOTDIR] A component of either path prefix is not a directory.
[ENOTDIR] from is a directory, but to is not a directory.
[EISDIR] to is a directory, but from is not a directory.
[EXDEV] The link named by to and the file named by from are on different logical devices (file systems). Note that this error code will not be returned if the implementation permits cross-device links.
[ENOSPC] The directory in which the entry for the new name is being placed cannot be extended because there is no space left on the file system containing the directory.
[EDQUOT] The directory in which the entry for the new name is being placed cannot be extended because the user's quota of disk blocks on the file system containing the directory has been exhausted.
[EIO] An I/O error occurred while making or updating a directory entry.
[EROFS] The requested link requires writing in a directory on a read-only file system.
[EFAULT] Path points outside the process's allocated address space.
[EINVAL] From is a parent directory of to, or an attempt is made to rename '.' or '..'.
[ENOTEMPTY] To is a directory and is not empty.
|
|
|
|
|
I have always believed that the best way to avoid an error is to try to catch it in the first place. to that end, I would suggest validating the paths passed to the MoveFile(...) before calling it.
The PathGetCharType(...) function is a great place to start when you need to validate the characters in a path.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Hey guys,
Im wondering if anybody could help me with a link or some ideas on how to acknowledge whether the user successfully traces a letter or symbol on the screen using the mouse in OpenGL.
Just to clarify, say my program put a large 'S' on the screen. The program would wait until the mouse first entered the 'S' and then monitor the cursor movements, making sure it went all the way around the letter and had a way of recording how many times it went out of the lines.
I can handle the little extras like counting the mistakes but the general idea of following a letter on the screen confuses me. Thanks for your time!
~Matt
|
|
|
|
|
Hey all-
Just wondering if there is a way to make a CListCtrl *always* show a vertical scrollbar. I've googled and MSDN'd this thing to death. No one has been able to help other than to advise me to change to a ListBox.
Would be nice to disable/enable the horizontal at will, but not as crucial for the aesthetics of this app. I can just alter the col widths as necessary.
Thanks for reading!
-Ryan
|
|
|
|
|
if you want to disable scrollbars did you see EnableScrollBar*
|
|
|
|
|
Yes, I tried it, but it didnt seem to have any effect for the CListCtrl. Does anyone know of a tried and true method for this? MSDN, google, etc, doesnt seem to be a way to force the scrollbar short of filling the list with empty junk. (Not willing to do that.)
Banging my head against the wall and getting nowhere here.
|
|
|
|
|
See here[^] and here[^] maybe its some helpful for you
|
|
|
|
|
I've also tried
my_list.ModifyStyle(0 ,WS_VSCROLL,0)
No luck there either.
|
|
|
|
|
Add LBS_DISABLENOSCROLL to the listbox control style.
If it's in a dialog resource you can set it in the properties window for the control in
visual studio.
Mark
|
|
|
|
|
Hi,
I am a beginner in MFC and i had to do the following task without using dialog:
A spreadsheet with:
- Number of columns and rows can be changed.
- Sell color and text color can be changed.
- Search capability.
- Size of sells can be changed.
Can anybody suggest to me what to use exactly, since i can't find a control or something that make a spreadsheet in a document/view application?
Thanks,
marwa
|
|
|
|
|
How about using Excel automation?
|
|
|
|
|
|
|
Thanks, but:
- what do you mean by Excell automation and how?
- CSpreadSheet creates an excel file, but i want to create a sheet or a table inside the window of my application, so it is not the solution.
|
|
|
|
|
marwa_fci wrote: - what do you mean by Excell automation and how?
- CSpreadSheet creates an excel file, but i want to create a sheet or a table inside the window of my application, so it is not the solution.
Dont worry about that, sounds like you need a grid, see the post from Max http://www.codeproject.com/script/comments/forums.asp?msg=1691852&forumid=1647#xx1691852xx[^] the grid from Chris M has lots of features and will do just what you need.
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|