|
So nice of fren i set the recrusion_level in my program and while running its displaying exceed recrusion level as per printf i wrote and in infinte.any suggestion i really need to overcome this.
|
|
|
|
|
I think you do not understand: maybe you should just forget the recursion counter - it is only a safeguard, and will not help you calculate the determinant!
Please check out the link to code I posted above. It does not use recursion and therefore does not need a counter. And it might even be slightly faster.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
Hi,
I Need to trace the printing process from any application in windows. If User prints any document or file from any application Need to get printing information like printer name, No. of pages, Types of paper, and other setting in the print dialog. my application triggered when print is given.
Thanks in Advance.
Have A Nice Day!
Murali.M
Blog
|
|
|
|
|
And do you have a question?
|
|
|
|
|
std::map <iCString,unsigned int> mCounters;
//This function populate the "mCounters" map
GetCounters(mCounters);
map< iCString,unsigned int>::iterator it;
for (map<iCString,unsigned int>::iterator it = mCounters.begin();
it = mCounters.end(); ++it)
{
}
I am getting the error mentioned in the subject... what is the mistake I am doing ?
Fulll Error message
------------------
error C2451: conditional expression of type 'std::_Tree_iterator<_Mytree>' is illegal
1> with
1> [
1> _Mytree=std::_Tree_val<std::_tmap_traits<icstring,unsigned int,std::less<icstring="">,std::allocator<std::pair<const icstring,unsigned="" int="">>,false>>
1> ]
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
|
|
|
|
|
You missed a symbol from the middle of your for loop expression.
it = mCounters.end()
should be
it != mCounters.end()
|
|
|
|
|
|
(This does reference previous projects but I suggest deserves a new thread as it is a particular issue with TB_HIDEBUTTON and no other API).
I have discovered some apparently random behaviour of TB_HIDEBUTTON on Windows 7 64-bit. I have not tested on any other OS but suppose the problem will be duplicated to some degree or other.
First, I have a project (of my own) which successfully enumerates the toolbar buttons in the Notify Area.
One starting project to illustrate the idea, is this:
http://www.codeproject.com/Articles/10807/Shell-Tray-Info-Arrange-your-system-tray-icons
(This is an old project - for my Win7 it needs modifying to make the TBBUTTON structure fixed to 6 reserved bytes, also a mod to find the hwnd Win 7 "User Promoted Notification Area", so it's not a perfect sample but good enough to illustrate the type of code loop i'm using.)
I've used TB_BUTTONCOUNT to obtain a count of buttons on the Notification Toolbar, have entered a loop iterating over those items as i, and have created memory in the target process to retrieve the TBBUTTON structure and its TRAYDATA structure. I have then used GetWindowThreadProcessId to get tray.hwnd and from there have been able to extract all the required information in my loop regarding the target button. This all works.
The problem is, that being in my loop of i, I can successfully delete buttons with TB_DELETEBUTTON (and also, in the sample above with mods, can successfully use TB_MOVEBUTTON as well.) I'm therefore certain that my loop of i is pointing at the correct button. My pointer enumerator (actually an index i for SendMessage) appears to be, therefore, correct, as in, it is pointing at the correct button on the list in each iteration. That's logical.
However, TB_HIDEBUTTON produces bizarre and unexpected results - it hides the wrong button every time.
The only thing I can suppose in this circumstances is that the TB_HIDEBUTTON API has a wierd bug.
Can anyone confirm what is the problem hiding buttons with this API?
LRESULT hideResult = SendMessage(hTrayWnd, TB_DELETEBUTTON, i, 0 );
LRESULT hideResult = SendMessage(hTrayWnd, TB_HIDEBUTTON, i, 1 );
|
|
|
|
|
According to the documentation[^], the WPARAM value should be the command id of the button, not an index.
|
|
|
|
|
Correct. The API def for DELETEBUTTON specifies an Index whereas Command Identifier is presumably the idCommand field of TBBUTTON.
The API docs are different for each function.
Having tested this using the idCommand field of TBUTTON, rather than the Index, it works.
Problem solved. Many thanks.
|
|
|
|
|
please how to fix this problem ?
I installed Micrsoft viuasl studio profissional 2013
>> mex -setup
Welcome to mex -setup. This utility will help you set up
a default compiler. For a list of supported compilers, see
http://www.mathworks.com/support/compilers/R2013a/win64.html
Please choose your compiler for building MEX-files:
Would you like mex to locate installed compilers [y]/n? y
No supported SDK or compiler was found on this computer.
For a list of supported compilers, see
http://www.mathworks.com/support/compilers/R2013a/win64.html
Error using mex (line 206)
Unable to complete successfully.
|
|
|
|
|
I thought you could include this in VS by just adding a DLL file?
But Google[^] should explain how to do it.
|
|
|
|
|
Hi All,
I am using VS 2010 (SP1). When I am trying to use Edit and continue for debugging X64 bit application, I am getting the following error,
"the source file has changed it no longer matches the version of the file used to build the application being debugged"
Is there anyway to get rid of this?
OS: Win2008server (64 bit)
Thanks,
SMA
|
|
|
|
|
|
Hi Richard,
Thanks for your reply..Its mainly intended for VS2013. I am not able to do for VS2010
Thanks,
SMA
|
|
|
|
|
Well now you know where to look you can get any specific details for VS2010.
|
|
|
|
|
Hi Richard,
Thanks again for your reply. Actually I came to know from link that "Edit and continue" feature is not available for X64 bit application in VS2010..In order to be make sure I wanted to hear it from expert team who had already having hands on experience on this.
Thanks,
SMA
|
|
|
|
|
Well thanks for your comment, but I have never used Edit & Continue in 20 years of Windows programming.
|
|
|
|
|
I'm going to have to second Richard on this... I've never used Edit & Continue... I wouldn't depend on a feature that's not really widely used as that (none of the other developers in my company use it either).
|
|
|
|
|
I have never used it either.
Rather curious as to what development methodology would be in use such that this would be a feature that one could ever rely on in a non-trivial way.
|
|
|
|
|
Yeah, I'd be curious too. It's not a very helpful feature, sounds more like a feature added for the sake of adding bullet point highlights for a new release of VS.
|
|
|
|
|
I very rarely use it to fix minor typo-like errors, such as replacing < with <= , or changing literal values in assignments or function calls to something else. The reason is that I'm often confronted with deep levels of function calls with multiple nested loops, and getting back to the same point of debugging can be very time consuming.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
True, but nothing that you couldn't do with a bookmark and/or a conditional break point.
|
|
|
|
|
Hi,
No it is not implemented for 64 bit. Furthermore x64 edit and continue for unmanaged is not implemented on VS versions all the way up to VS2013++.
Best Wishes,
-David Delaune
|
|
|
|
|
I have a class (taken from somewhere). Here, I have a member like this:
public:
void SetBitmapDataSize(const int x, const int y);
private:
int m_PixelNumberX;
int m_PixelNumberY;
vector<vector<COLORREF> > BitmapData;
and SetBitmapDataSize is implemented:
void CBitmapOp::SetBitmapDataSize(const int x, const int y)
{
m_PixelNumberX = x;
m_PixelNumberY = y;
if((x>=0) && (y>=0))
{
BitmapData.resize(m_PixelNumberX);
for(int x = 0; x < m_PixelNumberX; x++)
BitmapData[x].resize(m_PixelNumberY);
}
}
Now, I want to replace vector<vector<colorref> > with this CArray:
I had tried:
private:
int m_PixelNumberX;
int m_PixelNumberY;
CArray< CArray<COLORREF, COLORREF&>, CArray<COLORREF, COLORREF&> > m_arrBitmapData;
my question is, how can replace vector.resize method, and how can I return CArray< CArray<COLORREF, COLORREF&>, CArray<COLORREF, COLORREF&> > data type ?
Thank you.
modified 4-Sep-14 8:17am.
|
|
|
|