|
|
Was this of no help?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi David,
Thanks for help....but I need more help...I have done what u said to do...next I wanna that when I will click this button,then a cursor should be displayed on the image so that I can write text on the image....this software is already having a SAVE button...so after writing when I will click save button,it should save that text....
Can you please give me some idea like how to start with?I would really appreciate that..
Thanks & Regards
|
|
|
|
|
Are you using VC++ with .Net? If so you can use a form designer, it's relatively easy. If you're using ATL or MFC, then things maybe be a little more complicated.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
VCF Blog
|
|
|
|
|
on a static text control how do you display special characters like a '&', i.e. "Time & Date Menu".
cheers,
Andy
|
|
|
|
|
SetWindowText("Time && Date Menu");
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
david, can you remind me why "Time & Date Menu" wouldn't work ?
|
|
|
|
|
Because that would underline the blank space after & as a possible key accelerator:
Time <span style="text-decoration: underline;"> </span>Date Menu
|
|
|
|
|
ohhhh, yeah. i got it. thanks
|
|
|
|
|
Think mnemonics.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: Think mnemonics.
Simple, yet powerful
|
|
|
|
|
You can also use the SS_NOPREFIX style on your static control.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Hi,
If any one has solution plz tell me how can we know that the user has saved the file he has opened. I need to fire some function when user SAVE any previously open file through my Programme.
Plz plz Help Me.
|
|
|
|
|
it's your job to check that.
If you are using a Document/View architecture, you can use CDocument::IsModified and CDocument::SetModifiedFlag to help you do it.
|
|
|
|
|
If it's your programme, then you probably wrote the save routine....
What's so hard about setting a flag to say its been called? Or in the routine, do whatever functionality you need to do. It doesn't matter if its previously saved or not...
Your's puzzled why this is a problem,
Iain.
|
|
|
|
|
Is there a way to test if a dll which needs to be registered (either way) is registered correctly on that particular PC? If I don't know the classes, functions it's supposed to expose? I need a general solution for an automatic update feature.
I'm thinking about something like getting the dll's classID(s) than search for it in the registry? Anybody ever done something like this?
|
|
|
|
|
tuxyboy wrote: Is there a way to test if a dll which needs to be registered (either way) is registered correctly on that particular PC?
One would like to think that the DLL's DllRegisterServer() function would return an error code if that happened.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
The case is as follows.
The dll's are installed and registered during the app's first install or when a new version is available. BUT when it's not I don't want to call registerserver. I don't know how but it happens sometimes that the already installed files (registered dll's) became unregistered somehow and stop working even if the updater app doesn't touch them, cause there is no new version available. The files are there but unregistered. So I want a method that every time the updatecheck runs it tests all the dll's needed to be registered even if it's not an updatable file, just to be on the safe side.
|
|
|
|
|
there is no harm to register a dll multiple times, no reference count is kept, so this would simplify what you're trying to do with your installer.
simply register the dll after it gets installed!
Yours Truly, The One and Only!
|
|
|
|
|
I am using NTGraph3D for obtaining 3Dplots.
I would like to know how to print the 3D-Plots obtained.
Thanks in advance for the reply.
|
|
|
|
|
Hi all,
I wonder if this doable. I have 2 CButton-derived classes (I don't have the source code for any of them): CButton1 and CButton2. Now I want to use CButton1 for XP or later, and use CButton2 for Win2k or older.
Since controls are declared in the .h file, how do we differentiate the OS version (if feasible). I want to achieve the following (pseudo-code):
class CMyDlg : public CDialog
{
...
enum { IDD = IDD_MYDLG };
if(RunningWindowsVersion>=XP)
CButton1 m_btn1;
else
CButton2 m_btn1;
...
...
}
If I can do this, I don't have to compile 2 versions of my program. I would appreciate it if anyone has any pointer on this matter. Thanks.
|
|
|
|
|
not like this... but you can use polymorphism. say, in your header file, you use a CButton*, and in the constructor, you detect the os, and allocate the whether a CButton1* or a CButton2* as you like. the only condition for this to work is that CButton1 and CButton2 classes must inherit from CButton base class
|
|
|
|
|
Does this mean I have create the button dynamically during run time, not thru ClassWizard?
Do you have any sample code or snippet on how exactly to use your approach?
Thanks.
|
|
|
|
|
in the .h :
class CWatever {
CButton* m_button;
public:
CWatever();
~CWatever();
};
in the .cpp :
CWatever::CWatever() {
if (OSType() == "XP") {
m_button = new CButton1();
}
else {
m_button = new CButton2();
}
}
~CWatever::CWatever() {
delete m_button;
m_button = NULL;
}
then you use the m_button as if it was a simple button pointer...
m_button->SetWindowText(_T("Push Me !"));
|
|
|
|