|
1. U can use the api : SetTimer() / KillTimer()
2. U can use the multimedia timer : timeSetEvent() / timeKillEvent()
Chinese coder.
|
|
|
|
|
Castello07 wrote: I thought....create a thread that stay in sleep and after this time sleep send the message...
I Believe that will be right way, as this will not interrupt your main thread when you call sleep function!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi
I want to put the PC into Standby Mode. When I do that the following error:
System Standby failed
The device driver for the "Alcatel Multimedia Keyboard gateway' device is preventing the machine from entering standby. Please close all applications and try again. If the problem persists, you may need to update this driver."
Could you please resolve this issue.
Thanks in advance.
Raja Ratheesh
|
|
|
|
|
rajanponnalagu wrote: The device driver for the "Alcatel Multimedia Keyboard gateway' device is preventing the machine from entering standby.
Some device drivers are designed not supporting S3 State (Standby). When Windows requests all the devices to enter S3 state, these device drivers reject the request and issue some error code.
1) You may check if there any newer driver released by Alcatel for your keyboard gateway.
2) You may write an email to Alcatel customer support to find out if the driver supports Standby.
Maxwell Chen
|
|
|
|
|
I have a simple MFC Appwizard exe application. I specify the "Release" directory for intermediate files and output files. However I specify altogether different directory,say "OutPut", for output .exe file. and I want that only .exe file should be be generated in this directory. However I observe that .exp file and .lib file are also generated at the same location as the .exe file. I could not find any option in project settings for specifying the path for .exp and .lib file.
This problem doesn't arise if its Appwizard dll.
How can one solve this issue.
Thanks!
Suyash
|
|
|
|
|
Here's one way you could do it
Open the project properties and go to Configuration Properties->Linker->General. Then set "Output File" to $(ProjectDir)OutPut/$(ProjectName).exe
|
|
|
|
|
I am doing exactly the same thing as you suggested, however its not working out
|
|
|
|
|
So just to be clear here are the settings I'm using to get this to work
(for the Release configuration)
Configuration Properties->General
Output Directory = Release
Intermediate Directory = Release
Configuration Properties->C/C++
Object File Name = $(IntDir)/
Configuration Properties->Linker->General
Output File = $(ProjectDir)OutPut/$(ProjectName).exe
Is that what you're using?
|
|
|
|
|
in short I want to automatically copy files needed for my application from a central "repository" to the output folder (debug or release )of my application when it is build, and also, if the application is build, and a file is changed in the "repository" copy the modified file to the output folder of the application.
I have a custom build command in my VC6 project that does a xcopy of some files to the output directory of my project.
in VC6 :
command :
copy $(InputPath) $(IntDir)\$(InputName).exe
xcopy /D /e /y C:\folder\*.* ..\..\bin\debug\
output :
$(IntDir)\$(InputName).exe
..\..\bin\debug\
if I try to do the same thing in VS.net 2003, in the I get the following error :
my_project : error PRJ0032 : The 'Outputs' property for the project-level custom build step contained '..\..\bin\debug\' which evaluates out to '..\..\bin\debug\'.
Am I doing the right thing at the right place ?
Thanks.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Do you know what the current directory is when the custom build step is executed? I would guess the current directory when executed in VC6 is different than VC2003.
One thing you could try is hard-code "..\..\bin\debug\" to the full path and see if that works.
|
|
|
|
|
I've got a problem.
I Want that when you press the button (see link plz) open a pdf file with the instructions of use.
http://www.imagecash.net/image.php?file=265709030
I can open file use this code
<br />
ShellExecute(this->m_hWnd,"open",<br />
"C:\\motor.pdf","","",SW_SHOW );
But this program is to use for many people, and the path changes computer to computer.
How can I solve this?
How can I make a setup that includes MFC files with microsoft visual studio 6?
thx
|
|
|
|
|
You can open the file Open dialog
Ask the user to select the file to open
Get the path from that fileopen dialog.
and then use ShellExecute with that path
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Holy cow !! When posting, inform people that your link contains not worksafe contents !
marcogja wrote: But this program is to use for many people, and the path changes computer to computer.
That seems logical no ? It won't start a search on your computer to find the required file. Supply the file with the program and put it in a specific folder where it can be found, that's the standard solution.
marcogja wrote: How can I make a setup that includes MFC files with microsoft visual studio 6?
Does that have something to do with your previous question ? If yes, I don't understand.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
marcogja wrote: can open file use this codeShellExecute(this->m_hWnd,"open","C:\\motor.pdf","","",SW_SHOW );
either keep that path in any inifile or ask user about file path when ever you Application run!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
J have an application in MFC. There is one dialog window.
I want to hide the icon "close" which is inthe right upper corner of the window. What I have to do in my programm?
Regards
|
|
|
|
|
take the properties of the dialog in resources..
in the style tab uncheck the System menu check box..;)
nave
|
|
|
|
|
Yes, I know, thank you, but I want to know how to do it in the code source.
Regards
|
|
|
|
|
When u want to remove the close menu.
write
ModifyStyle( WS_SYSMENU,0 );
nave
|
|
|
|
|
When you want the Sysmenu to be visible
SetWindowLong(GetSafeHwnd(),GWL_STYLE,WS_SYSMENU | GetWindowLong(GetSafeHwnd(),GWL_STYLE));
RedrawWindow(NULL, NULL,RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN); When you don't want the Sysmenu to be visible
SetWindowLong(GetSafeHwnd(),GWL_STYLE,~WS_SYSMENU & GetWindowLong(GetSafeHwnd(),GWL_STYLE));
RedrawWindow(NULL, NULL,RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN); Hope this helps you
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
|
|
|
|
|
i am trying to read the path of installation of adobe acrobat from the registry( is there any other way), in order to launch it in my program. i have tried RegQueryInfoKey to get the value from
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppPaths\AcroRd32.exe
from the default string in this key. were the path is.
but i am unable to read the value.
please help
|
|
|
|
|
Hi,
In which way do you want to read out any value using RegQueryInfoKey ?
To read value use RegQueryValueEx.
-----------
Mila
|
|
|
|
|
thanks for pointin out... but i have used RegQueryValueEx as well. but i am not sure if i am doin it correctly.
but nothin worked.
|
|
|
|
|
HKEY hKey = NULL;
LONG lRet = NULL;
char szProductType[1024] = { '\0' };
DWORD dwBufLen=1024;
lRet = RegOpenKeyEx( HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\AcroRd32.exe", 0, KEY_QUERY_VALUE, &hKey );
if( lRet != ERROR_SUCCESS ) return FALSE;
lRet = RegQueryValueEx( hKey, "", NULL, NULL, (LPBYTE) szProductType, &dwBufLen);
RegCloseKey( hKey );
It has to work properly - if not check which error codes returns RegOpenKeyEx & then RegQueryValueEx.
-----------
Mila
|
|
|
|
|
i tried that too. the return valur in both the function is 2 and the data in szProductType is 00000s. i am usin RegQueryInfoKey funtion before the code sent by u. is that an error?
|
|
|
|
|
check that registry path looks like:
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\AcroRd32.exe"
and NOT
"SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AcroRd32.exe"
- this is very popular mistake
-----------
Mila
|
|
|
|