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 » U++ Library support » U++ Widgets - General questions or Mixed problems » Having my HWND and eating it, too...
Re: Having my HWND and eating it, too... [message #12102 is a reply to message #12095] Wed, 10 October 2007 23:06 Go to previous messageGo to previous message
tvanriper is currently offline  tvanriper
Messages: 85
Registered: September 2007
Location: Germantown, MD, USA
Member
I understand that... but it was exactly the clue I needed to fix my problem.

It's a little gnarly, but my control now works mostly the way I want it to work (I need to fix a small problem related to positioning, but it's close).

I needed to create a new control derived from Upp::Ctrl. This control has a constructor (for no real reason, I could probably have ommitted this), and an 'Initialize' function that takes an HWND (the 'owner' HWND) and a Rect (the size of the window to create).

Initialize then calls Upp::Ctrl::Create( HWND owner, WS_CHILD | WS_VISIBLE, 0, false, SW_SHOW, true ) to create the HWND.

I then added a member variable of this class in my control.

When I need to initialize the HWND, I call my new class's Initialize() function, which creates the necessary HWND of exactly the type I needed.

I'm able to feed this HWND into the functions I'm using, and it's painting to the area (except for being slightly above it... something I'm trying to fix now).

All-in-all, it works, but not quite as elegantly as I had hoped. It's still sufficiently U++-like (I think) to be acceptable.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon3.gif
Read Message
Previous Topic: Toolbar clears after ESC key [solved, it`s the bug in user code]
Next Topic: label text not wrapped
Goto Forum:
  


Current Time: Thu May 16 03:27:24 CEST 2024

Total time taken to generate the page: 0.02161 seconds