|
Hi,
thanks for the help,
i have a question: how do i know it is Debug mode, i saw in your code:
// work out if this is a debub build
BOOL bDebug = (BOOL) _tcsstr((const char*)outOpts, _T("Debug"));
where do you get the outOpts???
thanks
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Sorry, that's the problem with cut and paste from bigger projects.
BSTR outOpts1;
pConfig->get_Name(&outOpts1);
_bstr_t outOpts(outOpts1,true);
BOOL bDebug = (BOOL) _tcsstr((const char*)outOpts, _T("Debug"));
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Thanks man! you are my guru in AppWizards
i want to ask you an other question, maybe you can help:
now that my appwizard is finished, i want by right click on one of my classes to do something (same as i right click on the project and i have a popup menu with the item 'New Class'....) what i want to do is to add my own entry to the popup menu......
can u show me sample code on how to do that please?
thanks again man
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Not sure exactly - it's not something I've needed to do, but perhaps rather than AppWizard functionality you could you use a Developer Studio Add-in.
The link below is a new article, it's slightly different to what you want but it might get you going with Add-ins.
VCGenie[^]
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
thanks again man!
i am reading this site now as i write this reply.....
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Hi,
well, it turned out it wasn't exactly what i needed.
it adds a tool-bar add-in........ i am looking for right click item menu add-in....
can you help?
thanks again
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Hi all,
I've created my own custome appwizard, the wizard produces a COM dll.i've placed all the template files propely.
now when i use the wizard, all the files are being generated.
when i compile my new created project, it compiles it as if it was an exe project and not a dll project.....
can any1 help me? what do i need to change in the project-->settings so it would become a COM dll project and would compile as one...?
thanks in advanced,
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
in VC6 make sure that in the InitCustomAppWiz() method in the <yourProject>Aw.cpp file that the correct project type is specified. If a DLL is not being built you may need to change PROJTYPE_CON (or similar) to PROJTYPE_DLL.
m_Dictionary[_T("PROJTYPE_DLL")] = _T("1");
This is one of those annoying little problems that I have trouble with every time I have to write a custom AppWizard, hope I've helped
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Thanks man for the help, it works!
damn, not much good help around the MSDN for the custom app wizard......
thanks again
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Hey,
How can i change the background color of CEditBox and any other CDialog and is title color?
Thanks
Yaniv
|
|
|
|
|
Have a look at the WM_CTLCOLOR message. You'll have to handle it in your dialog class and return a brush to draw the background of the edit control with.
You can also use WM_CTLCOLOR to change the background of the dialog - have a look at the docs as I can't remember exactly how to.
To change the title bar colour, have a look at one of the (many) articles here on CP about drawing custom title bars, as it's too involved to put here.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
You need to handle CTLCOLOR messages. I have a CColourEdit box class I wrote a while back. I can email it to you tomorrow if you want [I'm not in work now].
It has all the SetBkColour(), SetTxtBkColour(), SetTxtColour() methods and a few more. If your interested let me know [drop me an email - click the email button at the bottom of this post] and I'll email it on to you.
Regards,
Brian Dela
|
|
|
|
|
how can i dynamic control net connection login/shutdown by code!
ZHANGYIFEI
|
|
|
|
|
try InternetCheckConnection and InternetDial
Yaniv
|
|
|
|
|
how about LAN ?
ZHANGYIFEI
|
|
|
|
|
I need help with adding a view(s) to the document view list.
I know that CDocument::AddView() will add the view to the view list. The CView::OnCreate() is suppose to call the AddView(), but I don't have an OnCreate, I have Create() in my SecondView class. My FirstView does get adding to the view list. There is a difference in my second view (SecondView) than in my first view (FirstView). FirstView uses a PreCreateWindow(cs) method and my SecondView uses a Create(...) method. In the PreCreateWindow(cs) method, CListView::PreCreateWindow(cs) is called. In my Create method the first few lines of code is
if (!CWnd::Create(lpszClassName, lpszWindowName, dwStyle | WS_CLIPCHILDREN,
rect, pParentWnd, nID, pContext))
{
return FALSE;
}
it does not call the base class CFormView::Create(...), I have tried that and got an error.
In my CWinApp derived class I have the method
LoadFrames(){
m_pSecondView->OpenDocumentFile(NULL);
m_pFirstView->OpenDocumentFile(NULL);
}
m_pSecondView and m_pFirstView are CMultiDocTemplate* type.
When I use the following in another method in my CWinApp derived class
pos = m_pSecondView->GetFirstDocPosition();
pDoc = m_pSeconView->GetNextDoc(pos);
pDoc will equal the correct class (CMyDoc)
However, in my CMyDoc file
pos = pDoc->GetFirstViewPosition();
CView* prog;
while(pos != NULL)
{
prog = pDoc->GetNextView(pos);
if(prog->IsKindOf(RUNTIME_CLASS(CSecondView)))
((CSecondView*)prog)->Method(m_nVar);
}
The only view prog ever get populated with is CFirstView.
Also in my CWinApp derived class, I use the line
CDocument* pDoc = pChild->GetActiveDocument();
and found out (when pChild = CSecondFrame [see next paragraph]) pDoc will be set to NULL 0x000000.
If it is important I have defined the CMultiDocTemplate pointers as such
m_pFirstView = new CMultiDocTemplate(IDR_FIRSTTYPE,
RUNTIME_CLASS(CMyDoc),
RUNTIME_CLASS(CChildFrame),
RUNTIME_CLASS(CFirstView));
AddDocTemplate(m_pFirstView);
m_pSecondView = new CMultiDocTemplate(IDR_SECONDTYPE,
RUNTIME_CLASS(CMYDoc),
RUNTIME_CLASS(CSecondFrame),
RUNTIME_CLASS(CSecondView));
AddDocTemplate(m_pSecondView);
as you will notice, two different frames and IDRs are used. I don't believe that should make a difference in regards to the CMyDoc class, but I am writing all that could be revelant.
The information that I need is, how do I get my SecondView associated in the view list of my MyDoc class.
Thank you for any help.
|
|
|
|
|
i am making a project, and i have to program the appearance for a code test software.
i like to make the appearance like virtual c++ 6.0.
i think vc++6.0 must be a MDI document. And its mainframe must have a CSplitterWnd member. And the CSplitterWnd member's pane maybe a class derived from CChildFrame.
is it right?
and how can i make the appearance like VC++6.0?
|
|
|
|
|
Using Visual C++, I was trying to create the final .exe stand alone file of my C++ program but I don't see how to do it. I see where it says to "build" a release version, but where do I obtain the .exe to distribute? I tried to save, but ti only saved the compile text file.
Thanks, Dave
|
|
|
|
|
In the Build toolbar (assuming you have it turned on) there's a combo box that says "win32 debug". Change that to "Win32 release" and build.
(This is for VC6; I assume there's a similar toolbar in 7)
--Mike--
"So where does that leave us? Well, it leaves us right back where we started, only more confused than before." -- Matt Gullett
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|
|
I did build the program in the release mode, but where does the final .exe application end up? I looked under "my Projects" but nothing is there. How do I save the final program so I can give the program to someone else? Does VC++ allow you to create a stand alone program?
Thanks, Dave
|
|
|
|
|
In your project folder, there will be a folder called "Release". In that folder will be the .exe the compiler created. If you don't know where your project folder is, you'll have to find it.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Does the ED mean educational version?
In the full version there are Debug and Release directories under the directory your source code is in and that's where the EXEs are found.
I really don't know if the educational version builds an EXE or not... and don't that this the wrong way, but you could use the Windows SEARCH to try to find the .EXE file.
|
|
|
|
|
Please, I would like to know how to translate a code
from Delphi to C.
If somewone can help, please do...
The code in Delphi is:
-if ch in['a'..'z'] then ... ,and
-if ch in ['a'..'z','0'..'9']then ...
where ch is a char variable
Thanks
raven2003
|
|
|
|
|
One way is to use underlying knowledge of the ASCII tables and you might get an expression like this.
if( ((ch > 'a') && (ch < 'z')) ||((ch > '0') && (ch < '9')) )
&& = logical AND in C++
|| = logical OR in C++
But it's probably better to use the isalnum() function which is declared in ctype.h or cctype, which takes into account upper and lower cases. A unicode version should also be available.
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Hi,
I'm new to C++ programming for the most part, but I've done quite a bit of basics reading on C++. I and my 13 years old son have tinkered with the free Genesis 3D graphics engine off and on for a couple years, but never get beyond the code. I'm trying to learn C++ on my own
(it appears to be the way to go for serious games, no?). I have a basic grasp of OOP, but implementing it is another story. Genesis 3D is nice, but very little learning information is available with it (your basically on your own). I have a few question:
1. Would anyone recommend a better game engine which has plenty of tutorials and advanced detailed help available?
2. Are there any Visual C++ books/videos available for making games? (step-by-step). There's lots of books explaining lots of things, but I am looking for a book(s)which take you step by step through a really decent program (a program you'd be happy to share with someone). The tutorials I've seen are really basic stuff, are there tutorials for fully operational advanced programs (games in particular). I'd appreciate any handy-dandy pointers here.
3. What exactly is a .dsw file? Is it exclusive to VC++? I click on it to start up a Genesis 3D demo in VC++, does this load all the workspace files? Which file normally has the MAIN() function? I'm more familiar with websites and HTML, so I'm looking for something like an "index" page in C++. Is there a main page in C++ where everything centers around, like the index page of a website?
Thanks, Dave
|
|
|
|