|
There isn't sintax difference, look at the macro:
#define NULL 0
but there is a logical difference:
pointers doesn't contains numbers but addresses, so p=0 is logically incorrect, it must be set to the default null address(NULL ). That, of course, for convention and semplicity it is set to 0.
Using NULL is only a way to write more readable code.
|
|
|
|
|
|
In C++, nothing. In C, lots. A standard C compiler won't automatically convert 0 to a pointer, so you'll have to assign (void*)0 . In C, NULL is defined as ((void*)0) to allow you to set a pointer to 0. In C++, the compiler will happily convert 0 to a pointer, so you don't need the cast, and NULL is simply defined as 0.
Ryan "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"
|
|
|
|
|
|
Hi ,
i m trying to create an scrollbar as an activeX component which resizes itself based on image it is attached .
Please reply ASAP
suren
|
|
|
|
|
We are using a CComboBoxEx with style set to droplist to display a lsit of images.
When the drop down list appears and we click on the combobox (not on the drop down arrow),
the dropdown list closes as expected but then it immediately reopens!
How to prevent this behavior?
If instead we click on the drop down arrow when the list is open it decently closes without reopening.
|
|
|
|
|
Hi All,
I have an owner-drawn list box.
now my task is to fit a scroll bar for that.
when im trying to get the scroll position using CLisbox::GetScrollPos, it is always returning 0. how we can determine the current scroll position?
Currently im scrolling teh items by sending SendMessage(WM_VSCROLL,MAKEWPARAM(SB_LINEUP,0),0); function. will this update the current scroll position. in a normal list box im exactly getting the scroll position, but with owner-drawn one, im not getting.
anyone can suggest a solution for this problem? I need to draw the scrollbar as the part of lisbox not as a seperate control.
now tracking teh thumb is the main issue. pls help me to come out from this.
-Sarath
|
|
|
|
|
Hi,
Can I use MFC classes in Win32 Console based applicaiton.
Or
Can I use MFC classes in Windows Service application.
If answer if for one or both is YES then could you please send the link or example that how can do this?
Thanks
Regards.
|
|
|
|
|
basicaly I dont want the user interfce in the application , I want to get the hidden work from the applcaiton.
Regards.
|
|
|
|
|
zahid_ash wrote: basicaly I dont want the user interfce in the application , I want to get the hidden work from the applcaiton.
And so, which part of the MFC do you want to use exactly ?
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
CSocket class and other class that are not related to GUI.
Regards.
|
|
|
|
|
|
Hi
In new project creation dialog, use Win32 Console Application with MFC Support
Regards
KK
|
|
|
|
|
How to check if a url is valid at internet?
alantop
|
|
|
|
|
Hi,
Perhaps this help you: HERE[^]
-----------
Mila
|
|
|
|
|
Does this, certainly cannot examine a webpage whether exists? Only analyzes a URL.
alantop
|
|
|
|
|
Are you wanting to validate the URL itself, or the actual Web site? If the latter, try InternetCheckConnection() or IsDestinationReachable() .
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
I was using UDP protocol(SOCK_DATAGRAM) to do the network communication.
I used 'sendto ' system call to send data . After sending data repeatedly using 'sendto' system call it failed at one point.
Using WSAGetLastError I could retrieve the error code as 10055 which means --
No buffer space available.
An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.
Can anyone suggest me how to overcome this problem.
Fly Like An Eagle With MIGHTY POWER.
|
|
|
|
|
there are 2 classes
class MyClass1: public CDialog & class MyClass2: public CDialog
CObArray m_obArray is protected member of MyClass1
The task is to initialize CListCtrl m_list of MyClass2 with elements of m_obArray
|
|
|
|
|
And you couldn't even rephrase the task of your homework before posting it?
|
|
|
|
|
|
I couldn't//maybe course it's not homework
|
|
|
|
|
MyClass1 will need a 'getter' method that returns a reference/pointer to its m_obArray member.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
How we can convert (color-depth) of HBITMAP bitmap image.
|
|
|
|
|
See Here[^]
maybe it is some helpful to you
whitesky
|
|
|
|