|
I am trying to create a child window inside a class. I have the hwnd and hinstance to the main window available to the class. The problem that I am having is that the class needs to handle the WNDPROC for the window. I figure that MFC does something like this, but seeing that we cant view the complete MFC source code, I can't see how it is done there. Anyone have any input?
|
|
|
|
|
From Paul Dilascia's Windows ++
//////
// Now "hook" the window's window proc--i.e., subclass it, saving
// the original window procedure.
//
oldProc = (WNDPROC)GetWindowLong(hwnd, GWL_WNDPROC);
SetWindowLong(hwnd, GWL_WNDPROC, (LONG)theApp->getWndProc());
The book is well worth reading if you are attempting to create your own Windows class framework.
The source-code to the book is available at http://www.dilascia.com/wpp.htm
Michael
|
|
|
|
|
I am working on the MAC address of net boards.
Does the first byte always 00 ?
Is there a signification of each byte or pair of bytes ?
elisabeth.sever@europlacer.fr
|
|
|
|
|
i have seen an application which does not offer the handler of OnChar() in the Scrollview, but it's on effect, when you press down a key. why?
thanks
one is the other who absorbs the thoughts of others
|
|
|
|
|
Hi guys,
i am searching indian reliable programmers, who want to work daily for some hours...
Please reply directly to my email account vikasde@rediffmail.com
Thanx in Advance
Best Regards
Sonu
|
|
|
|
|
Hi,
CodeProject has free section for your purpose, then you can post job offers and it´s free ( and detail it more, which skills and that stuff, take a look at:
http://www.codeproject.com/script/jobs/jobs.asp
Good luck
Braulio
Ps.: By the way I work in a consultancy firm, so if you need some programmers ( well they are not indians, but Norweggian and Spanish, not sooo bad ), ...
|
|
|
|
|
I want to send mail in ATL!Where should I begin?
Thanks
|
|
|
|
|
Can't you use normal Winsock calls?
Connect to some smtp server, and send mail using direct smtp chat.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
|
Hi !
I don´t know if that would work, but IIS includes some COM thing called DONTS, and are some COM objects that let you for exmaple send one e-mail using VBScript and ASP, so if it is going to be in the server side maybe you can use that...
HTH
Braulio
|
|
|
|
|
Hello everybody!
How can I change the type of sheets (portrait <-> landscape) runtime printing in the Doc/View Architecture.
For example:
1st sheet as portrait, 2nd sheet as landscape, 3rd - portrait again and etc.
Best regards,
Eugene Pustovoyt
Sonork ID 100.10002:Yaumen
|
|
|
|
|
I think you should check "CPrintDialog"
|
|
|
|
|
In the CPrintDialog , I can select alone type sheet (or portrait or landscape).
And I need change type sheet in the OnPrint() or OnPrepareDC() functions!
How!?
Best regards,
Eugene Pustovoyt
Sonork ID 100.10002:Yaumen
|
|
|
|
|
See example in MSDN topic CWinApp::GetPrinterDeviceDefaults.
|
|
|
|
|
for example:/Play,/Close,etc.;P
justcall
|
|
|
|
|
When building a new component the Wizard offers two choices.
(1) ATL COM AppWizard and (2) MFC ActiveX Control Wizard
Why would you choose one over the other?
My initial thoughts are:
A. Our product depends on MFC so avoiding it in new components will gain me nothing.
B. Choice two seems to have better Wizard support, especially when adding Events.
Can you point me in the direction of what to read so I can compare and contrast these two options?
Do you have a preference?
|
|
|
|
|
If you want a nice thin control use the ATL COM wizard.
If you want a bigger control that also needs the MFC DLLs then use the MFC wizard.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Thin just refers to an objects size?
There is no more overhead communicating with one object than the other, is there? All that invoke helper stuff I mean.
|
|
|
|
|
How do I extract a gob of class information to an array? For example say I have a class:
class Box
{
int Right;
int Left;
int Bottom;
};
Let's say it's 96bytes in Size. There is another function that returns the class but it is now 480bytes in size. From that and doing calculations there is 5 objects of that size that was returned. How do I assign that information into an array? Or, what is the best way to extract each piece of the class?
Thanks
HomeNuke
----
"Nuke'd Your Home, Yet?"
Run your own PostNuke based web server from home
http://www.homenuke.com
|
|
|
|
|
Tip: always name your classes C*
class CBox
{
int Right;
int Left;
int Bottom;
};
int nSize;
CBox *p_BoxArray = (CBox *) SomeFunc(&nSize);
int NumberOfObjectsInArray = nSize / sizeof(CBox);
for (int i=0; i < NumberOfObjectsInArray ; i++)
{
cout << p_BoxArray[i]->Right << "\n";
}
why does this work? well, you can use a pointer as if it were an array (there isn't really any difference between them, in fact.). Logically speaking, incrememnting a pointer does not make it point to that memory address + 1 byte, it makes it point to that memory address + (the size of whatever object it points to).
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Jon,
Thanks for your answer! It is exactly what I needed to point me in the right direction. Well, your answer practically kicked me in the right direction because it was so detailed.
Thanks Again.
Also did some further thought wouldn't this returned memory also be defined as an array of the object? Shouldn't we be able to access the returned information as an array? Or, is an array defined internally as something different or different flags are set in the memory space that an array occupies? Just questions...
HomeNuke
----
"Nuke'd Your Home, Yet?"
Run your own PostNuke based web server from home
http://www.homenuke.com
|
|
|
|
|
Does anyone have an idea of how to hook the keyboard under Windows 98? I have to catch the character, send to ANY application running? Maybe win32 hook is the right solution, but on what application to install it???
"Needless redundancy is the hobgoblin of software engineering." - Peter Darnell
|
|
|
|
|
As far as I know there are two ways to do this:
1) Set a Journal Record Hook (use SetWindowsHookEx with WH_JOURNALRECORD )
2) Use AttachThreadInput directly (will probably lock up your computer sooner or later and create a forehead-shaped bump in your desk)
Anyway, more than keystrokes are recieved from the RIT, and you need to sort them out from other hardware messages.
/moliate
|
|
|
|
|
You can use this:
http://www.codeproject.com/dll/keyboardhook.asp
|
|
|
|
|
Is there anyway Update EXE/Dll Resources on Win9x? The Update Resources API only work on NT. Anyone know if I can do this on Win9x?
Thank you.
Real World Coding:
POP& BuyAPop(Money ADollar){...};
|
|
|
|