|
I am developing a chm help file tool, so I need a specification for .chm file, but I cannot find it in microsoft.com, any help?
Thanks!
|
|
|
|
|
What is the purpose of the .chm file? Is is specific to a particular program or something? That info sure would help me help you....
-Reid the C++/C# programmer
(Caution: I am a teenager, and that means that I think I know everything...but probably don't...)
Maybe this will help you understand:
CPerson Reid = "Teenager";
CPerson All_C_Programmers[9999999999];
int i;
int num_Programmers_That_Are_Teenagers = 0;
for (i=0;i<9999999999;i++)
{
if (All_C_Programmers[i]=="Teenager")
{
num_Programmers_That_Are_Teenagers++;
}
}
cout << num_Programmers_That_Are_Teenagers;
-------------
1 <------
|
|
|
|
|
how can i learn visual c++ in ashort way or in the long way
but not in along time.where can i get exampels an stuff?
thank you for your help
itai
|
|
|
|
|
This is bad, bad advice. Some of the books mentioned are good books, but no-one, repeat no-one should EVER set out to learn programming Windows without learning C++. In fact the Visual C++ in 21 days is a very simple book, it was my second. The reason I grasped it easily and this person obviously did not is not my stunning intellect ( ask anyone who has met me ), it's because my first book was C++ in 24 hours. Forget windows, menus and everything else until you know enough C++ to write a linked list, populate it from command line input and write it to a file. Once you know some C++, then you'll know half of the stuff in the Visual C++ book, and you'll be able to concentrate on the other half.
C++ is a language created by Bjarne Stroustrup, which amonst other things added classes to the C language. The C++ language does not know about MFC, you can write Windows programs in C++ without using C++, but MFC is a class library that *does* simplify Windows programming.
I'd also recommend buying books instead of downloading them - it takes forever and in the end they are not practical. The books I downloaded early on I either did not use, or I bought.
Christian
#include "std_disclaimer.h"
The careful application of terror is also a form of communication.
Eagles may soar, but weasels don't get sucked into jet engines.
|
|
|
|
|
Thank you
You look very boring ...
AHMAD ALWASHALI
|
|
|
|
|
I'm sorry if you took my comment personally, but your advice *was* bad, and I'm also sorry that you think learning to program properly sounds 'boring'.
Christian
#include "std_disclaimer.h"
The careful application of terror is also a form of communication.
Eagles may soar, but weasels don't get sucked into jet engines.
|
|
|
|
|
I was wondering in terms of efficiency, what is the best way of passing strings and arrays around? What is the penalty one incurs when passing a CString as a opposed to a CString * or when you simply pass by reference?
|
|
|
|
|
If a function takes a CString, a call to the copy constructor is made since the function gets its own copy of the parameter. Passing a CString* or CString& avoids this.
The CString copy constructor is quick (it just increases the string's reference count) but that's not always the case with all classes. If the function is going to just read the string, make the parameter a const CString&, which is best semantically and speed-wise.
--Mike--
http://home.inreach.com/mdunn/
"Make sure that if you are using a blow torch that you don't set anything on fire."
-- Chris Maunder
|
|
|
|
|
does anyone know how to open up a serial port under NT?
i have had no problems with it under 98, but whenever i attempt to get it to work under NT nothing seems to happen...
Nik V
|
|
|
|
|
There's no fundamental difference between both OSs when it comes to opening serial ports. This should open up "COM1"
HANDLE hCOM1=CreateFile("COM1", GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Ever since I have been using Windows ME, Most MFC apps I create that use Docs do not have the familiar "Untitled" on the titlebar. What I get is this: "____- Appname". Also, many message boxes have only "____" instead of actual text. Common dialogs like the SaveAs dlg will often have "_______" in the titlebar. I have noticed this in other programs that I did not code. MS Paint comes to mind.
Has anyone else experienced this?
Steve
|
|
|
|
|
You know, I think Ive seen error messages come up as "______- Appname" in Win ME, but havent had the time to find out why.
Its probably something really basic that Im missing.
|
|
|
|
|
How can I get a CListCrtl Item into, say, a CString when it is clicked?
Thanks.
Richard
|
|
|
|
|
When you assign the CListCtrl a variable in the Class Wizard, make sure you assign a variable to the control, and the value...Cumon, you know what im talking about... when you assign the CListCtrl's control ID a variable, it asks for a name: m_?????
then a catagory (in a combo box): Control <----select VALUE here
then for a type (in a combo box): CListCtrl (or whatever)<---select CString here
-Reid the C++/C# programmer
(Caution: I am a teenager, and that means that I think I know everything...but probably don't...)
Maybe this will help you understand:
CPerson Reid = "Teenager";
CPerson All_C_Programmers[9999999999];
int i;
int num_Programmers_That_Are_Teenagers = 0;
for (i=0;i<9999999999;i++)
{
if (All_C_Programmers[i]=="Teenager")
{
num_Programmers_That_Are_Teenagers++;
}
}
cout << num_Programmers_That_Are_Teenagers;
-------------
1 <------
|
|
|
|
|
Not true. I am a teenager too.
-Matt Newman
|
|
|
|
|
The fool who considers himself wise is a fool indeed.
|
|
|
|
|
You can either handle the WM_LBUTTONDOWN message in the List-View and use the folowing to get the item's text;
int nItem = GetNextItem ( -1, LVNI_SELECTED | LVNI_FOCUSED );<br />
CString sItemText = GetItemText ( nItem, 0 );
Or you can handle the List-View's NM_CLICK notification and grab the text as above, using the index given in the NMITEMACTIVATE structure.
-Ben
---------
On the topic of code with no error handling -- It's not poor coding, it's "optimistic"
|
|
|
|
|
Hi,
What I am looking to do is create my own bitmap, out of 2 existing bitmaps. Drawing one half way over another.
Can anyone give me a quick overview of the best way to do this.
Cheers
Richard
|
|
|
|
|
By half way do you mean half way along, or alphablended ? If the former, then just draw it on where you want it. If the latter, then you need to access the bits and alphablend them together. GDI+ is the easiest way to do this ( see my articles ) otherwise you need to create DIBSection's, so you can access the bits directly. The issue of CUJ on the wewbsite has code online for a tech tip that shows how to do this. There is also a DIBSection wrapper here on the site.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
Hi all,
I need to update the statusbar text of an SDI app. from within multiple views created using a splitter. How do I do this? The statusbar is instantiated in the mainframe (CMainFrame), and I don't appear to be able to access it. It would be nice to create a document level function that could set the statusbar text so that from each of my views I could do something like GetDocument().SetStatusBarText("Hello");
Any ideas??
TIA
Jonathan Thorpe
|
|
|
|
|
CStatusBar* CMainFrame::GetStatusBar()
{
return &m_wndStatusBar;
} Now you have access to it. CMainFrame is accessible anywhere; call AfxGetMainWnd() and cast the return to a CMainFrame*
--Mike--
http://home.inreach.com/mdunn/
"Make sure that if you are using a blow torch that you don't set anything on fire."
-- Chris Maunder
|
|
|
|
|
I have a class that docks resizable dialogbars,.. but I have a problem saving the state and loading it. The states are actually save/load correctly but because my dialogbars are dynamic, by this I mean that if I start the application then there might only be 3 dialogbars and next time prehaps only 10 or 1 or whatever...
The LoadBarState crashes when I do this,.. does anybody know that MFC internal code does to save the dialogbar states,.. prehaps saving and loading it myself might work better... but I can't see what the internal values are?
anybody.
Peter Marino ( IO Interactive )
|
|
|
|
|
The way I got around this was to create the dialogbars myself (using new) BEFORE calling LoadBarState. That way, you don't rely on the framework to create them for you. This assumes, though, that the dialogbars you want to open on launch of your app are the ones that were open when you last shut it down.
Let me know if you need any more help.
|
|
|
|
|
That's my main problem,.. all my dialogbars are created via plugins,.. and I can't assume that all users will have the same number or even the same plugins when they start the application. So I need a general way of positioning the dialogbars on startup.
For example if a user has dialog A,B,C. And next time he starts he has dialogbar A and D. Then dialogbar A should have the same position as last time, and because dialog D is new it should be set to floating. The main problem is that LoadBarState is expecting the same number of dialogs and that the dialogbars have the same ID. Because the plugins are dynamic then all dialogbars are given different ID numbers at startup.
I hope this makes it clearer.,
Peter Marino ( IO Interactive )
|
|
|
|
|
Damnit! I just typed out this whole response to you, and Explorer ate it. Frigging microsoft...
Anyways, here's the gist of what i typed:
I can tell that my app will be heading down this exact same path, so I hope we find an answer to this question together.
I think that Load/SaveBarState info is all contextual info, meaning, the info is based on the dialogbars docked position/size relative to (in the context of) all the other docked dialogbars and toolbars, so I don't think LoadBarState will ever be able to work for you under these circumstances.
Even if you get around that, you'll still have to figure out a way to get LoadBarState to ignore (i.e. not create) dialog bars for which the user doesn't have a dll for.
There is a method on CFrameWnd called GetDockState which fills a CDockState object. You might try calling that to see what you can find.
But, I think your best bet is to do the loading/saving of docking info yourself, and use a couple of undocumented public methods on CControlBar:
void GetBarInfo(CControlBarInfo* pInfo);
void SetBarInfo(CControlBarInfo* pInfo, CFrameWnd* pFrameWnd);
browse the MFC source code to see how these work. They are declared in the header AFXEXT.H, and CControlBarInfo is defined in AFXPRIV.H, as are a couple of other useful classes.
Let me know what you find!
D
|
|
|
|