|
If you are using MFC, check out CWinApp::EnableShellOpen() and CWinApp::RegisterShellFileTypes() .
If not, you'll need to add some stuff to the registry manually. A basic .reg file looks like:
REGEDIT
HKEY_CLASSES_ROOT\.dbc = David.Document
HKEY_CLASSES_ROOT\David.Document\shell\open\command = DAVID.EXE %1
HKEY_CLASSES_ROOT\David.Document\shell\open\ddeexec = [open("%1")]
HKEY_CLASSES_ROOT\David.Document\shell\open\ddeexec\application = DAVID
; note: the application is optional
; (it defaults to the app name in "command")
HKEY_CLASSES_ROOT\David.Document = David Document Where David is the name of your application that handles the .dbc extension.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
|
DDE is just one of three ways that the Shell can invoke a verb. The ddeexec subkey is added to the verb's key to specify that a DDE conversation should be initiated.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
I want to do a live update of software, but for some reason,
instead of going to the internet and downloading the file, on some
computers it goes to the temporary internet files folder and
just reloads that file so that it didnt update anything (but
the user thinks it did).
If I manually delete the file from the temporary internet files
folder and click Live Update, then everything works fine. So
my question is: how can I delete a file from the temporary
internet files folder? The file I want to delete, for me,
is:
C:\Documents and Settings\Danielle Brina\Local Settings\
Temporary Internet Files\Multiscreen.txt
But for other people on other computers, instead of my naming
showing up as a subfolder, they are going to have their name.
And I don't know what that is. Is there anyway to know what
this name is or folder is so that I can then go to the
other folders and delete the file?
Please, any response any one can give me will be greatly
appreciated.
Sincerely,
Danielle Brina (an overworked graduate student)
|
|
|
|
|
|
|
DanYELL wrote:
instead of going to the internet and downloading the file, on some
computers it goes to the temporary internet files folder and
just reloads that file
Specifying the INTERNET_FLAG_RELOAD flag will force a download of the requested file from the server instead of trying to load a cached version.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
I use this code:
hr = URLDownloadToFile ( NULL,
sURL, // URL to get
sFile, // file to store data in
0, // reserved
&callback // ptr to IBindStatusCallback
);
Is there anyway to specify that flag, INTERNET_FLAG_RELOAD, with
the function URLDownloadToFile or so I need to use
CInternetSession to download a file with that flag so that it
bypasses the cache?
Please, any response you can give me will be greatly appreciated.
Sincerely,
Danielle Brina (an overworked graduate student)
|
|
|
|
|
Unfortunately, the flag applies to HttpOpenRequest() and InternetOpenUrl() (among others) but not URLDownloadToFile() .
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
I have a MFC App with a Tray Icon. On Right clicking the Tray Icon i get a small 'Exit' menu and then on clicking on that i need to exit the App, but thats not happening, and the second time i click there's an assertion.
On the handler for the Exit button, i call DestroyWindow();
Also i am overloading the WM_WINDOWPOSCHANGED as said in this article.
http://www.codeproject.com/dialog/dlgboxtricks.asp
Any help here?????
Pritam
|
|
|
|
|
Try AfxPostQuitMessage(0) before you call DestroyWindow.
You may even not need to call the latter.
|
|
|
|
|
Try AfxPostQuitMessage(0) before you call DestroyWindow.
You may even not need to call the latter.
And I recommend you to call CDialog::onClose/OnOK instead of DestroyWindow (if u debug into it, you see the framework does more work just destrywindow). If you use SDI/MDI, try to use the mainframe to intercept the exit message, and after u tidy up things, call the baseclass onclose().
|
|
|
|
|
What is the ID of the Exit menu option? Do you have a handler in place for that ID? If so, what are you doing in that handler function?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
I tried AfxPostQuitMessage(0) but didn't work.
Basically, i have put a WM_COMMAND handler function where i check if the ID is TRAY_EXIT (thats the id of the Exit Menu option) and try to call AfxPostQuitMessage() there. But nothing happens.
I ran DebugView to capture win32 and ran the app. But DebugView says:
>>routing command id 0x8003 sent to app
>>IGNORING command id 0x8003 sent to Cdialog Dialog
(0x8003 is the TRAY_EXIT number)
Is there a better way to handle creating a menu and providing exit option and then handling it??????
Looks like i am missing something here............
Pritam
|
|
|
|
|
pritamkd wrote:
I tried AfxPostQuitMessage(0) but didn't work.
If you are simply wanting to exit your application, just send it a WM_CLOSE message. If it is a dialog-based application, call EndDialog() .
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hey Folks!, i got the idea!
i didn't have a proper handler in place for the TRAY_EXIT message. My bad!!!
Anyway , thanks a lot for your help!!!!
Pritam
|
|
|
|
|
hi
I am tejaswi . I wanted to read the contents from editboxes of a dialog window. am able to do so except for one edit box. That is apperaring on the screen as if it is read only. but not even able to copy the contents of that one manually. The caret is not coming there even if i click on the box with mouse. please tell how to read contents of it. any property is to be set or what.
Thank you. Tejaswi
|
|
|
|
|
Did you check the edit box 'read-only' setting?
Did you check the DDX_Control has its entry?
Did you call UpdateData(FALSE) at the wrong time?
|
|
|
|
|
y not u delete the control and place a new one?
V
|
|
|
|
|
What does the code look like that is attempting to read from that edit control? Is this an MFC application?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
yes yes it is an MFC application using the Cwnd Class. first of all , the application that has created that edit control is a different one. not under our control. i am j ust trying to read from the window "Histograms" generated by that application( Vims Configuration Tool). I am trying to do this by using available functinos like FindWindow("Histogram"),GetTopWindow(),GetNextWindow().. like that getting all controls and then using SendMessage(WM_GETTEXT...). and now the problem is for the window that is disabled(seems to be i dont know exatly) but data is visible.
i am not even getting a handle to it .some other windows that are disabled i found using a function sth like CSnd:: isEnabled .but in that list also the one i am talking about is not there.
-- modified at 3:27 Friday 23rd September, 2005
|
|
|
|
|
tejaswi_teja wrote:
...now the problem is for the window that is disabled(seems to be i dont know exatly) but data is visible.
Whether a window is disabled or not, you can still read text from it. If you really need to know its enabled state, use IsWindowEnabled() .
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hello best programmers,
I coded an application wich can display imagestream from a simple webcam. I found a good class (I guess) for capturing AVI from webcam to perform several functions etc... I found it here in Codeproject, some Russian dude encapsulated the functions of VFW class.
Anyway, I tried to find a lot of useful information how to capture from webcam, but unfortunatly I found only descriptions of wich functions it has.
And believe me there is a lot of functions, and a lot os useless functions for me.
What I tried to do is making a simple dialogbox with a startbutton, when you click on start, the webcam is turned on and you'll see yourself on the dialogbox.
I coded it as follows:
void CCamSampDlg::OnStart()
{
CRect rect; // Here I try to display the imagestream
WebCam.Create(WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS,rect,this,TRUE);
WebCam.ConnectWithDriver(-1);
WebCam.SetPreviewRate(100);
WebCam.StartPreview(TRUE);
}
It's actually very easy, but the PROBLEM is, when you click on start, the camera turns on (cause I see the activation LED blinking), but it shows nothing on the dialogbox. So I think there something missing in the part of Create-function.
Can somebody please help me??
Thank you very very much!!!
If my application works, I forget all my problems.
|
|
|
|
|
Hello boyz,
I see nobody replied on my question , can somebody please help me??
If my application works, I forget all my problems.
|
|
|
|
|
I wish to remove Host Protected Area (HPA) on ATA Hard Disk in Windows...I don't want to write driver i.e, it should be done through API call...Please send me the solution asap.....
Best Regards,
mohan
|
|
|
|