Click here to Skip to main content
15,905,323 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionError "Recordset is read-only" ??? Pin
_skidrow_vn_11-Aug-03 15:56
_skidrow_vn_11-Aug-03 15:56 
GeneralHandling message in parent window Pin
bitpusher11-Aug-03 15:26
bitpusher11-Aug-03 15:26 
GeneralRe: Handling message in parent window Pin
HPSI11-Aug-03 20:38
HPSI11-Aug-03 20:38 
GeneralI get an error with writing a string Pin
Snyp11-Aug-03 15:14
Snyp11-Aug-03 15:14 
GeneralRe: I get an error with writing a string Pin
bitpusher11-Aug-03 15:30
bitpusher11-Aug-03 15:30 
GeneralRe: I get an error with writing a string Pin
David Crow12-Aug-03 2:39
David Crow12-Aug-03 2:39 
QuestionNM_RELEASEDCAPTURE/Spin Control? Pin
Kayembi11-Aug-03 14:44
Kayembi11-Aug-03 14:44 
AnswerRe: NM_RELEASEDCAPTURE/Spin Control? Pin
Iain Clarke, Warrior Programmer11-Aug-03 23:19
Iain Clarke, Warrior Programmer11-Aug-03 23:19 
I had the same need, in a palette editing dialog I wrote. Here are some relevant code snippets:

	ON_NOTIFY(UDN_DELTAPOS, IDC_SPINRED, OnDeltaposSpinRed)

...

void CPaletteEdit::OnDeltaposSpinRed(NMHDR* pNMHDR, LRESULT* pResult) 
{
	NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
	*pResult = 0;

	int	nNewPos = pNMUpDown->iPos + pNMUpDown->iDelta;
	if (nNewPos < 0)
	{
		nNewPos = 0;
		*pResult = 1;
	}
	if (nNewPos > 255)
	{
		nNewPos = 255;
		*pResult = 1;
	}
	COLORREF	cRef = m_rgbMain;
	cRef = RGB (nNewPos, GetGValue (cRef), GetBValue (cRef));
	m_rgbMain = (cRef);
	m_rgbBaby [m_nCurrentColour] = cRef;
	m_pPaletteSettings->rgbPalette [m_nCurrentColour] = cRef;
	PaletteRefresh ();
}


As this is cut and pasted from my app, the last bit is app specific. m_rgbMain is a colour display
static control that has operator= overloaded.

I hope this helps,

Iain.
GeneralRe: NM_RELEASEDCAPTURE/Spin Control? Pin
Kayembi12-Aug-03 3:23
Kayembi12-Aug-03 3:23 
GeneralRe: NM_RELEASEDCAPTURE/Spin Control? Pin
Iain Clarke, Warrior Programmer12-Aug-03 5:02
Iain Clarke, Warrior Programmer12-Aug-03 5:02 
GeneralRe: NM_RELEASEDCAPTURE/Spin Control? Pin
Kayembi16-Aug-03 8:35
Kayembi16-Aug-03 8:35 
GeneralRe: NM_RELEASEDCAPTURE/Spin Control? Pin
Iain Clarke, Warrior Programmer16-Aug-03 13:19
Iain Clarke, Warrior Programmer16-Aug-03 13:19 
QuestionHow can I set a toolbar button to display an icon? Pin
ElizabethC11-Aug-03 12:24
ElizabethC11-Aug-03 12:24 
AnswerRe: How can I set a toolbar button to display an icon? Pin
Adi Narayana11-Aug-03 20:35
Adi Narayana11-Aug-03 20:35 
GeneralRe: How can I set a toolbar button to display an icon? Pin
ElizabethC12-Aug-03 6:48
ElizabethC12-Aug-03 6:48 
GeneralJob Object API Pin
bigeyedfish8111-Aug-03 11:38
bigeyedfish8111-Aug-03 11:38 
Generalva_arg and VS.NET 2003 Pin
leppie11-Aug-03 10:59
leppie11-Aug-03 10:59 
GeneralRe: va_arg and VS.NET 2003 Pin
Mike Dimmick11-Aug-03 11:13
Mike Dimmick11-Aug-03 11:13 
GeneralRe: va_arg and VS.NET 2003 Pin
leppie11-Aug-03 11:23
leppie11-Aug-03 11:23 
GeneralRe: va_arg and VS.NET 2003 Pin
geo_m12-Aug-03 1:06
geo_m12-Aug-03 1:06 
GeneralRe: va_arg and VS.NET 2003 Pin
leppie12-Aug-03 7:13
leppie12-Aug-03 7:13 
GeneralRe: va_arg and VS.NET 2003 Pin
geo_m12-Aug-03 7:34
geo_m12-Aug-03 7:34 
Generallossing focus on a dialog box Pin
(Steven Hicks)n+111-Aug-03 10:34
(Steven Hicks)n+111-Aug-03 10:34 
GeneralRe: lossing focus on a dialog box Pin
valikac11-Aug-03 12:08
valikac11-Aug-03 12:08 
GeneralCOM1 Pin
Anonymous11-Aug-03 9:54
Anonymous11-Aug-03 9:54 

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.