|
Create a New SDI Application Using the MFC Wizard and select Both Active Document Server and Container (Only Container will do if you just want to host)
Complie and Run the Application as it is
goto Edit and Insert Object and you can insert Doc or XLS file
This is a start then you can go about exploring the Workings
Hope it Helps
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Thanks Montey,
Its really works, now here is another problem realated to the same question,
By default, winword opens files, i want to change the functionality of this process. Can I pass my data(buffer) to Word process so that when word opens the file,It will show my data
Again Thanks in advance,
|
|
|
|
|
While playing around with CSpinButtonCtrl I inadvertantly created a monster. Because I created the controls in the wrong order the spinner was updating the wrong item in the dialog. There is no obvious way to change it, either. While searching for the identifier for the control I somehow managed to open the .rc file that defines the dialog layout for text editing. A couple of clicks and shuffles fixed everything nicely, but I can't figure out any way to open this file for text editing directly. Is there an easy way to do so, just in case I screw up again (as I'm sure I will)?
"Another day done - All targets met; all systems fully operational; all customers satisfied; all staff keen and well motivated; all pigs fed and ready to fly" - Jennie A.
|
|
|
|
|
you want to open the .rc file for text editing?
if so,
1) right click on the RC file in the file view, and select: "open with.."
2) then select the option you wish to open it as.
Note: if you have the .rc file already opened in the resource editor it will ask you to close it.
|
|
|
|
|
That's what I expected, but there is no "Open with..." option in the context menu. I also checked the project settings to look for various things like "set default resource editor" but there are no such options there.
"Another day done - All targets met; all systems fully operational; all customers satisfied; all staff keen and well motivated; all pigs fed and ready to fly" - Jennie A.
|
|
|
|
|
'Open with' exists in vc7 not vc6
The only way I know it works is this:
Menu/Edit/Find in Files
Find What:
I use a dot because it almost always there or
the words like: main, bmp, ico, etc
worse case use a text editor to know what is written in there
Files types: *.rc
Most of the times Visual Studio will tell you that it is Already open with another resource editor. Close it ?
Answer yes ( after saving wanted changes )
Another day lost - No targets met; my system sucks ...
Marcello
|
|
|
|
|
Click File->Open , browse & select the .rc file. In the Open as combo box, select Text . Voilà!
A faster alternative is to use WndTabs[^] and assign a hotkey to their "Open as text" command (I use Ctrl+Alt+Shift+T). Then when you are viewing any resource, use that command and it'll open the .rc file as text.
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | 1ClickPicGrabber New v2.0! | RightClick-Encrypt
You cannot stop me with paramecium alone!
|
|
|
|
|
I have CDialog based program..
The CDialog class has a member object derived from a custom class..
<br />
class CMyDialog: public CDialog<br />
{<br />
...<br />
...<br />
CCustomClass* m_pObject;<br />
}<br />
but in the CCustomClass code i also have a member of type CMyDialog...
<br />
class CCustomClass<br />
{<br />
..<br />
....<br />
CMyDialog* m_pDialog;<br />
}<br />
the problem is with this scenario, when i compile the the CDialog derived-class, i get an error saying that it can't recognize the CCustomClass class.. when in fact i have successfuly compiled the CCustomClass and wrote an include directive for the CCustom class (#include <customclass.h>)....
when i remove the member variable m_pDialog in CCustomClass.. the program compiles with no errors... when i put it back again, the error appears again... what seems to be the problem here?
|
|
|
|
|
Try using forward declaration of class CMyDialog in
CCustomClass.h File
something like this
class CMyDialog;
class CCustomClass
{
// your stuff
};
|
|
|
|
|
Hey all.
I'm on the move tonight
One quick question. Currently, the way that I am doing this is definately not the right way of doing things.
I want to create a directory. (I'm using MFC BTW). I'm looking to see if there is a class (or if someone else may have built a class) that can help me do this. _mkdir is not really what I'm looking for because it won't create the folder if the parent does not exist. I'm looking to be able to build all "parent" folders of the dir as well. For instance, I want to say something like "CreateDir("c:\\temp\\1\\2\\3\\4\\5"), and if c:\temp does not exist, it will create it, then create c:\temp\1, c:\temp\2, etc.... I remember in VB M$ had a method that did this (I can't remember the name exactly) but I cannot seem to find it in VC. Any suggestions would be appreciated!
Thanks
Shultas
|
|
|
|
|
|
Exactly what I was looking for.
Thanks Mike
|
|
|
|
|
Hey everyone.
Dangit!
I pressed some wrong button while trying to compile my program in VS .NET 2003. The dang editor added "->" on every line and a lot of "."'s throughout my entire program and I don't know what it is, nor how to get rid of it!!!!!
Any suggestions?
Thanks
|
|
|
|
|
Sounds like you've turned on visible whitespace. the '->' is for tabs, and '.' (in the middle of the line) is for spaces. It won't affect the program - it's just a display. In VC6 (I don't have .NET) the shortcut is Ctrl+Shift+8, but I don't know about VS.NET. Have a look in the help.
Hope this helps,
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
YES!
That helped perfectly!
Gee, what a great feature! Press a button and your program instantly becomes un-readable (at least after you've had a couple of jack and cokes, hehhe)
Thanks for the post, that fixed it!!!
Shultas
|
|
|
|
|
|
Hello all.
I have a button in my program, IDC_PROCESSFILE. I want to change the text of this button on the fly. I have a checkbox, when the user hits a checkbox, I want to tie to the check/uncheck event to change the text on the button. IE. You can click "Process multiple files" checkbox, when you click that checkbox, I want to change the button to say "Process files" instead of "Process file" ... Just wondering if this is possible? I do know how to tie to the check/uncheck event, just do not know how to change the text of a button.
Thanks
Shultas
|
|
|
|
|
One solution is SetWindowText().
Kuphryn
|
|
|
|
|
Exactly what I was looking for. Thank you kuphryn!
|
|
|
|
|
I believe this is what u're looking 4:
CWnd* pWnd = GetDlgItem(IDC_PROCESSFILE);
pWnd->SetWindowText(_T("Process file"));
What would life be without programmers and salesmen?
|
|
|
|
|
i looked thru the codes for the bitmap sections but can't find any tt explains how to convert bitmap to jpeg and back.... need help.. thankz
Flies spread diseases so close ur FLY!!!
|
|
|
|
|
GDI+ will do it for you - read my article on building a simple paint program. Otherwise, it's a pretty complex task.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
hi!
I have complete my app using mscomm32.ocx,then it runs ok on my machine (os:win2k) which installed vc studio 6.0.But it can't run on the other machine (os:win2k) without intalling vc studio 6.0.
especially I register this ocx in the other machine.
why?
thanks!
|
|
|
|
|
Use the dependency viewer that comes with VC on the ocx to find what it requires installed in order to work.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
I think this is just a licensing problem which MSComm32.ocx has. You can transfer the license by making setup file using Install Shiled. Another way is to use CreateFile API command in place of MSComm ActiveX!
Reza
|
|
|
|