|
Hi all,
Since recently defining WINVER as 0x0500 in a recent project, I get the following compiler messages when building the app:
"NOTE: WINVER has been defined as 0x0500 or greater which enables
Windows NT 5.0 and Windows 98 features. When these headers were released,
Windows NT 5.0 beta 1 and Windows 98 beta 2.1 were the current versions.
For this release when WINVER is defined as 0x0500 or greater, you can only
build beta or test applications. To build a retail application,
set WINVER to 0x0400 or visit http://www.microsoft.com/msdn/sdk
to see if retail Windows NT 5.0 or Windows 98 headers are available.
See the SDK release notes for more information."
This link is no longer valid.
Thanks for any help!
|
|
|
|
|
|
|
Hi all,
I have some code that uses RAS/DUN connections, and I am also using code that uses RegisterDeviceNoticication(). In order to use the API UnregisterDeviceNotification() to close the handle returned by the first function, WINVER must be defined as 0x0500 or greater. After doing this, my RAS functions return error 632 -- "An incorrect structure size was detected."
Specifically, I'm getting this error when trying to use RasGetEntryProperties get get info into a RASENTRY struct.
What's the deal here?
I'm using WinXP, & MS VC++ 6.0 w/ SP 6 installed.
How can I fix this?
|
|
|
|
|
Hi,
I want to print a chart, that is drawn in a dialog. I have no idea how to do that. should i use the function Print?
thanks in advance
|
|
|
|
|
|
What would the following conditional (i+n) in a for loop evaluate to?
for (i=0; i + n; i--)
I saw it once, but I dont understand what was happening.
Did I post well? Rate it! Did I post badly? Rate that too!
|
|
|
|
|
0 if n starts at 0. Otherwise non-zero, thus the for loop would never terminate.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I want to believe you, but I cannot.
int k = 0;
int i, n=100;
for (i=0; i + n; i--)
k++;
When this is done, k will equal 100. Can you explain?
Did I post well? Rate it! Did I post badly? Rate that too!
|
|
|
|
|
The for test is:
i + n
which is the same as:
i + n != 0
n = 100 so we can rewrite as:
i + 100 != 0
or (subtract 100 from both sides),
i != -100
so as i starts at 0 and decrements by 1 on each iteration it will loop 100 times.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
It helps to show all of the code up front. Since n starts out as 100 , rather than 0 as I initially presumed, i + n will eventually evaluate to 0 which will terminate the loop.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Surely if n was -1 it would not evaluate to 1, but to zero, so the for loop would not loop forever?
|
|
|
|
|
In the code snippet provided by Esmo2000, when does n ever equal -1?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I hadn't seen that response yet
|
|
|
|
|
in C/C++, booleans can be reprensented the following way :
0 equals to <code>false</code>
any other values different from 0 equals to <code>true</code>
so, as (i + n) would equal to 100, it is true - until it become equals to 0...
you follow me ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
for n < 0 the loop will execute until i wraps around to abs(n)
for n == 0 the loop will never execute (i+0) == 0 == false
for n > 0 the loop will execute n times
|
|
|
|
|
Hi all///
I used a English dictionary program that can explain meaning of the word when i press ctrl + click right mouse on the word in any windows such as notepad,internet explorer,word...>>>i tried to code one same program but i didn't know how to get text of other windows as that program did.
please help me///
thanks
Here we go!!!
|
|
|
|
|
One way is to use the IAccessible interface, specifically the get_accValue() method.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi, I'm trying to write a basic Battleship game that can be played over the internet VIA a socket client/server set up.
I'm using MFC.
When the user clicks a button, it sends a message to the server where they clicked, the server then relays that on to the client. When the client receives it, they send a message back if it was a hit, or miss.
I have a thread that runs to get messages from the server, so I can have a chat running at the same time. So when the thread for receiving server messages gets a message back telling them if their shot was a hit or miss, I want to update the status of the buttons that I use for showing moves, by changing the forecolor of the button.
the code i use is --
<br />
the type of button is: CCommandButton : CWnd (Which is used as a wrapper for the ActiveX command button)<br />
CCommandButton l_Buttons[10][10];<br />
then inside of my server message thread i use the code:
<br />
l_Buttons[0][0].put_BackColor(0x0000FF);
I can put that same code into a non-threaded function and it works exactly how I want it to.
Is there any way I can fix this?
Thank you!
|
|
|
|
|
This sounds like a race condition, a common problem when multiple threads are involved.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I think I am going to end up using two ports on my program. One for server messages and one for chat. Hopefully that'll fix it.
|
|
|
|
|
i am wondering if the program is an executable file -
because file extension of the program is com (not exe).
where is help of the program (for its command)? i can not find in my computer.
includeh10
|
|
|
|
|
Yes, files having a .com extension are indeed executable. It used to be that in order to create such a file, the tiny memory model had to be used (because of the need for a single 64KB data and code segment). I'm not sure how they are created nowadays since memory models are a thing of the past.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
hello,
cs.style &= ~FWS_ADDTOTITLE
i know the following code does removes untitled from title bar however can anyone explain what is happening. i am not familiar with ~ used in this way? and are we passing the address to cs.style?
thanks,
Lino
|
|
|
|
|
This code basically performs a logical operation on the cs.style variable; specifically removing the value indicated by FWS_ADDTOTITLE.
The ~, by the way, is the C++ NOT operator.
Have a read through this[^] article that explains in more detail.
I Dream of Absolute Zero
|
|
|
|