|
It it Hungarian notation to have all classes begin with a capital 'C'. VC interpret 'Custumer' as 'ustumer'. You could use 'CCustomer' or define your class whitout using the class-wizard.
/moliate
|
|
|
|
|
I don't know if it's Hungarian Notation, but i'm pretty sure that style was dropped with C++.
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Starting class names with C was dropped? Heh, not by a LONGSHOT. Sure, the standard doesn't use that convention, but MS and others having been using long before STL was a glimmer in people's eyes.
And yes, dropping the capitial C from the start of the file name is a ... feature. Annoying if that isn't want you want. However, when creating a new class, you can specify the file names.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
I never said starting classes with a C was dropped...read again!
I said It wasn't part of hungarian notation...
you know lpsz - long pointer to zero termintaed string
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Just TAB into the filename edit boxes and change the filenames there.
--Mike--
"There are only a limited number of jobs where they will ask to see the sausage. Most of them are in movies."
-- Christian Graus, 2/11/2002
My really out-of-date homepage
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
What is the best way to convert
1. points to pixels?
2. cm to pixels?
|
|
|
|
|
explanation in MFC, and from memory. take with large pinch of salt
Given a CDC* pDC , an integer specifying points pt , and another integer specifying centimeters cm :- points to pixels
- cm to pixels (explained above already)
int px = cm*1000;
CSize size(px,px);
pDC->HIMETRICtoDP(&size);
*** note: see documentation for HIMETRICtoDP: in MM_TEXT mapping mode, the measurements gained from this only reflect physical measurements when the ratio of logical coordinates to physical coordinates is 1/1. Not sure when this would matter though.
farewell goodnight last one out turn out the lights Smashing Pumpkins, Tales of a Scorched Earth
|
|
|
|
|
Battleaxe Document Explorer was posted sometime ago, but my bookmark fails.
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan.
|
|
|
|
|
I've been trying to do this for days.
Anyone have a clue for me?
Thank you
-Julie
|
|
|
|
|
I could tell you. But i enjoy watching others squirm.
Just kidding...
I think your referring to IWebBrowser2, C is for classes I is for Interfaces...slight difference.
Anywho...
You have to implement IDocHostUIHandler::ShowContextMenu
By returning S_OK you prevent IE (webbrowser control) from displaying it's default menu. returning S_FALSE allows default behavior.
Basically I think you'd just do your stuff (create menu) and return S_OK
Cheers
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Ok. I'm writing a 2 pass assembler (for a class). Here's an annotated version of the base class...
class Asm
{
public:
Asm();
~Asm();
protected:
static HashTable symbolTable;
};
When I derive a class from Asm I get a linking error telling me that HashTable is unresolve. If I remove the static keyword it links fine.
1. So I'm guessing I can't have a static member in a base class because theres a possibility that the bass class will never be created. Is that right?
2. If this is the case then how do I share the symbol table between my derived classes, Pass1 and Pass2?
nay
|
|
|
|
|
nay wrote:
static HashTable symbolTable;
You have to initialize the HashTable just after your class definition by invoking its constructor maybe like
HashTable Asm::symbolTable();
This will be shared by all the instances of your Asm object.
Atul
Sonork 100.13714 netdiva
|
|
|
|
|
AAAHHHH... thank you very much. I initialized it in my cpp file like this...
HashTable Asm::symbolTable
thanks!
nay
|
|
|
|
|
Hi.
I started an MFC sample program that Prosise include in his book. I would like to save the source code, but not the enter project. Note that I started the project using AppWizard.
What files do I have to save from the project so I can always open that project up again? Do I have to save the entire probject including Debug? I have not save and/or remove any files yet because I do not work to lose any resource files.
Thanks,
Kuphryn
|
|
|
|
|
Delete the [debug] and [release] folders and back up the rest of the files into a zip.
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
|
You do not the .ncb, .opt, .plg, .aps, or .clw either. All of these are re-generatable.
I wish some of the article writers here were aware of this.
|
|
|
|
|
The boolean variable in 4.2 is an integer(4 bytes)while
on 6.0 it is a character. If I have files stored on VC++ 4.2 and I want to retreive them with a version compiled on 6.0 Wouldn't I have a problem? Did microd=soft take care of this problem somehow?
Louis Norman
|
|
|
|
|
LouThePu wrote:
If I have files stored on VC++ 4.2 and I want to retreive them with a version compiled on 6.0 Wouldn't I have a problem?
Yep, you should defintely experience problems. A quick-n-dirty workaround is to define bool to int in your stdafx.h.
#define bool int
Regards,
Alvaro
Behind a beautiful woman there's usually a guy who just couldn't wait to get rid of her.
|
|
|
|
|
Hey, I've created an ATL object in a .dll, and i am trying to call the function dynamically. How do i need to setup my functions to get them to not give back crappy values (my BSTR="?????????????????????????????")
i tried __stdcall or _export but nothing is working. i also have "ByVal" for the parameter in my function definition in the VB section.
~Timothy T. Rymer
www.digipen.edu
tim.xpertz.com
|
|
|
|
|
Is the ATL object a COM object, if so then you simply need to declare your class inside of the type library that is created in your idl file of your project.
Then you can go to the Project | references menu item in your VB project in order to reference your COM object. From there you can use that object in VB just like any other object.
If you are actually exporting an object like you say rather than a function, you would need to instantiate an instance of this object before it can be used, and I do not know of a way to use a C++ object in VB except through COM. If this is what is happening, I am surprised that your program is not crashing.
|
|
|
|
|
Hi,
I have a CListBox derived class. I created a context menu which sends a WM_COPY message. I handle this message and copy stuff to clipboard, works fine.
How can I add a CTRL+C key functionality to my class? Pointing me to the right direction would be fine! Well, do I need to create this WM_COPY message by myself (via PreTranslateMessage()) or do I request it somehow?
Thx, Moak
PS: Btw, what is the difference between using ON_MESSAGE() macro or ON_COMMAND() in the MESSAGE_MAP?
|
|
|
|
|
This can be done with a type of resources called accelerators. Go to the resource editor and create a new "Accelerator" object. From here on everything should be clear enough.
As for the difference between ON_MESSAGE and ON_COMMAND , the latter is provided to deal with the special message WM_COMMAND , which can be regarded as comprising many "submessages" (one for each command identifier).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thx, will do!
I just wonder that my CEdit control gets a WM_COPY message, while my CListBox does not (I used the C++ spy to trace messages). Well, is there something special on a edit control that it gets a WM_COPY "for free"? I would like to generate those standard "accelerators" dynamically... I mean when I use a instance of my CListBox class it should automatically handle CTRL+C and not rely on a manual resource entry. Comfort is what I seek.
Greets, Moak
|
|
|
|
|
I would like to generate those standard "accelerators" dynamically...
I see. Well, then maybe accelerators are not the best solution. Another solution that does not require the user of your class to do any extra work is: handle WM_KEYDOWN , check for the CTRL+C code and send the WM_COPY command when appropriate.
As for the code for CTRL-C, I don't know it right off the top of my hat, but you can just write some OutputDebugString or something in your OnKeyDown to find it out.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|