|
Are you using spanning?
Normally PKZIP labels the media it uses as it progresses.
Steve S
|
|
|
|
|
yes i use -span indeed
can i send you a print screen of the error to your email address if your willing to give it to me ?
Greetings
Jens
|
|
|
|
|
No point. The error message is concise and accurate, and unless it displays an error code wouldn't give me any more information.
How are you exec-ing PKZIP from within your app?
(Source more useful than a screen dump;))
Steve S
|
|
|
|
|
GURU's only!
I have a class "hidden" inside my main class, a kind of inner class if U like.
class a : public CObject<br />
{<br />
DECLARE_DYNCREATE(a)<br />
public:<br />
a();<br />
<br />
class b : public CObject<br />
{<br />
DECLARE_DYNCREATE(b)<br />
public:<br />
b();<br />
};<br />
};<br />
But the IMPLEMENT_DYNAMIC macro expansion baffles the compiller's brain
<br />
IMPLEMENT_DYNCREATE(a, CObject)<br />
IMPLEMENT_DYNCREATE(b, CObject)<br />
with the following messages:
error C2653: 'b' : is not a class or namespace name
error C2061: syntax error : identifier 'b'
I have tried everything but write my own body for CreateObject() so I can get runtime class info, doing
IMPLEMENT_DYNCREATE(a::b, CObject)<br />
Seems logical, but does not hel, since a is nit a namespace or so the compiller says.
Conrad - conradb@adroit.co.za
Always do badly to start off, that way when you get the hang of it suddenly, everyone is surprised.
|
|
|
|
|
I have since tried.....
<br />
typedef a::b NestedBase;<br />
<br />
IMPLEMENT_DYNCREATE(a, CObject)<br />
<br />
#define MYRUNTIME_CLASS(class_name) ((CRuntimeClass*)&a::b::b())<br />
<br />
#ifdef _AFXDLL<br />
<br />
#define MY_IMPLEMENT_RUNTIMECLASS(class_name, base_class_name, wSchema, pfnNew) \<br />
CRuntimeClass* PASCAL class_name::_GetBaseClass() \<br />
{ return RUNTIME_CLASS(base_class_name); } \<br />
CRuntimeClass* class_name::GetRuntimeClass() const \<br />
{ return MYRUNTIME_CLASS(class_name); } <br />
<br />
#else<br />
#define MY_IMPLEMENT_RUNTIMECLASS(class_name, base_class_name, wSchema, pfnNew) \<br />
CRuntimeClass* PASCAL class_name::_GetBaseClass() \<br />
{ return RUNTIME_CLASS(base_class_name); } \<br />
CRuntimeClass* class_name::GetRuntimeClass() const \<br />
{ return MYRUNTIME_CLASS(class_name); } <br />
<br />
#endif<br />
<br />
<br />
#define MYIMPLEMENT_DYNCREATE(class_name, base_class_name) \<br />
CObject* PASCAL class_name::CreateObject() \<br />
{ return new class_name; } \<br />
MY_IMPLEMENT_RUNTIMECLASS(class_name, base_class_name, 0xFFFF, \<br />
class_name::CreateObject)<br />
<br />
<br />
<br />
MYIMPLEMENT_DYNCREATE(NestedBase, CObject) <br />
...
but to no avail, since I cannot get the last bit of my MY_IMPLEMENT_RUNTIMECLASS macro to work (commented out)
hELP hELP HeLP HElp.
Conrad - conradb@adroit.co.za
Always do badly to start off, that way when you get the hang of it suddenly, everyone is surprised.
|
|
|
|
|
I have a list control with LVS_EX_HEADERDRAGDROP property.
Which Window Message or Control Notification Message is related when there is a change detected in HEADER order? OnColumnClick doesnt handle.
Thanks in advance
|
|
|
|
|
Hai
i would like to know how to write a CString object into file;
Please help me!!
Thanks
JP
|
|
|
|
|
You can use MFC serialization or you can do it directly using MFCC File object
CFile myFile('test.dat', CFile::modeWrite);
CString buff;
buff = "This is some text";
myFile.Write(buff, buff.GetLength());
p.s- you can also use Windows SDK functions or the CRT functions so your code works on all platforms (most anyways)
HTH
Cheers
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
hi
Thanks for ur reply.Did u check this code,since it is not working.
Thanks
JP
|
|
|
|
|
Typically code I write here on CP is psuedo code, just to get you started on the right direction, I hardly never test code.
try this instead:
CFile myFile('test.dat', CFile::modeWrite);
CString buff;
buff = "This is some text";
myFile.Write(buff.GetBuffer(buff.GetLength()), buff.GetLength());
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
Try to write like this!
CFile myFile('test.dat', CFile::modeWrite);<br />
CString buff;<br />
buff = "This is some text";<br />
myFile.Write(str.operator LPCTSTR(),buff.GetLength());
Abhishek Srivastava
Software Engineer (VC++)
India ,Noida
Mobile no 9891492921
|
|
|
|
|
hi
Thanks for ur solution!!
But if u use above code..it is not giving any error while executing..but this writes our data with some junk value...So we can't retrieve it properly.
Cheers
JP
|
|
|
|
|
I developed a drawing application which draws colored rectangles,circles etc...when i place one object on other i need to see the beneath object and must change the transparency level from full transparent to opaque with the same color of the object...how can i do it...?
|
|
|
|
|
AlphaBlend() API or you will have to write you own or find pre-written code to do it for you.
There is probably something available here on CP under bitmap section if you look hard.
Cheers
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
I see this function in almost all wizard generated code and (maybe I'm a fool for asking), but what does this function do? I see the comments that say "The system calls this function to obtain the cursor to display while the user drags the minimized window". I've been using Windows for a while, but I've yet to be able to "drag" a minimized window. I'm thinking that a "minimized window" is one that's been minimized to the taskbar, and if that's correct how do you drag it?
Thanks.
- monrobot13
|
|
|
|
|
Left-overs from Windows 3.x. Basically irrelevant now, I believe.
|
|
|
|
|
Before Win 95, there was no Taskbar. Minimized apps became icons at the bottom of the screen, and you could move them around if you felt like it. WM_QUERYDRAGICON was sent when you started to drag an icon.
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | 1ClickPicGrabber New v2.0.1! | RightClick-Encrypt
"Linux is good. It can do no wrong. It is open source so must be right. It has penguins. I want to eat your brain."
-- Paul Watson, Linux Zombie
|
|
|
|
|
Ah, that would explain it. Would it be safe to remove the function then if I know for a fact that application wont be run on anything below Windows 95?
Thanks.
- monrobot13
|
|
|
|
|
|
Awesome. Thanks for the help Mike.
- monrobot13
|
|
|
|
|
Hi !
I've a class CModel containing a list a CPlane objects. The CPlane class has a method called changeOrigin(). The third class CModelViewer is a class displaying the CModel object as a treelist : the CModel object is displayed and the user can expand the CModel and see the list of CPlane contained in the CModel. When the user right-click on a CPlane, he/she can change the origin of the CPlane.
My question is, according to good design rules, how am I supposed to change the origin of the selected CPlane ? Should I change it in the CModelViewer, directly calling the changeOrigin() method of CPlane (but with this way, CModel won't know than one of its CPlane has changed), or should I implement a changePlaneOrigin() in the CModel class, call it from CModelViewer and let CModel change the origin of it's underlying CPlane ? (but with this way, each time I add a method in the CPlane class which would change the state of the CPlane object, I would have to add it in the CModel as well).
I hope I made myself clear enough and I'm looking forward to reading your suggestions !
Thanks !
Jerome
PS: Here is how the class would look :
class CModel
{
public:
CModel();
~CModel();
CPlane[10] m_PlaneList;
};
class CPlane
{
public:
CPlane();
~CPlane();
void setOrigin(Position NewOrigin);
private:
Position m_Origin;
};
|
|
|
|
|
If CModelViewer is a view for the CModel class it would be a good idea to do call a change method of CModel. In general it's not a good idea to make the CPlane array public in the CModel class.
An other solution may be that CPlane has also a view, e.g. CPlaneView. This view (and controller) would be a knot (item) in you CModelViewTree. Of course with this simple implementation CModel won't be informed if one of its CPlane objects changed. You may want to use the observer design pattern to inform CModel that a CPlane object has been changed.
|
|
|
|
|
I am trying to have the cross cursor apear when you press down the control key. In the MSDN it says that message controls the mouse message number. When I run this code it does not recignise the key.
BOOL CClusterSimulationView::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)<br />
{<br />
if (message == MK_CONTROL)<br />
{<br />
hCursor = LoadCursor(NULL, IDC_CROSS);<br />
SetCursor(hCursor);<br />
}<br />
else<br />
{<br />
hCursor = LoadCursor(NULL, IDC_ARROW);<br />
SetCursor(hCursor);<br />
}<br />
return true;<br />
}
|
|
|
|
|
This works fine;
[code]
BOOL m_Cntrl = FALSE;
BOOL CtestView::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
if (m_Cntrl)
{
::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_CROSS));
return true;
}
else
{
return CScrollView::OnSetCursor(pWnd, nHitTest, message);
}
}
void CtestView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
if(nChar == VK_CONTROL){
m_Cntrl = TRUE;
}
CScrollView::OnKeyDown(nChar, nRepCnt, nFlags);
}
void CtestView::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags)
{
if(nChar == VK_CONTROL){
m_Cntrl = FALSE;
}
CScrollView::OnKeyUp(nChar, nRepCnt, nFlags);
}
[/code]
|
|
|
|
|
can somebody give me the link to the latest Device development kit (DDK) for NT or win9X
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|