|
Thanks for the tip.
I'm looking at CCommandLineInfo class right now... Think I'll have this solved in no time.
|
|
|
|
|
I don't know what you're asking for, anyway have a look at Michael Dunn's series on writing shell extensions [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Who the hell is voting us both down.
|
|
|
|
|
Choose an option, my friend:
(1) Somebody pretending we've the CPMRU s fully charged.
(2) A poor troll who doesn't know the power of cross balancing.
(3) Maybe ours were really poor answers.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Introduction to File Associations[^]
AlmodJ wrote: This of course assumes you already associated that file type to your application.
Are you just having trouble getting the path from the command line in your application?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Sounds like you're missing the %1 part of the command.
Here's a pair of .reg files that show two entries from my context menu.
One of them controls the behaviour of right-click, Open (on zip files)
While the other adds a new entry to the context menu for EXE files.
Open zip files with WinRar (works for double click too)
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\WinRAR.ZIP\shell\open\command]
@="\"C:\\Program Files\\WinRAR\\WinRAR.exe\" \"%1\""
Scan exe files with PEiD - adds a new entry to the context menu
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\exefile\shell\Scan with PEiD\command]
@="\"C:\\Program Files\\Universal Extractor\\bin\\peid.exe\" \"%1\""
|
|
|
|
|
Hi,
Does anyone know how to set the text on the Finish button WITHOUT it hiding the 'Back' button?
It is hidden when I call SetFinishText().
TIA
Tony
|
|
|
|
|
Use SetWizardButtons(PSWIZB_BACK | PSWIZB_FINISH);
|
|
|
|
|
Hi,
Thanks for the speedy reply. I already call
SetWizardButtons(PSWIZB_BACK | PSWIZB_FINISH);
in my code but when I add the call to SetFinishText() it still hides the 'Back' button. This is documented in the MSDN implying that its by design but I am not so sure - I mean why would you want to hide the Back button when you change the text on the Finish button?
|
|
|
|
|
softwaremonkey wrote: why would you want to hide the Back button when you change the text on the Finish butt
The implication from the documentation is that you only call SetFinishText when the wizard is "completely" finished, and changing anything is no longer allowed (so the Back button is disabled).
Why do you want to change the text anyway? What's wrong with the default of 'Finish'?
|
|
|
|
|
Hi,
The application is a real-time control system. The last page in my wizard summarises the settings that the operator has entered and then gives them the choice to go back and change them, cancel or to start the process.
The customer wants the button to say 'Start' rather than 'Finish' becuase clicking it will start the process. I guess you can see where he is coming from, it just makes my life harder
I can do it with brute force in my fina property page...
CWnd * pWnd = psheet->GetDlgItem(ID_WIZFINISH);
pWnd->SetWindowText("Finish");
I guess this will have to do for now
modified on Thursday, July 10, 2008 12:00 PM
|
|
|
|
|
How about adding in a 'Summary' page before the finish page? That's the only thing I can think of.
|
|
|
|
|
Or, you *could* use Spy++ to get the ID of the Back button, and send it a WM_ENABLE message...
Bit of a hack, and I have no idea even if the ID is the same each time (I see no reason why it shouldn't be)
|
|
|
|
|
Hi
Yea, I figured that the ID that the wizard returns (ID_WIZFINISH) was the ID of the finish button and it appears to be so. I have added the following code to my summary page which appears to work OK.
CWnd * pWnd = psheet->GetDlgItem(ID_WIZFINISH);
pWnd->SetWindowText("Start");
Thanks
Tony
|
|
|
|
|
I have a dialog that gets some TitleBlock information and I want to use those strings to draw that information in my TitleBlock. The problem is the titleblock is drawn in a sperate class and Im having problems transfering the strings over. The dialogue is called when a menu button is clicked and is in the view class. Any ideas?
|
|
|
|
|
maybe something like someojbject.setTitle( this.titleString)
where someobject is Cozmo23 wrote: a sperate class
and this is Cozmo23 wrote: and is in the view class
led mike
|
|
|
|
|
Not quite sure what you are asking but if you are trying to change the caption of the dialog before you call DoModal() then you should add a CSstring member to your dialog and then in your dialog's OnInitDialog() you should call:
SetWindowText(m_caption);
where m_caption is your CString member.
You should set the text to be displayed before you call DoModal()...
CMyDialog dlg;
dlg.m_caption = "My Dialog Caption";
dlg.DoModal();
Hope this helps - appologies if its not what you were asking.
Tony
|
|
|
|
|
What im trying to do is take data out of the Dialog box and move it to another class. For Example I have a editbox that recieves a string called m_Title. When I click OK i want that string and all of the other strings to be available to another class that directly edits the background of the document.
The program I am editing is very complicated source code my company purchased that is a drawing program similar to Visio, and the TitleBlock I have drawn is in a class that directly edits the background. So I am trying to edit that with a dialog box that is called by a menu in the view class. Sorry if this is confusing im about to give up on it .
|
|
|
|
|
Hmm, there are a few ways of doing this. I think I would create a pointer to your other class as a member of the dialog. You can then freely read and write data from/to your class from the dialog. When you create the dialog you would assign the pointer to the object you want to pass data to, then in your dialog, you could override OnOK to assign the newly entered values using the pointer...
CMyDialog dlg;
dlg.m_ptrToMyOtherClass = &myOtherObject;
dlg.DoModal();
CMyDialog::OnOK()
{
UpdateData(TRUE);
m_ptrToMyOtherClass->m_Title = m_Title;
m_ptrToMyOtherClass->m_classMember = m_dialogClassMember;
CDialog::OnOK();
}
I dont know if this helps.
Tony
|
|
|
|
|
Hi,
In my code i am having some dlls which i downloaded from a site. But while executing the code that dll is calling InvokeHelper method in CWnd class. But in InvokeHelper method i am getting some assertion failed error at file: winocc.cpp and line: 345. I am unable to understand what to do. Please help me.........
|
|
|
|
|
You have to state your problem more, like why you are using that Dll, which method of that Dll you are calling. InvokeHelper is called when there is a COM object which gets or set some properties. In this case may be you are calling some method which expects parameters guided to COM parameter passing.
|
|
|
|
|
hi,
Actually i am tring to connect my system to a handheld device with rs232 port. So, to check the connection between the device and my computer i have to use one control object dll according to OPOS standards. In my control object file i have one method for opening the port. If i call that open method, this method internally calling InvokeHelper method. In the invokeHelper method i am getting assertion failed error. This InvokeHelper method is having one pointer to a class COleControlSite this pointer is showing null. I dont know why it became null, why it is causing the error.
Please help me.............
|
|
|
|
|
So you are using onemethod of that Dll which expect a parameter as COleControlSite. Now this class is related to embedded control, in simple word when you have a container & you want to display a compound object or something like, this class plays an important role. So in your case I suppose this Dll is not the suitable option to open a port. Why do not you use various Open, CreateFile APIs?
|
|
|
|
|
|
depends upon the control you want to implement this to.
For eg:For CEdit you can see EN_SETFOCUS and EN_KILLFOCUS
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|