|
Ok maybe i'm having a bad day , but for the life of me I can't find any information on how to change the permissions for the 'all users\application data' folder.
During install, I want to install a file to this folder (app.ini). I want to be able to give all users read and write permission to this folder and file. I can get the file installed ok, but it defaults to Read only.
The actual path is:
C:\Documents and Settings\All Users\Application Data\company\appname\app.ini
My installer is MSI that comes with Visual Studio 2005 and I'm using MFC/C++. I may need to create a Custom Action DLL. Not a problem. Just can't figure out how to set the permission of the folder/file to read, write, modify.
Thanks.
|
|
|
|
|
Anyone ever seen this one before? Any hints? We have an app which is producing this error. We get a message box which pops up with this text. The app is native C++/MFC.
|
|
|
|
|
We found the issue. It appears this message is originating from MFC CArchive serialization over a socket when invalid data is sent. So if you see this thats a good area in which to look.
|
|
|
|
|
Since message boxes are modal just breaking the application in a debugger and looking at the call stack should take you straight to the problem.
Steve
|
|
|
|
|
static int* arCombs[6][11] =<br />
{<br />
arCombs[0] = {i1,i2,i3,i4,i5,i6};<br />
arCombs[1] = {i7,i8,i9,i10,i1,i2};<br />
arCombs[2] = {i8,i9,i10,i1,i2,i3};<br />
arCombs[3] = {i9,i10,i1,i2,i3,i4};<br />
arCombs[4] = {i10,i1,i2,i3,i4,i5};<br />
arCombs[5] = {i1,i2,i3,i4,i5,i7};<br />
arCombs[6] = {i1,i2,i3,i4,i7,i8};<br />
arCombs[7] = {i1,i2,i3,i7,i8,i9};<br />
arCombs[8] = {i1,i2,i7,i8,i9,i10};<br />
arCombs[9] = {i1,i6,i7,i8,i9,i10};<br />
arCombs[10] = {i5,i6,i7,i8,i9,i10};<br />
<br />
};
I need to some help about syntax when i wrote this syntax i am giving a bug this like below:
error C2059: syntax error : '{'
Please stop this nonsense offer. I noticed about this offer is a statement against the enemy.
|
|
|
|
|
Have you considered:
static int arCombs[11][6] =
{
{i1,i2,i3,i4,i5,i6},
{i7,i8,i9,i10,i1,i2},
{i8,i9,i10,i1,i2,i3},
{i9,i10,i1,i2,i3,i4},
{i10,i1,i2,i3,i4,i5},
{i1,i2,i3,i4,i5,i7},
{i1,i2,i3,i4,i7,i8},
{i1,i2,i3,i7,i8,i9},
{i1,i2,i7,i8,i9,i10},
{i1,i6,i7,i8,i9,i10},
{i5,i6,i7,i8,i9,i10}
}; BTW, unless you are strictly targeting German-speaking readers, you might want to consider changing your profile to English.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
static int arCombs[11][6] = <br />
{<br />
{i1,i2,i3,i4,i5,i6},<br />
{i7,i8,i9,i10,i1,i2},<br />
{i8,i9,i10,i1,i2,i3},<br />
{i9,i10,i1,i2,i3,i4},<br />
{i10,i1,i2,i3,i4,i5},<br />
{i1,i2,i3,i4,i5,i7},<br />
{i1,i2,i3,i4,i7,i8},<br />
{i1,i2,i3,i7,i8,i9},<br />
{i1,i2,i7,i8,i9,i10},<br />
{i1,i6,i7,i8,i9,i10},<br />
{i5,i6,i7,i8,i9,i10} <br />
};
This is okey thanks..
Please stop this nonsense offer. I noticed about this offer is a statement against the enemy.
|
|
|
|
|
I was about to suggest the code below, but then I've tried it in a compiler and I got an error.
static int arCombs[6][11] =
{
{i1,i2,i3,i4,i5,i6},
{i7,i8,i9,i10,i1,i2},
{i8,i9,i10,i1,i2,i3},
{i9,i10,i1,i2,i3,i4},
{i10,i1,i2,i3,i4,i5},
{i1,i2,i3,i4,i5,i7},
{i1,i2,i3,i4,i7,i8},
{i1,i2,i3,i7,i8,i9},
{i1,i2,i7,i8,i9,i10},
{i1,i6,i7,i8,i9,i10},
{i5,i6,i7,i8,i9,i10}
};
The dimensions are wrong. You are declaring an array of 6 arrays of 11 elements, not an array of 11 arrays of 6 elements. But you only initialize 6 of those 11. The rest get the default value, 0.
So the correct way should be:
static int arCombs[6][11] =
{
{i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11},
{i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11},
{i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11},
{i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11},
{i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11},
{i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11}
};
or even
static int arCombs[6][11] =
{
i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,
i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,
i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,
i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,
i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,
i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11
};
I just copied and pasted the values, but you get the picture
Florin Crisan
|
|
|
|
|
If I use the GDI+ Region::Union(RectF&) method to include 3 GDI+ RectF objects, if I go back and use Region::GetRegionScans(), I don't always get the original 3 rects if there is a simpler way to describe the region. This occurs if two or more connected rects can be described by one larger rect. Is there a way to force the region to preserve the original rects and not simplify the solution to Region::GetRegionScans() or is the simplification inherent in how Regions are stored?
|
|
|
|
|
bob16972 wrote: Is there a way to force the region to preserve the original rects and not simplify the solution to Region::GetRegionScans() or is the simplification inherent in how Regions are stored?
I think the info about original rects is simply discarded.
MSDN [^]states
Region.GetRegionScans Method
Returns an array of RectangleF structures that approximate this Region object.
and the above, IMHO, enforces my hypothesis.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
Thanks for taking time out to advise.
|
|
|
|
|
Ditto on CPallini's reply.
Maybe store the rects in a GraphicsPath and use that to make a
Region when you need one...
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks for taking the time to give me some advice.
|
|
|
|
|
Heh. No need to thank me - I don't think I helped but I threw it out there
anyway just in case. I know you know what you're doing
Cheers,
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I am updating my old MFC app to Vista look app
i wanna know how to make my oldstyle tool baar look like vista tool bar?
the gradient grean color and the look
thanx in advance
|
|
|
|
|
I have an edit control that takes up the majority of space on my app. I am receiving continuos data from a port and would like to display each message separated by "\r\n".
I tried using the control variable and the value variable for my edit control to display these items. No matter what i try , it only displays the first item and not the rest.
I have used the method "SetWindowText"
I also use UpdateData(FALSE) to update the screen
How does one use these vars to display the continuos data in an edit control?
|
|
|
|
|
Isn't a list control (a list box or a list view ) more appropriate, is it?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
LCI wrote: I tried using the control variable and the value variable for my edit control to display these items. No matter what i try , it only displays the first item and not the rest.
I have used the method "SetWindowText"
How are you doing this?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I simply have a control variable for my edit control
call it m_Control.
I have a string variable for that same edit control.
call it m_strValue.
I do something like
//using the string var
for (int lop=1; ;lop<100;lop++)
{
m_strValue = data[lop];
UpdateData(FALSE);
}
///////OR
for (int lop=1; ;lop<100;lop++)
{
m_Control.SetWindowText((LPCSTR)data[lop]);
UpdateData(FALSE);
}
|
|
|
|
|
Neither of these will preserve what is currently in the edit control.
LCI wrote: m_Control.SetWindowText((LPCSTR)data[lop]);
UpdateData(FALSE);
When using a CEdit control, or any other time for that matter, UpdateData() is not necessary.
You can do something like:
for (int lop = 1; lop < 100; lop++)
{
CString str;
m_Control.GetWindowText(str);
str += data[lop];
m_Control.SetWindowText(str);
} Or you could just continually add to the end of the edit control as has already been suggested.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Since you are trying to update a window while you are in a tight loop, you need to realize that the window will not process any messages until the loop completes. The UpdateData puts a message in the queue to be processed, but it isn't processed immediately.
To overcome this, try
for (int lop=1; ;lop<100;lop++)
{
m_Control.SetWindowText((LPCSTR)data[lop]);
UpdateData(FALSE);
m_Control.UpdateWindow();
}
The call to UpdateWindow bypasses the normal message queue and causes the window to repaint immediately.
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
LCI wrote: it only displays the first item
Do you have the textbox set to multiline?
Or use a listbox as was mentioned.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
|
From MSDN (here[^]):
So, set the current selection (SetCell) to the last character and then replace the current selection by the new text (ReplaceSel). This way, you don't erase what was there previously.
modified on Tuesday, January 22, 2008 10:50:29 AM
|
|
|
|
|
dear all
sometimes i want to calculate 3 amont minimum, for example: 1,2,3. i want to calculate minimum of 1,2,3, but sometimes i want to calculate minimum of 5,6,7,8,9,10, how can i define a function or other way to calculate such miminum? thanks a lot.
Li Zhiyuan
5/10/2006
|
|
|
|
|