|
Is it September already?
Here is a pointer that ight work:
Any of the numbers shown on the outside of the grid are "winning" moves
1 | 2 | 4 = 7
------------------
8 | 16 | 32 = 56
------------------
64 | 128 | 256 = 448
/ =============== \
84 73 146 292 273
The numbers below show all of the possible conditions for a player that can win on the next turn:
R1: ( 3, 5, 6)
R2: ( 24, 40, 48)
R3: (192, 320, 384)
C1: ( 9, 65, 72)
C2: ( 18, 130, 144)
C3: ( 36, 260, 288)
D1: ( 17, 257, 272)
D2: ( 20, 68, 80)
|
|
|
|
|
I'm sry I'm not that advanced with understanding it, can you further explain your reasoning, I would appreciate it, THANKYOU
<marquee>Universal Project... Soon to be a .net
|
|
|
|
|
Anyone here was successfull at adding XP themes to it's DLLs? If so, how? I added the manifest and called InitCommonControls but it doesn't work.
Is there anything particular to add in the manifest since it's a dll or where do I need to call InitCommonControls (which function?)
It's for a Outlook add-in by the way...
thanks!
---------------
Tired of Spam? InboxShield 2.0.2 for Microsoft® Outlook® 2K/2K2/2K3
http://www.inboxshield.com
|
|
|
|
|
i don't really understand you question...
what e.g. does adding
LukeV wrote:
XP themes to it's DLLs
mean? what is "it's"?
Don't try it, just do it!
|
|
|
|
|
I have opened a JPG file just to read the header and determine if it is in fact a JPG, but I also want the width and height in pixel of the image. I this easy to acheive? Or does it involve decompressing the stream or something?
There doesn't appear to be 2 fields in the header which hold this information that really sux....
I just need a quick yes or no...please don't refer me to any image lib's or classes here on CP...I only need to know if getting the width and height of a JPG in pixel is almost as easy as retreiving the sig???
Thanks
I'm drinking triples, seeing double and acting single
|
|
|
|
|
There is no height or width in the file - as there is no header. JPEG is a compression specification that has grown into a file format. You can extract the width from the first scanline.
|
|
|
|
|
i was afraid of that
I'm drinking triples, seeing double and acting single
|
|
|
|
|
After moving to the .NET studio I'm experencing problems running my app. When I run it I get an error:
Runtime Check Failure #2 Stack around the variable 'sDataParse' was corrupt.
Can someone explain this error to me please. The variable pertains to a section of code that I copied from the MSDN concerning the API strtok.
I'm passing a LPSTR to this function that has that snippet of code in it. Do I need to delete this LPSTR before I exit my function?
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
No IDE is perfect. Visual C++ .NET 2003 has its flaws.
Kuphryn
|
|
|
|
|
okay...this doesn't really help.
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
The message is a diagnostic telling you that there is a buffer overrun or a problem with an out-of-range index into a buffer. If you're doing strcpy or sprintf it might be that the buffer 'sDataParse' is too small. Are you also passing a string length, assuming that you're passing the LPSTR as a destination of some kind?
Steve S
|
|
|
|
|
that's not a problem of .NET studio, it's one of your software!
this error is caused by a call(in debug mode) at the end of a function, which checks if the stack layout has been modified!
Don't try it, just do it!
|
|
|
|
|
Hi again:
Another problem, I am able to maximize the main window and the tabctrl that is on it, but what it is inside the tabcontrol doesn't change the size. Any idea?
Thanks
|
|
|
|
|
Hi, I've developed a NT Service in C++. This service receives requests, and do some processing depending on these. One kind of request is displaying a DialogBox, but this never shows up. In the DialogBox procedure, the WM_INITDIALOG never arrives. If I try to launch a graphic app like calc.exe, the process runs, but never display it's interface. It looks like any GDI operation it's not available in my service. Any idea?
Tnx
|
|
|
|
|
Posting a dialog from a service isn't really a great thing to do. And there's issues around doing such things. Issues about how the service is installed, and which user this service is bound to:
First question: when you install this service, are you installing it using CreateService() and are you specifying the SERVICE_INTERACTIVE_PROCESS flag in dwServiceType parameter?
<br />
SC_HANDLE CreateService(<br />
SC_HANDLE hSCManager,<br />
LPCTSTR lpServiceName,<br />
LPCTSTR lpDisplayName,<br />
DWORD dwDesiredAccess,<br />
DWORD dwServiceType,<br />
DWORD dwStartType,<br />
DWORD dwErrorControl,<br />
LPCTSTR lpBinaryPathName,<br />
LPCTSTR lpLoadOrderGroup,<br />
LPDWORD lpdwTagId,<br />
LPCTSTR lpDependencies,<br />
LPCTSTR lpServiceStartName,<br />
LPCTSTR lpPassword<br />
);<br />
The moral is -- you should first scrutinize how your service is installed on your machine.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.santacruznetworks.com">Santa Cruz Networks</A>
|
|
|
|
|
|
Hi
How could i set up a scroll bar inside a tab control. That's it: I created a tab control, one of the window that I want to show inside is going to be huge, so I want to be able to scroll on it. I tried to set up the dialog shown with the option of vertical scroll but doesn't work.
What am I mising?
Thanks.
|
|
|
|
|
void CTabOne::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
if (pScrollBar-> GetDlgCtrlID()==IDC_SCROLLBAR1)
{
int nCurrentPos = pScrollBar-> GetScrollPos();
switch(nSBCode)
{
case SB_PAGEUP:
pScrollBar->SetScrollPos(nCurrentPos-5);
break;
case SB_PAGEDOWN:
pScrollBar->SetScrollPos(nCurrentPos+5);
break;
}
}
CDialog::OnVScroll(nSBCode, nPos, pScrollBar);
}
One problem is that I have no idea what the IDC_SCROLLBAR1 is, because I am not able to set up the IDC of the scroll bar
Other is that when I get rid of the if condition, I get an error and the program ends.
Any comment?
Thanks, Ruben
|
|
|
|
|
My BMP image is mainly green in colour. I want to change to red but I can't get even Paint Shop Pro to do this simple operation!
If I wrote code to do it, I would simply swap values of each pixel's green and red values.
For example (50, 150, 50) would become (150, 50, 50). This would not affect white or black pixels.
Can anyone help?
|
|
|
|
|
To do it in windows code is easy.
1) If you only need to swap the values, and speed is not a problem, you could just select it into a Device Context and do something like this
ClrRef = GetPixel(x,y);
ClrRef = SwapRG(ClrRef); // user defined func.
SetPixel(x,y);
Saving it back to disk is where life gets difficult.
1) Read the articles at code project, and other sights to find out how.
*2) Read "Programming Windows" by Charles Petzold.
INTP
|
|
|
|
|
Actually this is related to my last post about gethostaddress. I got as a result of putting in my machine IP adress , the name of my pc.........MyPC, but there was no other identifying info about the network etc. The sample code I am using takes "ftp.microsoft.com", so my "MyPC" is obviously not enough for the GetFTPConnection and it fails.....
m_pFtpConnection = InternetSession.GetFtpConnection (name1 );
where I got name1 from my gethostbyaddr. So how shall I get around this? My goal is to download some files off an IP address. The machine with this IP address will be physically connected to the machine requesting the files (my application), but I cant hardcode the machine name, and have to use the ip address.
Thanks,
ns
|
|
|
|
|
I presume, you are missing some basics.
CFtpConnection* GetFtpConnection(
LPCTSTR pstrServer,
LPCTSTR pstrUserName = NULL,
LPCTSTR pstrPassword = NULL,
INTERNET_PORT nPort = INTERNET_INVALID_PORT_NUMBER,
BOOL bPassive = FALSE
);
Here you dont need to give the target machine's IP address, ftp server name is enough.
but there was no other identifying info about the network etc
I didn't get this point!!!
You dont need to use gethostbyaddr(...). just give the machine name as the first parameter, and thats it.
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
Problem is I dont have the server name ...just the IP address. THe gethostbyaddr gives me the server name except in this case its not adequate since it just gives me back "myMachine" with no other specifics............
Thanks,
ns
|
|
|
|
|
I almost got this program to work but i always get two or more errors. Please help me.
Run a program that will ask the user for two floating point numbers. The second number asked for should be the percentage the user wants to find of the first number. It should then display the result of finding the percentage in this format:
Example: Enter a number: 25
What percent of 25 would you like to find? 3
3% of 25 is 0.75
So far I got this:
#include "conio.h"
#include "stdio.h"
void main()
{
clrscr();
float number;
float number2;
float answer;
answer=number*number2/100;
printf("Enter a number");
scanf("%f",& number,number2);
printf("What percent of %f would you like to find?",number);
printf("%f% of %f is %f",number2,number,answer);
getch():
}
and by the way what is the best c++ compiler? i have turbo c++ now and how do you add computer voice to c++ programs? Thanks
|
|
|
|
|
You need to do the calculation after you've entered the numbers.
void main()
{
clrscr();
float number;
float number2;
float answer;
printf("Enter a number");
scanf("%f",& number);
printf("What percent of %f would you like to find?",number);
scanf("%f",& number2);
answer=number*number2/100;
printf("%f% of %f is %f",number2,number,answer);
getch():
}
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|