Link to home
Start Free TrialLog in
Avatar of RichJackson
RichJackson

asked on

Varible Naming Conventions

Hi,

Does anyone no where i can find a reference varible naming conventions? for VC and Windows programming?

What are the following varibles ?

*SzHeaders
*dwRect
*StrObject

Cheers

Richard
Avatar of IainHere
IainHere

Here is one link:
http://home.jtan.com/~gregleg/hungarian.html
but there are as many naming conventions as there are programmers - you should find one that you can use (if you're fitting into a team, you won't have much choice).  A web search should throw up plenty.  

I suppose that dw is a DWORD (32 bit unsigned int) and that str is a string.  You really need to look at the declarations to find out.
"sz" and "Str" usually get prefixed to variables that are meant to be strings;

"dw" is for DWORD

Also in (fairly) common use:

"n" for integer
"l" for long
"tag" for a struct
"u"  for unsigned int
"ul" for unsigned long

ets., etc., etc....
you can extend this convention by using postfix notation

int A(char* szInit_in, DWORD* dwParam_out)

or

CDialog dlgProperty;
HWND dlgProperty_hwnd; // hwnd of this Dialog

and so on

Andrey
I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. Unless there is objection or further activity,  I will suggest to refund the points and PAQ at zero points since nobody had a complete answer for you.

The link to the Community Support area is: https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
ASKER CERTIFIED SOLUTION
Avatar of ComTech
ComTech

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial