|
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
|
|
|
|
|
Try introduction to Computer game Programming with DirectX 8.0 by Ian Parberry. Superb. (Working through it now).
Also check out the LARC website.
Cheers and have fun,
Wodger
|
|
|
|
|
Hi!
Well there is Nehe Production's webpage. There are lots of tutorials and game engines ( free ones with full source code ). And there is also some recommended books. Check the http://nehe.gamedev.net/ . It may have all you need! ( Well it has al I need!)
Bye!
|
|
|
|
|
I'm about to pull my hair out on dealing with Regex groups and captures.
From what I can tell groups are simply sub-matches - the ability to search within a match for something. I still can't figure out what captures withing groups are for.
However, here's the main problem for right now:
Assuming the following source string: A1 B2 CD D8 EF GH
If I use the pattern: ([A-Z])\\d
I get the A1 A B2 B D8 D
If I use an unnamed group: (?:[A-Z])\\d
I get the desired A1 B2 D8 results
Help!
Cheers,
Tom Archer, Inside C#
Mainstream is just a word for the way things always have been -- just a middle-of-the-road, tow-the-line thing; a front for the Man serving up the same warmed-over slop he did yesterday and expecting you to say, "Thank you sir, may I have another?"
|
|
|
|
|
If those are Perl regexes (and they look like it) then the () in the regex work for both grouping and saving of matched text. The (?: ) syntax is for grouping only. In your simple pattern, it won't (shouldn't) have any effect on what's matched. IOW, /[A-Z]\d/ matches exactly the same as /([A-Z])\d/
--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
|
|
|
|
|
Thanks Michael, but I finally figured it out. It's C++ using the .NET regexp classes. I'd post the resolution, but all my typing needs to be on the book. Right now I'm looking at trying to get to bed by 5 so I can get up at 10 and get two more chapter's edited by Monday morning.
Thanks again!
Cheers,
Tom Archer, Inside C#
Mainstream is just a word for the way things always have been -- just a middle-of-the-road, tow-the-line thing; a front for the Man serving up the same warmed-over slop he did yesterday and expecting you to say, "Thank you sir, may I have another?"
|
|
|
|
|
|
Very cool. I found the image for the cover btw
Cheers,
Tom Archer, Inside C#
Mainstream is just a word for the way things always have been -- just a middle-of-the-road, tow-the-line thing; a front for the Man serving up the same warmed-over slop he did yesterday and expecting you to say, "Thank you sir, may I have another?"
|
|
|
|
|
A new image?
So... if I was to say buy directly from you could I get a Tom Archer signed copy?
Regards,
Brian Dela
|
|
|
|
|
You know it!
Cheers,
Tom Archer, Inside C#
Mainstream is just a word for the way things always have been -- just a middle-of-the-road, tow-the-line thing; a front for the Man serving up the same warmed-over slop he did yesterday and expecting you to say, "Thank you sir, may I have another?"
|
|
|
|
|
Don't forget this now... You forgot about my signed copy of Inside C#!!!
When it's out I'll be expecting to have a place to order from... or I'll just send you the money
Regards,
Brian Dela
|
|
|
|
|
Hello, I'm new to Windows Application programming and I have a couple of questions. First, I'm wondering how do I check the value of a CHECKBOX? I setup the resource and I used an AUTOCHECKBOX for it, but I need to know if the value is checked or not. How do I go about that?
Also, I am trying to create a COMBOBOX that will display a list of directories that the user can select. What are the basic things I'll need to get that done?
Thanks.
-EDarkness
|
|
|
|