|
Ok, thank you very much, Now i know how can i store the information and handle the extension of the files with the different users. But One duda more for example is if I want that Densitet only have access to the folder Program files or access to 30 files with different extensions in different folders. And when u have controlled this situation, for example if the user create a new file, how can i send the information of the file that the user is creating to the server to actuallize the bbdd.
Thank you very much for the help, I hope that u understand this kind of problem i don't know if i have explained good, i hope so.
/Densitet
|
|
|
|
|
densitet wrote:
One duda more for example is if I want that Densitet only have access to the folder Program files or access to 30 files with different extensions in different folders.
Err.. I don't know. But what is your program doing exactly ?? What do you mean by 'people have access to file' ?? What are you implementing ? A kind of windows explorer or what ?
Then it is just up to your program to decide what to do with specific users...
|
|
|
|
|
My program like i told u, has a client and a server in the same machine, but when i entry in the windows XP with the users i want create like different permissions to the users like WXP has Administrator, Invite, .... I want to do that each user has different permissions, for example Densitet only permiss to 30 names of files, Other user permission to only 2 files, something like that, Can i store this information like u say me with a ini file and in allowed write the name of files?, and when the user create a new files how i can send this file to the server to actualize the ini file?. And when the server send the permission to the client, the client will permit to the user access to this files and not to the other files. I want to know how can i handle this.
I hope that my explication will be better than before.
/Densitet
|
|
|
|
|
Hi,
I am facing one problem.I am reading .res file and writing contents to xml file.Here in one function i am writing one for-loop for reading areas of image upto area is null,but now i want to add another element into xml file.
so i am adding one another for- loop but when my 1st loop completes and second for-loop starts then immediatly i got error message that unhandled exception in res2xml.exe : 0*C0000005 : ACCESS violation.
i had checked this exe file and i had given all rights to it.
Now can anybody tell me that what is the main problem?
|
|
|
|
|
You don't have this message because you don't have access to the file ! This is the res2xml.exe program that raises this error because it tries to read or write somewhere in memory where it was not allowed to. So, use your debugger (F5) and see exactly which instruction causes this error.
|
|
|
|
|
Hi,
I had done after debugging my code ,the main problem is that when i am tring to add new value into xml file like here i am sending you some main code:
This for loop is reading from the .res file and inserting value into xml file code is below:
for (i=0; i<form_data.area_count;i++, area_p="area_p-">next)
{
if(area_p->type==1)
{
-->error from this line-->// ImagePageNo==area_p->number;
fprintf(ofp , "\n\t\t<documentkey name="\"%s\"">", ImagePageNo);
print_documentkey_tag_end(ofp);
}
{
//some more code is here
}
}
Here as i had shown my error occurs like res2xml.exe access violation from that line which i had shown in above code.
when i comment this line code works fine.so this error occurs due to which problem that i can't getting?
can you help me into that?
|
|
|
|
|
Did you tried to use the debugger with breakpoints (F9 to set/remove breakpoints)?? This is much more helpfull than removing lines of code and seing if that works or not.
Check if area_p contains an adress that looks valid (other than 0x0000 or 0xccccc).
I cannot help you more. You really need to get used with the debugger because it is a very very helpfull tool for debugging applications (and it's really easy to use).
|
|
|
|
|
I have a problem with function RegEnumKeyEx in Windows XP. Variable
retCode obtain code 5 after first using function RegEnumKeyEx. Code
showed below
<br />
void CInstDlg::GetSubKeys(HKEY key, CString subStr, CStringArray &arr)<br />
{<br />
HKEY hKey;<br />
DWORD i, retCode, maxlen = MAX_PATH;<br />
CHAR achKey[MAX_PATH]; <br />
FILETIME ftLastWriteTime;<br />
<br />
retCode = RegOpenKeyEx(key, subStr, NULL, KEY_QUERY_VALUE, &hKey);<br />
<br />
for (i = 0, retCode = ERROR_SUCCESS;<br />
retCode == ERROR_SUCCESS; i++)<br />
{<br />
retCode = RegEnumKeyEx(hKey, i, achKey, &maxlen, NULL, NULL, NULL, <br />
&ftLastWriteTime);<br />
maxlen = MAX_PATH;<br />
if (retCode == ERROR_SUCCESS)<br />
arr.Add(achKey);<br />
}<br />
<br />
RegCloseKey(hKey);<br />
}<br />
VadimR
|
|
|
|
|
The key must have been opened with the KEY_ENUMERATE_SUB_KEYS access right.
suhredayan There is no spoon.
|
|
|
|
|
Thank you very much
VadimR
|
|
|
|
|
|
Hi all,
I'm using Visual C++.NET in a project involving image manipulation. The problem is that I'm getting different output using the MT or MTd Run-Time libraries. I've checked the inputs to the graphics functions (I can't check the functions itself because they're in a precompiled lib) and seem to be the same in both cases. Any suggestions on what's going on?
Thanks in advance.
|
|
|
|
|
Well.... VC++ uses different floating point libraries for the debug and release version. So you get different results. The main change is in precision.
Try applying breakpoints in release mode and check if you are getting the same result as in debug mode.
|
|
|
|
|
Anshul Solanki wrote:
VC++ uses different floating point libraries for the debug and release version.
OK, then I need to restate the question: could you point me to somewhere listing the main differences between debug and release libraries? Something I forgot to mention is that according to the theoretical results, the correct output is the one in debug mode. Otherwise I wouldn't be so concerned. Thanks again.
|
|
|
|
|
Hi
I want to overload [] [] operator for a Matrix class that I am writing. I think one of the solutions will overloading the operators incrementally. If someone has done this in past or has more ideas, please drop a line or bits of code.
generally, a templated version of overloading [ ] goes like:
e.g. template <class E> E& CMatrix<E>::operator [] (int index) const
{
return CMatrix::foo<E>[index];
}
Thanks
|
|
|
|
|
first of all, operator[][] doesn't exist in C++ !!!
what happens when you create a multi-dimensional array is in fact creating an array of arrays... d'you follow me ?!
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I think (but I'm really not sure, it's too long that I didn't do that ) that you will need to define a new class that is the one dimension array (like you mentionned there, CMatrix::foo). And then inside this class, override the [] operator also. But, for the CMatrix operator, it will not return the E template but a foo class... (and then on this return you apply the second operator[] from foo class that returns your E template element).
Ok, but as I said I'm not sure anymore...
But another suggestion: why don't you use the STL vector class ? It is a template class that can manage one dimensionnal arrays. Then you make a vector of vector and you have your matrix. The advantage is that you don't need to write it all again, that it has been tested by thousands of people, ...
|
|
|
|
|
There is no such thing as an operator[][].
However, you can simulate very easy.
All you have to do is create an operator[] that returns a pointer to your type.
inline T* operator[](int i) {return (m_data + (m_col*i));}
Here's a working example:
template < class T>
class dynamic_2d_array
{
public:
dynamic_2d_array(int row, int col):m_row(row),m_col(col), m_data((row!=0&&col!=0)?new T[row*col]:NULL){}
dynamic_2d_array(const dynamic_2d_array&src):m_row(src.m_row),m_col(src.m_col), m_data((src.m_row!=0&&src.m_col!=0)?new T[src.m_row*src.m_col]:NULL){
for(int r=0;r<m_row;++r)for(int c="0;c<m_col;++c)" (*this)[r][c]="src[r][c];
" }
="" ~dynamic_2d_array(){if(m_data)="" delete="" []m_data;}
="" inline="" t*="" operator[](int="" i)="" {return="" (m_data="" +="" (m_col*i));}
="" t="" const*const="" const="" (m_col*i));}
protected:
="" dynamic_2d_array&="" operator="(const" dynamic_2d_array&);
private:
="" int="" m_row;
="" m_col;
="" m_data;=""
};
you="" can="" download="" it="" from="" following="" link:
<a="" href="http://code.axter.com/dynamic_2d_array.h" rel="nofollow">http://code.axter.com/dynamic_2d_array.h[^]
Top ten member of C++ Expert Exchange.
http://www.experts-exchange.com/Cplusplus
|
|
|
|
|
I have got the following problem.
I have a put my resources in a DLL that is connected to my application at runtime.
Everything works fine, but as soon I put a custom control (p.e. Chris Maunder's Gridcontrol) in a dialog, that dialog won't come up.
Has anybody also encountered this problem and solved it?
|
|
|
|
|
Make your Dll an MFC extension dll.
|
|
|
|
|
Ours is an application using VC++ MFC. We need to draw an image in the window and this input image from the customer will be in .cgm format. Since windows meta file(wmf) format is microsoft supported one, we convert .cgm to .wmf file and import to our application. We load this wmf image using Loadpicture and render functions. We are using LPPICTURE object for drawing. The image clarity is not appreciable since it is not smooth. But if the same wmf image is inserted in MSEXCEL, it is smooth.So for this scenario, we need your inputs on
a) Is any other microsoft supported object(like LPPICTURE) available to draw the image?
b) Is any 3rd party tool available to draw the wmf file with smooth?
c) Is it possible to load .cgm file directly in VC++ MFC application?
|
|
|
|
|
Sud_83 wrote:
any other microsoft supported object(like LPPICTURE) available to draw the image?
see GetEnhMetaFileHeader and PlayEnhMetaFile
Image Toolkits | Image Processing | Cleek
|
|
|
|
|
Hi,
I have an application (in VC++ 6.0) wherein it displays the images in ListView. So the application starts displaying the images from the Top left corner (0,0).
Now I have added the manifest file (to give XP look to application) in applicatoin resource successfully. (as outlined in the below mentioned link http://www.codeguru.com/Cpp/controls/controls/article.php/c5227/[^])
The application is having the XP look but the images are displayed from the Bottom left corner.
Question:How to set the origin of the ListCtrl to top left corner (0,0) so that the images are displayed from the top left corner (0,0) ?
Thanks & Regards,
Neeraj
Thanks & Regards,
Neeraj
Thanks & Regards,
Neeraj
|
|
|
|
|
hi!
For example, i have a class CMyRichEditCtrl that extends CWnd . In this class, i declare a CRichEditCtrl membre.
In CMyRichEditCtrl , i've declared a function :
BOOL CEdataRichEdit::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)<br />
{<br />
if (wParam == IDC_RICH)<br />
{<br />
}<br />
return CWnd::OnNotify(wParam, lParam, pResult);<br />
}
In my dialog (MyDialogDlg ), i've some buttons, and OnNotify function too.
Question: I want to call a function (OnNotify for example) of MyDialogDlg in <big>(1)</big> ? How can i do?
thanhks for all help!
hzocm
|
|
|
|
|
Hi again,
Still rumbling on with that old problem? What you are about to do here is not such a bad idea, but I found this in msdn which might help you more: TN062[^]
Joel Holdsworth
Wanna give me a job this summer?
Check out my online CV and project history[^]
|
|
|
|