|
They are lot of articles in CP. Maybe you can find it there.
http://www.codeproject.com/database/
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
Also look in MSDN, you will find some good examples there too
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
Need Web-based database administrator? You already have it!
|
|
|
|
|
Help me please, how transfering the info between two Property Pages, inserting into the Property Sheet?
Best regards,
Eugene Pustovoyt
Sonork ID 100.10002:Yaumen
|
|
|
|
|
There's no standard way to do that as far as I know, so you can just use your imagination Off the top of my hat, one method is as follows. Derive CMyPropertySheet from CPropertySheet and add member variables to hold the common data. When exiting a property page, store the relevant data into the parent:
BOOL COnePropertyPage::OnKillActive()
{
if(!CPropertyPage::OnKillActive())return FALSE;
static_cast<CMyPropertySheet*>(GetParent())->m_commonData=...;
return TRUE;
} and retrieve in the other property pages at OnSetActive , you get the idea.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
As the variant, it approaches me!
Thank for the help
Best regards,
Eugene Pustovoyt
Sonork ID 100.10002:Yaumen
|
|
|
|
|
Besides the method provided by Joaquín M López Muñoz, I have a way to do it.
Since propertypage is in fact a dialog, when you add them to your propertysheet, you have an object of each page already. say:
CPageD1 m_d1;
CPageD2 m_d2;
CPropertySheet m_sheet;
....
m_sheet.AddPage(&m_d1);
m_sheet.AddPage(&m_d2);
....
m_d1.m_data1 = m_d2.m_data2;
Can't you do this?
|
|
|
|
|
This variant suits at a stage of addition PropertyPage to PropertySheet, and it is necessary for me transfer at work in PropertyPage
Best regards,
Eugene Pustovoyt
Sonork ID 100.10002:Yaumen
|
|
|
|
|
If you have the Academic version of VS.NET... do you know what they mean that I have to activate the licence? ?
Where can I activate it then!?
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
You need to activate it if you want to run it more than 4 times. Once you activate it on a machine, that particular CD is locked to your machine. You cant activate another version from a different machine.
Nish
The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?
|
|
|
|
|
How do I activate it then!?
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
I pressed the activate button - worked for me.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Oh!
hehe... then it's simple! I can't install the program right now because I have WinME
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
Hi,
I'm a student who tries to make a program because he has to. I'm just a beginner and I would like to know how to load a bitmap in a single document window. I've already found out it has to do with CFileDialog, and I get the dialog to open a file. It's just not showing yet. I think it needs some code in OnDraw, I just don't know what. (Afterwards I'd like to resize the bitmap)
Can anyone help me with this? Cos pressing F1 doesn't get a man far, and the examples on these sites are way too complicated for me.
Bruno
|
|
|
|
|
Recommend Chris' article on DIBSectonLite. Look for it in the articles, and run the sample project. All your work is done.
|
|
|
|
|
- Use CFiledialog to get the file name and path.
- Use LoadImage() function to actually load the bitmap from the file into memory.
- Then in your OnDraw() function, you have to create a compatible device context, select your bitmap into it, and blit it onto the screen. see CDC::CreateCompatibleDC(), CDC::SelectObject() and CDC::BitBlt().
---
CPUA 0x5041
Sonork 100.11743 Chicken Little
If a man is standing in the middle of the forest speaking and there is no woman around to hear him...is he still wrong?
|
|
|
|
|
I have an MFC ActiveX project that runs in Internet Explorer. I want this control to have a toolbar that can be dockable in Internet Explorer. How do I do that ?
|
|
|
|
|
How can I maxiumize the child windows of my MDI application and then remove
the _ [] X controls from the title bar of these windows.
(_ [] X) ... You know the things a user clicks on to iconize, restore, or close a "window"
on the child documents in my MDI application?
Thanks
|
|
|
|
|
see SetWindowLong. you can use this to change window styles.
-c
Civilization is the limitless multiplication of unnecessary necessities.
Mark Twain
|
|
|
|
|
thanks for the quick reply!
I am new to Visual C++ and codeproject.
How can I find documentation on "SetWindowLong"?
Thanks!
|
|
|
|
|
Click "search" button or
check here.
Good luck.
"Dirty hands lead to important discovery..." - Thomas Edison
|
|
|
|
|
Hello, Everyone
Currently I am developing an ActiveX Control that is going to be used in MS Word. A userform (the control is added to the userform) will show, and the user can do whatever he/she wants to do. After the userform is closed, this control will be add to the document. Right now I am having some problems with making the ActiveX Control's property persistent.
My ActiveX Control has a Get/Set property called "Property1" (type BSTR), and I have a global variable called "Var1" (type CString). In the "GetProperty1" method, I am using the following code:
return Var1.AllocSysString(); Now I am trying to drawing the Var1 value in the ActiveX Control's ondraw() method using pdc->TextOut(). I have two questions about this:
1> If I declare my global variable "Var1" as a control wide gloable variable (in control class), I couldn't get the value of this variable anymore after I close the userform in MS Word, which has this ActiveX Control on it.
2> If I declare this variable as a part of "Globals" (in control.cpp), I still can get the value of this ActiveX Control even after I close the userform in MS Word. The thing is when I try to add another control on the document, the variable value is still there, it is not reset. It looks like all the controls on the document are sharing the same value, and their properties values are the same.
Can someone help me please? Thanks a lot in advance.
|
|
|
|
|
If you plan to have this property "Var1" persistent to your control, then
declare it (make it member) inside of your object not global.
Why did you decide to create that property as global instead of being a
member variable?
"Dirty hands lead to important discovery..." - Thomas Edison
|
|
|
|
|
If I don't make it global, then in MS Word, after I close the userform, the value of "Var1" will be lost. I cannot draw anything on the Control, which should be added to the document.
|
|
|
|
|
Understand now!
Is this a big problem for you to "save" the property value before you close
the userform and "set it back" when you need to display that form back again?
It looks to me that you want a different property (value) for each control that
you use but you want only one variable to store it. In that case, one of the best
approach is to have that variable as a member of your component (activex or object).
Global variable is not *in my opinion* an elegant option.
Good luck!
"Dirty hands lead to important discovery..." - Thomas Edison
|
|
|
|
|
Acturally this Property1 is like a current time property. When a user click on a macro in MS Word, the program gets the current time and I would like to keep this time value with the current control. Then 5 minutes later, this user click on this macro again, it will add another control on the document, but the time value should be different. When I set the Var1 variable as a member variable, the value cannot keep as long as I close the user form.
Any ideas?
|
|
|
|