Click here to Skip to main content
15,915,328 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
QuestionHow to show a image in a srf file? Pin
yushan_guo11-Sep-05 20:35
yushan_guo11-Sep-05 20:35 
AnswerRe: How to show a image in a srf file? Pin
Stuart Dootson14-Sep-05 19:22
professionalStuart Dootson14-Sep-05 19:22 
AnswerRe: How to show a image in a srf file? Pin
inter8ection16-Sep-05 3:35
inter8ection16-Sep-05 3:35 
Questiondigitalio Pin
saloomeh ebrahimi10-Sep-05 4:32
susssaloomeh ebrahimi10-Sep-05 4:32 
QuestionWTL - Subclassing a CScrollContainerImpl<> derived class Pin
Jochen Heckl8-Sep-05 3:12
Jochen Heckl8-Sep-05 3:12 
AnswerRe: Subclassing a CScrollContainerImpl&lt;&gt; derived class Pin
Jochen Heckl11-Sep-05 22:57
Jochen Heckl11-Sep-05 22:57 
GeneralRe: Subclassing a CScrollContainerImpl derived class Pin
Igor Vigdorchik13-Sep-05 15:25
Igor Vigdorchik13-Sep-05 15:25 
GeneralRe: Subclassing a CScrollContainerImpl derived class Pin
Jochen Heckl13-Sep-05 23:38
Jochen Heckl13-Sep-05 23:38 
Hi Igor, thank you for answering.

I got exactly this code in my project (but the Variable names).

But it does not work. Scrolling via the mouseweel works fine, but there is no reaction when clicking the up/down buttons of the scroll bar. Neither when I'm trying to drag the scroll bar marker up or down.

Can I use a scrollbar here, that is going to be subclassed? I need a entire control, that can have a vertical and a horizontal scrollbar. Showing or hiding the scrollbars im managed by CScrollContainerImpl<>.

My class declaration looks something like that:

<br />
class CtrlPanel : public CScrollContainerImpl< CtrlPanel ><br />
{<br />
public:<br />
	DECLARE_WND_CLASS( _T("CtrlPanel") )<br />
<br />
	BEGIN_MSG_MAP_EX( CtrlPanel )		<br />
		MSG_WM_ERASEBKGND( OnEraseBkgnd )<br />
		CHAIN_MSG_MAP( CScrollContainerImpl< CtrlPanel > )		END_MSG_MAP()<br />
<br />
public:<br />
	CtrlPanel( void );<br />
	virtual ~CtrlPanel( void );<br />
<br />
        // not used when subclassing<br />
	HWND Create( HWND i_hParent );<br />
	<br />
	// CScrollContainerImpl interface<br />
	void UpdateLayout( void );<br />
	void DoPaint( CDCHandle i_DCHandle ) {};<br />
<br />
private:<br />
	// message handlers<br />
	LRESULT OnEraseBkgnd( HDC i_hDC );<br />
};<br />



This class later creates controls that are placed on it.

in UpdateLayout() I compute the size and position of each control, than i set the scrollsize...:

<br />
// ...<br />
// ...<br />
// Position panel controls.<br />
// Compute ScrollsizeX and ScrollsizeY.<br />
// ...<br />
// ...<br />
<br />
SetScrollSize( std::max( 1, ScrollSizeX ), std::max( 1, ScrollSizeY ) );<br />



Still, what am I doing wrong Frown | :-(
GeneralRe: Subclassing a CScrollContainerImpl derived class Pin
Igor Vigdorchik14-Sep-05 7:11
Igor Vigdorchik14-Sep-05 7:11 
AnswerRe: WTL - Subclassing a CScrollContainerImpl derived class Pin
Jochen Heckl19-Sep-05 0:22
Jochen Heckl19-Sep-05 0:22 
QuestionATL COM wrapper: Link Error Pin
rbrad123458-Sep-05 2:04
rbrad123458-Sep-05 2:04 
GeneralRe: ATL COM wrapper: Link Error Pin
Jörgen Sigvardsson8-Sep-05 9:52
Jörgen Sigvardsson8-Sep-05 9:52 
GeneralRe: ATL COM wrapper: Link Error Pin
rbrad123459-Sep-05 3:21
rbrad123459-Sep-05 3:21 
GeneralRe: ATL COM wrapper: Link Error Pin
rbrad123459-Sep-05 12:05
rbrad123459-Sep-05 12:05 
GeneralRe: ATL COM wrapper: Link Error Pin
Jörgen Sigvardsson9-Sep-05 12:15
Jörgen Sigvardsson9-Sep-05 12:15 
GeneralRe: ATL COM wrapper: Link Error Pin
rbrad123459-Sep-05 14:20
rbrad123459-Sep-05 14:20 
GeneralRe: ATL COM wrapper: Link Error Pin
Jörgen Sigvardsson9-Sep-05 22:32
Jörgen Sigvardsson9-Sep-05 22:32 
QuestionTransparent combobox Pin
Asha Udupa5-Sep-05 1:44
Asha Udupa5-Sep-05 1:44 
Questionwhy can't I change the static text color? Pin
lvjing794-Sep-05 21:02
lvjing794-Sep-05 21:02 
GeneralRe: why can't I change the static text color? Pin
Jörgen Sigvardsson5-Sep-05 6:52
Jörgen Sigvardsson5-Sep-05 6:52 
GeneralRe: why can't I change the static text color? Pin
lvjing795-Sep-05 16:42
lvjing795-Sep-05 16:42 
QuestionRe: why can't I change the static text color? Pin
lvjing796-Sep-05 0:19
lvjing796-Sep-05 0:19 
AnswerRe: why can't I change the static text color? Pin
Anonymous19-Sep-05 3:06
Anonymous19-Sep-05 3:06 
QuestionMultithreaded ATL control - help/advice/etc? Pin
nullset2-Sep-05 8:45
nullset2-Sep-05 8:45 
AnswerRe: Multithreaded ATL control - help/advice/etc? Pin
Michael Dunn2-Sep-05 23:22
sitebuilderMichael Dunn2-Sep-05 23:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.