|
Check out the class CSSplitter found here on CodeProject. I use it in an app that has a re-sizeable dialog as the main window. Just search for CSSplitter and it's the only hit you'll get. It works very well.
|
|
|
|
|
Hey. I'm attempting to "lock" a Microsoft Word document using a simple MFC application. I've been searching high and low for flags or functions I could use to effectively "lock" the document. By "lock" I would like to make it so it can never be editted again. I could settle for having it password protection and I could just generate a random password and throw that away. Does anyone have any ideas or clues to help me get started searching? Thanks!
|
|
|
|
|
Hi everybody,
I have a program which runs in tray and it's dialog, let's call it 'main dialog' and i also have a popup dialog which should popup sometimes(for example every 15 minutes),my problem is that when my popup window pops up and receives focus(i.e user simply clicks it) then 'main dialog' shows up and i don't need that .i want to make my popup dialog 'independent' from 'main dialog'.
My problem is also that when both of the 2 dialogs are open i can't set focus to 'main dialog' untils i close the popup dialog.
Can anybody help?
Regards
m0n0
|
|
|
|
|
|
Thanks, but I've done it but it did not help
m0n0
|
|
|
|
|
Look into using a non-modal (or modeless) dialog. that is a dialog that does not "block" its parent. That alone will solve the second problem. You need to both do that and have an alternate parent window (not the Desktop, but NULL ) - doing both should accomplish what you want.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Thanks !
I've done it
m0n0
|
|
|
|
|
in my app, i use CreateProcess() to Redirect pipes of a Child app to my app.
the child app is NOT nine and may be any.
after using the Child, i need to re-redirect (recover) the child's pipes to its original, standard error, output and input - do you know how to do that?
thx
includeh10
|
|
|
|
|
Hello Friends,
I have a doubt. See the following code.
class Example
{
public:
virtual void show()
{
cout<<"Base class Show";
}
virtual void display() = 0;
virtual void disp() = 0;
};
When the object of its derived class object is created. In the V-Table, what will be the order of the virtual function. Whether the normal virtual function will be placed first and then the pure virtual function or else, it depends upon the order used in declaring them in the class.
Thanks in advance.
Neelesh K J Jain.
|
|
|
|
|
why do you need such information ?
isn't a function call based on its name and its atributes instead of its place in the virtual table ??
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
It usually is in the same order as you declare, but it's not required to by the C++ standard. In fact, the standard doesn't talk about object layout at all.
AFAIK, COM relies on the ordering of functions in the vtable, so I guess the VC++ compiler must put them in the same order as you declare.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
tis a crap question but i still would want to clear em.....
say that i have class say:
class xyz
{
int a;
public:
int return_value(void);
};
int xyz::return_value(void)
{
return(a);
}
as the above function is does not manipulate the data of the class,we can declare it also as ......
class xyz
{
int a;
public:
int return_value(void) const;
};
int xyz::return_value(void) const
{
return(a);
}
right?.....what i want to know iz iz there any other advantage of writing a 'const' after function that does not manipulate the data?.....
cheerz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
AFAIK, the 'advantage' of using a constant function is to protect member variable integrity from being modified. Obviously you would not use it everywhere, but for areas of your class that has functions that you know should be read-only, then this sort of safe-guards the class from unscrupulously changing data it shouldn't.
I Dream of Absolute Zero
|
|
|
|
|
It simply indicates to the caller that the method is "read-only" and does not modify the object for which it is called. It can also serve as a reminder to anyone that changes the class.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
DavidCrow wrote:
It simply indicates to the caller that the method is "read-only" and does not modify the object for which it is called. It can also serve as a reminder to anyone that changes the class.
...and prevent any modification on the object from within the function...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Yes, that's what "does not modify the object for which it is called" means.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
It doesn't "prevent" such modifications.
Just makes it more difficult and explicit (like using const_cast).
-----------------------------
Get trial copy of comment generating tool CommentMakerPro, a collection of convenience and productivity tools for Microsoft Visual Studio .NET FeinStuff, and std::string and std::string containers viewer FeinEvaluatorPro at www.FeinSoftware.com
|
|
|
|
|
I would REALLY appreciate if whoever voted my post down (not that I care about the "score") explained their position.
Vlad.
-----------------------------
Get trial copy of comment generating tool CommentMakerPro, a collection of convenience and productivity tools for Microsoft Visual Studio .NET FeinStuff, and std::string and std::string containers viewer FeinEvaluatorPro at www.FeinSoftware.com
|
|
|
|
|
The compiler will complain if you try to modify data from within the function. Also, if you declare your member functions const, that'll enable callers to call them from const functions..
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
S. Senthil Kumar wrote:
Also, if you declare your member functions const, that'll enable callers to call them from const functions.
...to call them from const objects.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
|
Hi,
Could anyone tell me how I could get GMT using COleDateTime? ::GetCurrentTime returns local time, right? But there is no function to get GMT (I can't use CTime, I have to use COleDateTime).
Thanks!
|
|
|
|
|
How about:
SYSTEMTIME st;
GetSystemTime(&st);
COleDateTime utc(st);
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Excellent, thank you very much!
|
|
|
|
|
Hello everyone!
I have a project based on Property Wizard Component which have four propertypages .
Now i am trying to make them displayed as maximum/minimum size when they come out to the user.
At first i tried to use SendMessage(WM_SYSCOMMAND,SC_MAXIMUM,NULL) in the initdialog() of my proppage,but it seems there is no respone to the message .
and i found that it appears no response although i have tick on the maximize/minimize box in the styles of the dialog property.
i don't know what to do now .I wonder if there is anyone can help me
ThanX in advance!!!!!!!!!!!!!
|
|
|
|