|
In the Project Settings dialog box that appears, click the C/C++ tab . Select General from the Category group box. In the Debug info group box, select "Program Database for Edit and Continue." The /ZI compiler switch will appear in the Project Options box at the bottom of the dialog box. Any other selection in the Debug info group box will disable the /ZI compiler switch. Click OK to accept the settings.
More[^] info.
Nibu thomas
Software Developer
|
|
|
|
|
Hi,
I've a slider that changes values in another object as it moves. I mean i catch all the OnHSCroll messages all the time.
Woring with the slider this way results in non-smooth slider movement and upexpected slider behaviour.
Does anybody have an idea how to fix it?
Thanks a lot in adavnce.
Snir.
|
|
|
|
|
I think i need to use setTimer() or sleep() hmmm...
|
|
|
|
|
Hi
Use a class for slider
by
KK
|
|
|
|
|
Thanks Krishna for your reply.
Of course i'm using a class for slider. did you mean to derive CSliderCtrl ?
and if you did then what then?
|
|
|
|
|
I think you have to do a little bit heavier process in OnHScroll, right?
Then the better method is to use a timer like the following.
OnHScroll(...)
{
SetTimer( IDT_PROCESSHSCROLL, 50, 0 );
// Nothing to do more than this...
}
OnTimer( int nIdEvent )
{
if( nIdEvent == IDT_PROCESSHSCROLL )
{
KillTimer( nIdEvent );
// do the HScroll functions that u have done in the OnHScroll.
}
}
Hope it will help you.
- NS -
|
|
|
|
|
Hey NS that's a proper answer. Cheers mate!
I reckon it'll work fine combine with on_wm_lbuttonup to control the user's movement (i.e. if he releases the mouse button prior to timer).
I got it. Thanks again.
|
|
|
|
|
i have created a list control when u click on it a dynamic combo box will be drawn with some items.
each item has some properties say combo box list some of ur names each name is associated with age sex marital status etc.
i also have a dialog box to dislay the properties of each item.
now i want to display this dialog by double clicking a particular item from the drop down box of the combo.
am new to forums and VC++ and MFC programming if u got any ideas of implementing it plz post it
|
|
|
|
|
preejakr wrote: now i want to display this dialog by double clicking a particular item from the drop down box of the combo
So what happens. Does the dialog box come up?
Nibu thomas
Software Developer
|
|
|
|
|
no
there is no default event handler to handle it
when i use pre translate message its not able to catch the WM_LBUTTONDBLCLK
message
now what i do is select the item, then click somewhere else to kill the focus
then straightaway double click the list control
what i need is to display the dialog when i double click the item which is seen while combo has been in drop down state
|
|
|
|
|
preejakr wrote: WM_LBUTTONDBLCLK
What about CBN_SELENDOK .
Nibu thomas
Software Developer
|
|
|
|
|
int begin, end;
// search through using STL stringObject.find("searchForString")
if( (begin != string::npos) && (end != string::npos))
// Warning: warning C4389: '!=' : signed/unsigned mismatch
Thanks in advance!
|
|
|
|
|
I guess string::npos is unsigned integer type hence the warning.
Do not do logical operations(particularly in loops) with signed and unsigned types.
This could lead to infinite loops and other unprecedented results.
Nibu thomas
Software Developer
|
|
|
|
|
Use string::size_type instead of int for the begin and end variables so they match the type returned by string::npos . You shouldn't mix signed and unsigned types in a conditional statement unless you really know what you're doing (and are willing to handle the consequences ).
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi,
While calling domodal for a dialog windows message "An unsupported operation was attempted." is showing. This is happened after i editing the the resource file. Anybody pls tel me wat will be the reason for it?
yours faithfully
ajeesh
|
|
|
|
|
i'm not sure maybe your problem is IDD from dialog
|
|
|
|
|
Ajeesh c v wrote: Anybody pls tel me wat will be the reason for it?
It could be any number of things. What change(s) did you make to the .rc file? Can you reverse those changes and see the error go away?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Can someone give a pointer on how to build a recording and playback functionality on IE ?
Basically i want to record the user actions on a web-page for play back later.The user actions would include webbrowser and html element events.
Is the BHO(browser helper objects) framework a way to do this?
A basic framework overview would be enough to help me proceed.
|
|
|
|
|
Hi,
I have an dialog based application. On which one button is their. I want to move this button depending on circumtences. How to move the button? Can anybody help me out......
Thanks:-
Mike
|
|
|
|
|
MikeRT wrote: How to move the button? Can anybody help me out......
Use MoveWindow().
Nibu thomas
Software Developer
|
|
|
|
|
m_Button.MoveWindow(0,0,100,100);
GetDlgItem(IDC_BUTTON1)->MoveWindow(0,0,100,100);
and also you can keep width and height with GetWindowRect
|
|
|
|
|
If you don't want to change the size of the button, SetWindowPos with SWP_NOSIZE flag specified will be more suitable.
Eg.
m_button.SetWindowPos( 0, x, y, 0, 0, SWP_NOZORDER | SWP_NOSIZE );
- NS -
|
|
|
|
|
hi nimbu thomas,
please provide me a snippet of code. i understand it is exactly correct and correct implementation to change the data exchange for a property sheet. if you provide me a snippet of code i would be very thank full to you.
please understand me.
thanks and regards,
uday.
uday kiran
|
|
|
|
|
kiran janaswamy wrote: nimbu thomas
Nibu thomas .
kiran janaswamy wrote: please provide me a snippet of code. i understand it is exactly correct and correct implementation to change the data exchange for a property sheet. if you provide me a snippet of code i would be very thank full to you.
Did you look up the documentation for QuerySiblings .
Nibu thomas
Software Developer
|
|
|
|
|
hi nimbu thomas.
The Documentation say's
LRESULT QuerySiblings(WPARAM wParam,LPARAM lParam);
and the snippet of code in MSDN
//====================================================================
// Validate the value entered in the Number edit control. If its
// value is not a natural number, request CPropertySheet (i.e. parent
// window of the page) to send a PSM_QUERYSIBLINGS message to each
// LOADED page (a page won't be loaded in memory until it is shown).
// If one of the pages returns a nonzero value in response to the
// PSM_QUERYSIBLINGS message, then inform the user and change the OK
// to Close and disable the Cancel button. CStylePage is a
// CPropertyPage-derived class.
BOOL CStylePage::OnKillActive()
{
int num = GetDlgItemInt(IDC_NUMOBJECTS);
if (num <= 0)
{
if (QuerySiblings(num, 0L))
{
AfxMessageBox("An invalid data is entered. Choose Close
button to close the dialog.");
CancelToClose();
}
}
return CPropertyPage::OnKillActive();
}
// This is an example of trapping the PSM_QUERYSIBLINGS in one of
// the pages. CColorPage is a CPropertyPage-derived class. Upon
// receiving this message, wParam contains the value passed to
// QuerySiblings() call. CColorPage will check this value and return
// FALSE only if the value is greater than 1.
BEGIN_MESSAGE_MAP(CColorPage, CPropertyPage)
// ...
ON_MESSAGE(PSM_QUERYSIBLINGS, OnQuerySiblings)
END_MESSAGE_MAP()
LRESULT CColorPage::OnQuerySiblings( WPARAM wParam, LPARAM lParam )
{
return (wParam <= 0);
}
//========================================================================
but CColorPage is a PropertySheet or PropertyPage getting Confused.
thanks and regards,
uday.
uday kiran
|
|
|
|