|
raner wrote:
Actually, why does it want to find the insert section for "AFX_MSG"?
MFC needs it for message mapping. Maybe you did not remove everything needed.
Actually, to derive a class from a CObject, you only need to add the class with the wizard, and say you want it to be derived from CObject.
~RaGE();
|
|
|
|
|
raner wrote:
Actually, why does it want to find the insert section for "AFX_MSG"?
Its a guess but:
Possibly becuase the CDocument object used the DECLARE_SERIAL() / IMPLEMENT_SERIAL() macros and you need to switch to DECLARE_DYNAMIC() / IMPLEMENT_DYNAMIC() ?
Roger Allen
Sonork 100.10016
This is a multiple choice question, choose wisely
Why did the hedgehog cross the road?
A: To show he had guts?
B: To see his flat mate?
|
|
|
|
|
i did not see the DECLARE_SERIAL() / IMPLEMENT_SERIAL() macros but i saw the DECLARE/IMPLEMENT_DYNCREATE macros pair...does it matter?
thks
|
|
|
|
|
a better question is: if you don't need message mapping, what do you need the CW for?
-c
Zzzzz...
|
|
|
|
|
actually i don't really need the class wizard for that class...but the error message appearing every time i activate the CW seem to mean that something is terribly wrong? So i thought if i don't fix it now, it's bound to give me problems someday?
was i wrong?
|
|
|
|
|
in that case, i think you were right to delete those sections. and, i think you should get rid of any //{{AFX_* comments in there (leave any delcarations, etc. - just get rid of the comment lines). those are all the places CW is scanning. also, you should delete the *.CLW file for your project, then re-run CW. hopefully, it won't try to re-parse your class.
-c
|
|
|
|
|
I'm using WM_MOUSEWHEEL message to provide zoom control in a window that has no scroll bars. Certain mice have an "enhanced scroll" option. If this is turned on, my window doesn't receive the WM_MOUSEWHEEL message at all (Spy doesn't show any messages when the wheel is turned). Other applications, such as IE, do receive the message (according to Spy). Any ideas?
-- Rubio
|
|
|
|
|
Essentially what I want to do is the samething that happens when you select "Window->Document Name" from the menu. I have a CView pointer to the View I want to activate.
Any help would be appreciated.
Thanks.
Eldon Zacek
Czech-Mate Enterprises, LLC
|
|
|
|
|
get the CView's associated frame (making sure it has one first) and then call ActivateFrame on the frame
- Roman -
|
|
|
|
|
Hello All,
I have previously developed a device driver for Windows NT 4.0. That was in 1999. I've since moved on to other projects. 4 years on now, I want to port my original WinNT device driver to Windows XP.
I'm wondering if thw Windows NT device driver source codes (written in C) can still be used in WinXP (usning WinXP DDK) ?
Has anyone done such porting before ?
Thanks, All,
Bio.
|
|
|
|
|
i am writing a windows app, so i know windows will always be installed , but i wont be gauranteed that its system path is c:\windows\system\
i need to programmatically find out the windows\system folder and drive on the o/s the app is running on so that i can put files into it via my code... is there an api call or easy way to pull that info from the sys???
thanks
todo....
:: insert inpirational text here ::
|
|
|
|
|
hi,
u can use
GetWindowsDirectory(...) [returns root:\windows dir] or
GetSystemDirectory(..) [returns root:\windows dir\system]
enjoy!!!!
<marquee>rishabhs<marquee>
|
|
|
|
|
U can use this function "GetSystemDirectory", this will return u the system directory on windows.
|
|
|
|
|
thanks
todo....
:: insert inpirational text here ::
|
|
|
|
|
dear all,
how can i pass CString objects in API functions which expect:-
LPCTSTR
LPCWSTR
LPCTSTR
LPTSTR -> is there any other way than CString::GetBuffer
LPWSTR
PCSTR
thanx
|
|
|
|
|
Where you want a wide string, use _bstr_t, the constructor builds an object which contains both a wide and narrow string, with operators for both. That may well work for all the things you list. I think it's defined in comdef.h, or somesuch.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
thanx Christian,
but can u illustrate some example for such conversions
|
|
|
|
|
basically, if a function needs one of those things, and you have a CSTring called s, do this
myfunc(_bstr_t(s));
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
thanx Christian for the help!
but is the method safe and effective?
|
|
|
|
|
rishabhs wrote:
but is the method safe and effective?
Gosh you're a worry wart !!!
Yes, it's fine. The constructor builds a class, that class passes the required result to the function and on return the class destructor cleans up after itself. Windows is full of string conversion routines, but I find the _bstr_t method nice and easy.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Aint you wasting your time a little bit, trying to explain details when you know Dunn did a couple tutorials about it ? When you know how recurrent these posts about strings are, that's a complete shame each person posting in the VC++ forum is not offered a poll before they really get to the posting form, and that would go like this :
- question 1 : is your question about strings (translate that one to indian too) ?
If answer is yes, throw the Dunn tutorials to his head.
Otherwise,
- question 2 : are you sure your question is not related to characters or the CString class ? (please note the irony )
- question 3 : in case your question has to do with a LPSTR topic or something like that, then please consider looking those articles : 1[^] and 2[^].
|
|
|
|
|
thanx .S.Rod. for the hammering!
i had no knowledge about the tutorials, that's why i thought i could get some helping hand in the forum.
anyways thanx for the links u've shown me! i think they'll help my cause.
i think u were sarcastic in the reply!
i could'nt understand some of the remarks!
thanx
|
|
|
|
|
rishabhs wrote:
thanx .S.Rod. for the hammering!
This is a reply to the grausian answer to your post. I have made a reply for you just below.
|
|
|
|
|
sorry rod!
those articles were really helpful,
but still i think u were rude!
|
|
|
|
|
Good point, I must admit I forget about those as well.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|