Click here to Skip to main content
15,919,341 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questioninterface to proxy object in COM Pin
George_George5-Aug-08 16:30
George_George5-Aug-08 16:30 
AnswerRe: interface to proxy object in COM Pin
Stephen Hewitt5-Aug-08 16:59
Stephen Hewitt5-Aug-08 16:59 
GeneralRe: interface to proxy object in COM Pin
George_George5-Aug-08 21:23
George_George5-Aug-08 21:23 
GeneralRe: interface to proxy object in COM Pin
Stephen Hewitt5-Aug-08 21:27
Stephen Hewitt5-Aug-08 21:27 
GeneralRe: interface to proxy object in COM Pin
George_George5-Aug-08 21:43
George_George5-Aug-08 21:43 
GeneralRe: interface to proxy object in COM Pin
Stephen Hewitt5-Aug-08 21:45
Stephen Hewitt5-Aug-08 21:45 
GeneralRe: interface to proxy object in COM Pin
George_George5-Aug-08 21:52
George_George5-Aug-08 21:52 
Questionquestion about bits field structure in C Pin
kcynic5-Aug-08 15:54
kcynic5-Aug-08 15:54 
AnswerRe: question about bits field structure in C Pin
hoxsiew5-Aug-08 16:40
hoxsiew5-Aug-08 16:40 
GeneralRe: question about bits field structure in C Pin
kcynic5-Aug-08 16:56
kcynic5-Aug-08 16:56 
QuestionON_MESSAGE vs linker Pin
greghint5-Aug-08 14:28
greghint5-Aug-08 14:28 
GeneralRe: ON_MESSAGE vs linker [modified] Pin
fantasy12155-Aug-08 15:59
fantasy12155-Aug-08 15:59 
AnswerRe: ON_MESSAGE vs linker Pin
Mark Salsbery6-Aug-08 5:36
Mark Salsbery6-Aug-08 5:36 
GeneralRe: ON_MESSAGE vs linker Pin
greghint6-Aug-08 6:10
greghint6-Aug-08 6:10 
QuestionHow do I alter the mfc image icon - (on the top left corner of all programs) Pin
simon alec smith5-Aug-08 11:28
simon alec smith5-Aug-08 11:28 
AnswerRe: How do I alter the mfc image icon - (on the top left corner of all programs) Pin
Mark Salsbery5-Aug-08 11:55
Mark Salsbery5-Aug-08 11:55 
AnswerRe: How do I alter the mfc image icon - (on the top left corner of all programs) Pin
hoxsiew5-Aug-08 14:15
hoxsiew5-Aug-08 14:15 
QuestionQuestion about using the CSliderCtrl to control the Ruler... Pin
oppstp5-Aug-08 9:32
oppstp5-Aug-08 9:32 
Hello,
I am writing a program about using the CSliderCtrl (vc provided) to control the ruler.
There is also a scroll bar for the ruler. (Sometimes the ruler length may be too long)
All I want is when I dragging the slider, the interval between two meter unit of the ruler will be changed automatically.
The ruler I used is this : http://www.codeproject.com/KB/miscctrl/uhrulerctrl.aspx

Now the interval between two meter unit would be changed when I dragged the slider.
But there's another problem. The problem is the ruler will jump to the start meter of the ruler automatically. (The scrollbar is activated)
I want the ruler can keep the original position when I dragged the slider.
(The ruler can keep the original position by a scrollbar in the demo project)

I tried some methods but the ruler always jump to the start meter...
Can someone help me to solve this question ?

Below is my part code :
void CtrlRulerDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)<br />
{ <br />
	// TODO: Add your message handler code here and/or call default<br />
	SCROLLINFO  si;<br />
	m_ScrollBar.GetScrollInfo( &si , SIF_ALL );<br />
	INT iScrollPos = si.nPos;<br />
	int i = 0;<br />
	<br />
	switch( nSBCode ) {<br />
		case TB_PAGEDOWN:<br />
			si.nPos += 5;<br />
			i = m_Slider.GetPos();<br />
			break;<br />
		case TB_PAGEUP:<br />
			si.nPos -= 5;<br />
			i = m_Slider.GetPos();<br />
			break;<br />
		case TB_THUMBTRACK:<br />
			i = m_Slider.GetPos();<br />
			si.nPos = i*10;<br />
			break;<br />
	};<br />
<br />
	si.fMask = SIF_POS;<br />
<br />
	if( iScrollPos != si.nPos )<br />
	{<br />
		m_ScrollBar.SetScrollInfo( &si );<br />
		UpdateData();<br />
		m_HRuler.SetMilimeterPixel(i);		<br />
		m_HRuler.SetScrollPos( m_nScrolPos );			<br />
		m_HRuler.Invalidate();	<br />
	}<br />
<br />
	CDialog::OnHScroll(nSBCode, nPos, pScrollBar);<br />
}<br />

My Environment is : Windows Vista SP1, VS 2005 SP1, MS Platform SDK 2003 SP1

Thank you very much!
QuestionRemoving focus for an hyperlink control Pin
YKK Reddy5-Aug-08 7:38
YKK Reddy5-Aug-08 7:38 
AnswerRe: Removing focus for an hyperlink control Pin
hoxsiew5-Aug-08 8:38
hoxsiew5-Aug-08 8:38 
GeneralRe: Removing focus for an hyperlink control Pin
YKK Reddy5-Aug-08 19:55
YKK Reddy5-Aug-08 19:55 
QuestionHow to convert variant_t data type to char* or char array or const char* or CString data type? Pin
yklim5-Aug-08 6:05
yklim5-Aug-08 6:05 
AnswerRe: How to convert variant_t data type to char* or char array or const char* or CString data type? Pin
led mike5-Aug-08 7:00
led mike5-Aug-08 7:00 
AnswerRe: How to convert variant_t data type to char* or char array or const char* or CString data type? Pin
hoxsiew5-Aug-08 7:10
hoxsiew5-Aug-08 7:10 
AnswerRe: How to convert variant_t data type to char* or char array or const char* or CString data type? Pin
George L. Jackson5-Aug-08 7:43
George L. Jackson5-Aug-08 7:43 

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.