|
Just use IE COM (disable flag)
|
|
|
|
|
Fairly worthless suggestion, don't you think?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I want the message that send every time when user do something on dialog such as click on control button, input some character on edit control, select some row on listcontrol etc.
What the message that support this issue?
|
|
|
|
|
Max++ wrote: I want the message that send every time when user do something on dialog such as click on control button, input some character on edit control, select some row on listcontrol etc.
What the message that support this issue?
Sorry?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
When Draw windows framework send me WM_PAINT
When windows create framework send me WM_CREATE
When change windows size framework send me WM_SIZE
what about when "user do something on dialog such as click on control button, input some character on edit control, select some row on listcontrol etc.".
What the name of this windows message?
|
|
|
|
|
There are event handlers for every such control. Have you tried looking into the documentation of such controls? Have you searched for examples? Please do it. You might also buy a good book on MFC.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
I don't want the Control Message but I want the Dialog message instead.
I need the message that send every time when user do something on all control on Dialog.
|
|
|
|
|
Max++ wrote: I need the message that send every time when user do something on all control on Dialog.
You can see them all with Spy++[^] or WinAPI documentation of your choice.
|
|
|
|
|
hello:
I have a problem,I write a IOCP DLL but there is something wrong with the memory, it call me first chance in xxxx... I worden where wrong it is. otherwise there is a problem with the delete it tell i delete a memory i do not have but i have no idear why the memory is changed.
if someone would like to help, i could give him my code. please send your e-mail to 315633820@qq.com.
think you for help.
|
|
|
|
|
As a first step I would run the program under the debugger and try to find out where the error occurs. this should give some idea of the general problem area from where you can narrow it down to the more specific point of failure. Adding some debug trace code might also be useful.
|
|
|
|
|
Hi:
First thank you for your help.I want to give you my code, but i do not find where can add it,could you give me your e-mail address.think you.
|
|
|
|
|
Please see my previous message. You need to try and discover where the program is failing, and then examine the code in that area. Use the DEBUG mode and breakpoint facility to narrow the problem down. It is no good sending the complete code to me as I have no idea what the program is trying to do.
|
|
|
|
|
Hi all!!
I am loading a swf file inside the ActiveX object in my dialog, but some operations inside the swf are lenghy and make my dialog not responsive, is there a way to make the Activex object run in an another thread?
|
|
|
|
|
You could make the lengthy operation run in a separate thread within the activex control.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
(don't know if this should be in the design forum, anyway, I'm coding in C++)
I have a factory that will eventually create many, many different objects.
usually, I have something like (pseudo-c++-ish):
#include "type1Class.h"
#include "type2Class.h"
#include "type3Class.h"
#include "type4Class.h"
static BaseClass* MyClass::Builder(ObjectType type)
{
switch (type)
{
case type1: return new Type1Class;
case type2: return new Type2Class;
case type3: return new Type3Class;
case type4: return new Type4Class;
}
}
Now, for a small number of classes this is manageable; but for a large number of classes it creates a large number
of includes and a huge switch.
Is there another pattern or methodology to clean that potential mess ?
I known I can put all typeXClass.h includes in a separate include file and have that one included; that will reduce the number of lines; any other tips hints ?
Thanks.
--------- edit------
Thanks to Stuart and Cédric; I will have a look at their solution first thing after coffee next monday!
This signature was proudly tested on animals.
|
|
|
|
|
Maximilien wrote: Is there another pattern or methodology to clean that potential mess ?
I dont think so, but depends on your definition of large I guess - in which case you might want to partition your classes by some abstract case and have multiple factories.. you could also consider 'pre-allocating' the objects to trade off against the lookup time (if thats an issue) - we have an implementation in a realtime message-switch that only has 30-40 classes, one for each message, but we pre-allocate them in the factory before we start accepting connections
'g'
|
|
|
|
|
How would I do it...well, I'd make use of a std::map and some Boost magic:
struct BaseClass {};
struct C1 : public BaseClass {};
struct C2 : public BaseClass {};
struct C3 : public BaseClass {};
typedef BaseClass* BaseClassPtr;
BaseClassPtr Make(std::string const& type)
{
using namespace boost::lambda;
typedef boost::function<BaseClassPtr()> Constructor;
static const std::map<std::string, boost::function<BaseClassPtr()> > factoryMap =
boost::assign::map_list_of("C1", Constructor(new_ptr<C1>()))
("C2", Constructor(new_ptr<C2>()))
("C3", Constructor(new_ptr<C3>()));
const std::map<std::string, boost::function<BaseClassPtr()> >::const_iterator constructor = factoryMap.find(type);
return (constructor != factoryMap.end())?constructor->second():0;
}
Create a map that relates your factory key to a suitable object pointer constructor function object - here I've used Boost.Lambda's object construction functions.
When you look up a type key, you either find it (in which case you invoke the constructor) or not (in which case I return a null pointer).
Adding a new type only requires you to add one line to the map initialiser.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
hooooo!!! sexy!
Thanks.
This signature was proudly tested on animals.
|
|
|
|
|
I use an approach similar to the one from Stuart's but by using some little tricks, you can automate the process of registration.
So, the base principle is that the factory is aa wrapper around a map with the class identifier (type) as key and a function to create the object as value. So, this way your factory remains independant of your different objects.
Then, you have a public function on your factory to add a new creation function to the map:
typedef BaseClass* CreateFunc ();
....
void RegisterCreator(ObjectType type, CreateFunc* pFunc);
Now the "smart" trick is to let the classes register themselves through static initialization. At the top of the cpp file of your class, you add code similar to this:
int RegisterType1Class()
{
CObjectFactory::GetInstance().RegisterCreator(Type1, Type1Class::CreateObject);
return 0;
}
static int Temp = RegisterType1Class();
The Type1Class::CreateObjec is a static function of your class which simply creates a new instance of the class.
This mechanism allows you to automatically register objects to your factory through static initialization. Your factory has to be a singleton also.
Using this technique, your factory remains completely independant from all your different specific objects (it only has to know the base class), and you get rid of the big ugly switch.
|
|
|
|
|
I know you already have answers...
But I'd look at this article, as I had a similar problem:
Enumerate your leaf classes[^]
This lets each class (inheriting froma common ancestor) register themselves, so it's all self contained. No adding a class in Pl;ace A, and not adding it to a list in place B.
Used it a few times myself.
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
2 questions of rich edit control:
1. how to get last visible line - ref to function GetFirstVisibleLine(), or count of visible lines.
2. how to get line height of last line?
|
|
|
|
|
1. You could try using CharFromPos[^] specifying the bottom-left corner of the edit and LineFromChar[^] to get the line index of the character it returned, if any. Maybe it would work, maybeit would not...
2. No idea just yet, sorry...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
i need C code of Vernam Cipher Algorithm for my project work.plz help me .
|
|
|
|
|
In your reposts, you're loosing words...
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]
|
|
|
|
|
From what I can understand from a quick google, it looks like it's not a hard(*) thing to do.
-input XOR (randomly generated)mask = result.
-send result to receiver.
-result XOR mask = input.
-trash the mask.
(*) the difficulty would be to generate the random mask since generating truly random values is a very hard process.
What have you done already? did you do your homework and look at what this is ?
Did you try a few things ? do you have any workable code ?
This signature was proudly tested on animals.
|
|
|
|