|
Mr.Prakash wrote:
You need to handle the event in the derived class only and call the baseclass method that you have implemented to do the job that you want to do.
So, what you're saying here is that I should have a base class which implements the different events but NOT the message handlers since each derived class should include those and then call the appropriate base class?
I was hoping it would suffice just to declare the message handlers in the base class and the framework would automatically route events to the base class without any work in the derived classes.
Did I understand you correctly?
|
|
|
|
|
Halloko wrote:
I was hoping it would suffice just to declare the message handlers in the base class and the framework would automatically route events to the base class without any work in the derived classes.
Technically,what you are trying to do, should work. But you might have one problem... Data Access.
Methods in the baseclass cannot access member variable in the derived class,
Plus for the events to work for the controls in both derived property page,they should have same IDC_XXX value.
I'll write a suicide note on a hundred dollar bill - Dire Straits
|
|
|
|
|
Mr.Prakash wrote:
But you might have one problem... Data Access.
Methods in the baseclass cannot access member variable in the derived class,
This shouldn't be a problem since, as I told you earlier, the controls are shared between both property pages and therefore have the same IDC_ etc.
Therefore the member variables for each control etc. will reside in the base class and not be specific to each page (that's the whole idea anyways )
So, you think this should be possible? Well, how about I have a go at it :p
|
|
|
|
|
Halloko wrote:
So, you think this should be possible? Well, how about I have a go at it
sure, I think you should try it out with one control only and understand all the complexity involved with the solution.
I'll write a suicide note on a hundred dollar bill - Dire Straits
|
|
|
|
|
The hWnd of the instance of my OCX Control is always 0x00000000! So I am unable to PostMessage() withing my control.
Nothing works... Even GetActualParent() as posted in the MSDN...
If anyone has encountered anything similar, or have an idea to get around this, please reply back as I'm stuck over this for more than 24 hours now! confused:
Thanks,
Nirav Doshi
|
|
|
|
|
I assume that you call GetsafeHWnd()in OnCreate(LPCREATESTRUCT lpCreateStruct) function or after it is called and not in Constructor as many times I do
|
|
|
|
|
Hi Pradeep,
Pradeep Maskeri wrote:
I assume that you call GetsafeHWnd()in OnCreate(LPCREATESTRUCT lpCreateStruct) function or after it is called and not in Constructor
Thanks for your reply!
My OCX is a wrapper for a hardware device - And doesn't need to create any window. So, I'm not handling WM_CREATE!
Now, if you make a similar OCX using MFC, and put it in a VB Form... Then try to debug the OCX code by making the VBClient.EXE with your OCX embedded in the VB Form, you can see that the OCX control's HWND is ALWAYS 0x00000000!
But if you insert the control in the ActiveX Test Container or another VC++ (MFC) client app, and then you debug your OCX code, you will see the OCX control's HWND has a legitimate value.
This is the problem, I have! (
- Nirav
|
|
|
|
|
Oh! It is windowless.
So this may help http://www.kbalertz.com/Feedback_153582.aspx
I hope sincerely
|
|
|
|
|
hi,
i am trying to retrieve user account information from the registry. Does any one know about any MFC or some other technique to get the users and their respective information like their account details, privilages etc.
thanks
|
|
|
|
|
No idea abt any MFC . but you can use following functions...
GetUserName()
NetUserGetInfo()
It's not a bug, it's an undocumented feature. suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
hi
i am writing a program in VC++ for reading and displaying any size bmp image in a window using gl library....anybody help me out with full code and i appreciate ur help....
thanks..
|
|
|
|
|
Hi,
In my server application in VC++,i create and execute a particular process .
when this process is running,i want to excute another process as background without
interupting the current process.How do acheive this.If to use CreateProcess()
then how to get it.Pls help
If createprocess needs to be in separate thread ,then how to acheive this.
Pls can anyone get me some sample code snippets for this.
Thnks in advance
Ram
|
|
|
|
|
cberam wrote:
If createprocess needs to be in separate thread ,then how to acheive this.
There is no need for any separate thread to use CreateProcess(); It will return immediately after creating the new process.
check following:
A newbie's elementary guide to spawning processes
[^]
It's not a bug, it's an undocumented feature. suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
Hi,
Thanks for the reply.When the "CreateProcess" is invoked,the current process is interrupted for few seconds.which i don't want to happen.That's why i want to start
in a separate thread or as a background process.Pls do help
Thnks in advance
Ram
|
|
|
|
|
Greetings!
What is the maximum limit of the number of items we can insert in combo box. How can i retrieve or increase this limit ?
|
|
|
|
|
Combo boxes use an integer to index the items, so the theoretical limit is 2GB-1. You'll run out of memory before you hit that limit, though. And on 9x, due to 16-bit limitations, the actual limit is 32767.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
"Just because the box has 2 gigabytes of memory doesn't mean you get to use it all!"
-- Rico Mariani, CLR perf guy
|
|
|
|
|
hi, anyone knows how to do a program to calculate loan using MFC when user inputs loan term, interest rate, and downpayment?
Thanks.
felix joe
|
|
|
|
|
having a look at CP articles can help you much than asking suxh questions...
watch this : http://www.codeproject.com/cpp/loan.asp[^]
(i don't know at all what is the loan calculator, so i hope that will help, anyway, there was many articles when i searched for it, so i think if this doesn't satisfy you, you could search by yourself).
TOXCCT >>> GEII power
|
|
|
|
|
hi !
Does anybody know how to stop a process without killing it ?
What i needed was that my program hooked windows and get notification when explorer or any other windows component calls FindFirstFile(...)
my application gets a notification message.Now based on certain settings my program must allow FindFirstFile(...) to execute ,or prevent it from execution.I have proceeded till the notification part.Currently the app is notified when FindFirstFile(...) is called.But how do i stop it?
Also the app must be cross platform friendly ...and i don't have DDK so the solution can't be driver based...
Kane
Some guys hack just to get themselves a girlfriend.What a pathetic reason huh?
|
|
|
|
|
fetch the thread list and suspend all of them.
Don't try it, just do it!
|
|
|
|
|
hi !
Does anybody know how to stop a process without killing it ?
What i needed was that my program hooked windows and get notification when explorer or any other windows component calls FindFirstFile(...)
my application gets a notification message.Now based on certain settings my program must allow FindFirstFile(...) to execute ,or prevent it from execution.I have proceeded till the notification part.Currently the app is notified when FindFirstFile(...) is called.But how do i stop it?
Also the app must be cross platform friendly ...and i don't have DDK so the solution can't be driver based...
Kane
|
|
|
|
|
How can I make a control bar float and dock inside a pane of a CSplitterWnd instead of the CMainFrame???
Doc I have to override CMainFrame DockControlBar() or something?
Thanks
How do I print my voice mail?
|
|
|
|
|
I thought I knew what I was doing, but I can't come up with any way to initialize my static character array. It's defined, in the header file as
static char var[4]; In my source file I have tried every way I know of to give it a value to no avail. Any help is appreciated as I'm sure it can be done, I obviously have no idea how though.
- Aaron
|
|
|
|
|
I am afraid that I would not really understand your idea. But I give you here an example, it may help you.
<br />
class X{<br />
public:<br />
...<br />
private:<br />
....<br />
static char st[4];<br />
....<br />
};<br />
<br />
char X::st[4]="123";<br />
static char ss[4]="abc";<br />
....<br />
|
|
|
|
|
You normally don't put a static global variable in a header file; the purpose of using such a global is to restrict its visibility to one .CPP file.
You can give it an initial value in the .CPP file like so:
static char var[4] = "abc";
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
I even hear the Windows "OMG I booted up fine" sound.
-- Paul Watson diagnosing hardware problems.
|
|
|
|