|
For starters I would not even begin to debug this. It looks to be way too convulated with all of the preprocessor statements. A well-designed class should be an entity that knows all about itself. When the file-related object is constructed, it should at that point know how it will later be closed.
Have you single-stepped through each statement and noted the value of the variables along the way?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
i figured out the problem
but thanks anyway
|
|
|
|
|
I came across a custom control in an example Project here at The Code Project. I want to use that custom control in another application. How can you use a custom control from one application to another without retyping all the code over again? I tried copying the .cpp and .h files and adding them to my new project but could not get the control classes to be recognized....
Thanks.
|
|
|
|
|
You can remake the .dsw file .
The steps is in the following :
1 Delete the old .dsw file in your project's directory
2 goto VC6 ,it will notify you to recreate the dsw file . Then you should select all files int listbox and create it .
Above is all.
Try it
AntonlioX
|
|
|
|
|
AntonlioX wrote:
1 Delete the old .dsw file in your project's directory
2 goto VC6 ,it will notify you to recreate the dsw file . Then you should select all files int listbox and create it .
How can you do step 2 if you delete the dsw file? Once I delete this file, I cant open the project in VC6?
|
|
|
|
|
Do not believe everything you read on the internet. The file that you are to delete is the .clw (class wizard) file, not the .dsw (project workspace) file.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
I figured this out when after deleting the .dsw file the project was gone!
Thanks.
|
|
|
|
|
Sorry for my carelessness ,I typed the .clw as .dsw .
AntonlioX
|
|
|
|
|
No problem. It got me thinking along the right track and eventually led to a solution. Thanks for your input.
|
|
|
|
|
|
Trollslayer wrote:
Did you put the header file into your stdafx.h file ?
Tried this. Nothing gets better by doing this.
|
|
|
|
|
Hi-
Is there documentation about how to use the visual c++ MS Flex Grid in a View, instead of the usual dialogue box?
Thanx, rich
rich
|
|
|
|
|
Using FormView?
<italic>Work hard, Work effectively.
|
|
|
|
|
How does one get the default bar color used by the CProgressCtrl? (non-themed of course)
Is there a system color setting used for this or is it always dark blue?
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
Painted on the side of a dog trainer's van: SIT HAPPENS
|
|
|
|
|
After screwing around a bit, it looks like it's the system highlight color.
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
Painted on the side of a dog trainer's van: SIT HAPPENS
|
|
|
|
|
Dear all,
Can anyone stop the flicker occuring in the CTabCtrl? I add WS_CLIPCHILDREN and WS_CLIPSIBLINGS styles to the dialog, and insert that dialog to my TabCtrl, but it still flickers when resizing the TabCtrl.
Sincerely,
|
|
|
|
|
I am trying to figure out how to set, replace and remove an imagelist for a CListCtrl at runtime.
If, during the creation of the CListCtrl, I set an imagelist, using SetImageList(), I am able to remove it using RemoveImageList(). But, the list control appears to still leave some space between the edge of the control and text items for an image of some kind (in report mode). Also, after removing the image, I am not able to re-set it.
If I do not set an imagelist when creating the control, the text items appear next to the left edge of the control (in report mode). But, I am not able to set one after the fact.
Any help would really be appreciated.
Thanks in advance,
-Dale
|
|
|
|
|
Do you destroing old imagelist object after you remove?
|
|
|
|
|
No, I do not destory it for I might want to use it again later. But, I call CListCtrl::RemoveImageList() which sets the handle to the image list to NULL. So, now I have no image list, but my items still indent the width of an item image - they are not flush against the left edge of the control.
-Dale
|
|
|
|
|
I understand this behaviour is unsual. I would play with that.
Try to desroy it. Just for experiment. I undersand you want to switch different ILs. Just in case if IL internaly uses GlobalAlloc, to make sure nothing is left.
The other thing did you try to:
1. Set first IL
2. Set another (I guess that's what you doing now)
3. Set first IL again
Now is 3rd case has no problems?
or
1. Set first IL
2. Set IL with very small size (one image with size 4x4 pix)
3. Set first IL again
?
One more question size of IL (16x16) are the same for both IL?
Is background masks are same for both IL? (RGB(255, 0, 255)) or ...
|
|
|
|
|
How do I add a tree control to the second or third tab of a tab control in c++?
Normality is a weakness...
|
|
|
|
|
Would it be safer for me to create a class derived from CWinThread and call my thread function in it instead of having a function to call in my main app?
If I leave my thread function in my main app and I wrap a call to a data variable from my main app in a critical section will that still stop other threads from touching that data variable until I unlock it?
One other thing. I have a pointer to an ADO object. the pointer was created in my main app. Since I'm passing a pointer to my dlg class I'm able to pass this object pointer also, to my thread. Can multipule threads use the smae pointer with out using critical section?
m_pConnection->Execute(_bstr_t(mySelect), NULL, NULL);<br />
mySelect is local to the thread function. So in my htread function I would have something like
<br />
myDlg->m_pConnection->Execute(_bstr_t(mySelect), NULL, NULL);<br />
Would this work?
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
I would be VERY careful about using a pointer to a DAO object or state from multiple threads without some synchronization. For exmaple, what would you expect to happen if all the threads want to 'open' a connection at the same time? If the class stores state information, then all threads are using the same connection, not separate connections any more. If you want them to all access the same database, you might need to be sure that onyl one of them is executing a query at any given time. This might defeat the entire purpose of having multiple threads anyways, and then you would have wished they all had their own separate objects.
|
|
|
|
|
DuplicateTokenEx has this in its remarks:
When you have finished using the new token, call the CloseHandle function to close the token handle.
Okay, so with the DuplicateToken, do you need to close the returned token handle from it as well?
|
|
|
|
|
Blake Miller wrote:
Okay, so with the DuplicateToken, do you need to close the returned token handle from it as well?
Seems so. Here's some sample code from MS (is written for .NET but using the Win32 API), in which CloseHandle is used on a handle returned by DuplicateToken ...
WindowsIdentity.Impersonate Method[^]
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|