Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Extra libraries, Code snippets, applications etc. » U++ users applications in progress and useful code snippets, including reference examples! » how to embed a D/COM control in my U++ GUI ?
Re: how to embed a D/COM control in my U++ GUI ? [message #653 is a reply to message #644] Mon, 23 January 2006 22:04 Go to previous messageGo to previous message
ucanca is currently offline  ucanca
Messages: 9
Registered: January 2006
Location: London, UK
Promising Member
Hi - again.
Back from work and I had a look at U++'s internals.

Am I right in saying that to answer my own question above (how to handle Win32 messages), I need to:

1. Derive MyControl from Ctrl

2. Add the following code to MyControl.ccp
LRESULT MyControl::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
HWND hWnd = GetHWND();
switch(message) {
case WM_MessageIWantToHandle:
MyHandler(hWnd);
return 0;
}

return Ctrl::WindowProc(message, wParam, lParam);
}

void MyControl::MyHandler(HWND hWnd) { ... }

Is that all it takes or have I missed some key step?

Thanks!


[Updated on: Mon, 23 January 2006 22:12]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Puzzle example issue
Next Topic: ExpressPane
Goto Forum:
  


Current Time: Sat May 10 02:42:58 CEST 2025

Total time taken to generate the page: 0.02531 seconds