|
Thanks.
Here's what I found: if I use unsigned shorts, everything works fine. Apparently, the value is sign- extended when using signed variables - so the 1F40 (when looking at it as a 13 bit number) is a negative number and the sign bit is extended out when placing the value in the struct (giving FF40). Hope that makes sense.
Thanks - I got there eventually but it really looked strange at first.
|
|
|
|
|
I have a project where a class is being registered. The class contains some code that finishes with AfxRegisterClass(). Why register a class?
Jerry
|
|
|
|
|
Don't confuse Windows' classes with C++ classes.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I don't suppose anyone has any experience writng an interface (without spawing command lines running CVSNT) to access a CVS server ?
Elaine
The tigress is here
|
|
|
|
|
|
|
Argh - sorry.
This[^] missive seems to support the absence of a native beast. (But seriously, it's quite easy to wrap a Tcl with C/C++ - I assume that's what WinCVS does).
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Ravi Bhavnani wrote:
it's quite easy to wrap a Tcl with C/C++ - I assume that's what WinCVS does
Yes but I'm trying to make something nice and portable - I need Cygwin, Perl, Python and Tcl/Tk on my work PC because of this kind of thing !
They have to be the right versions for some tasks too.
Elaine
The tigress is here
|
|
|
|
|
No, they it does need Tcl/Tk. It uses Perl/Tcl/whatever for macros. But for vanilla CVS operations, as you can execute using the command line tools, and then some, there is no need for any scripting language. I've been using WinCVS like this for the last 4 years.
--
An eye for an eye will only make the world blind.
|
|
|
|
|
Jörgen,
I want to write native functions rather than rely on third party packages.
I just ran into a problem yesterday on a system that was was caused by the wrong version of CVSNT, the command line tools. The bug causing the problem (drive letters in specified working directories) was in the current version so I had to dig through a few systems on site until I found a version that worked !
We have 2,500 people over 6 sites at the moment with an unknown number of build and access methods, so I'm trying to reduce the chaos.
Some of this is long term but providing people with reliable easy to install tools will help a lot.
Elaine
The tigress is here
|
|
|
|
|
I need to know how to pause a program for a specific amount of time and then show the "Press any key to continue..." line that is shown by system("PAUSE"). i've seen people do this before, but i've never asked them how to.
dudeoffrance
|
|
|
|
|
I'm assuming you're writing a console application? This code works for me
#include "stdafx.h"
#include "Windows.h"
#include "conio.h"
int main(int argc, char* argv[])
{
Sleep(5000); //wait 5 seconds
printf("Wait...");
getch(); //get any key from the user
printf("\nHello World!\n");
return 0;
}
|
|
|
|
|
Is this a console or UI application?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
DavidCrow wrote:
Is this a console or UI application?
look like to be CONSOLE application!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
its a console application.
dudeoffrance
|
|
|
|
|
Ok, Budric's response was more or less correct. It's been six days. Has this been resolved?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I was just wondering how I could send an image over a winsock TCP socket (from client to server). I'm quite new to network programming but eagar to learn, so if anyone can help me I will be very greatful.
|
|
|
|
|
CSocketFile may do the job, like reading and writing files at either end.
Elaine
The tigress is here
|
|
|
|
|
If you are using RAW SOCKET, read whole image file in the STRING and then send it over the connected socket to other END. this really work!,One of My project using similiar FUNDA!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
THank you for reading my question. Please help if you can:
I got a richtext box on a window, now while my code is processing files, it will display stuff on the richtext box to tell users what it is doing.
now if i grab it and move it around while it is processing, or click else where, then my richtext box wouldnt display anything anymore and the window becomes "not responding" while it is doing its things.
Now how do I make sure that the stuff will always be repaint and which events do I need to overwrite to take care of that? or do i need to send windows OS some commands to make sure that it doesnt make my window become "not responding"?
Please help
Elapid For The Win
|
|
|
|
|
You need to put the "processing files" code in a separate thread so that the main thread can handle the UI stuff.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
how do I do that?
Elapid For The Win
|
|
|
|
|
See here and here.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I am attempting to create/update system variables in WinXP via the registery. I can add/update the variables and values just fine, however I cannot get the changes to recognized by the OS without rebooting. Now I have searched here and googled this question and everyone has the same answer....Use SendMessageTimeout to send a HWND_BROADCAST message with the WM_SETTINGCHANGE parameter. I have done this, but when I start another program that accesses the variable, the old value is still there... So it must be my program...But its hard to screw up a cut and paste of code so any ideas ?
for(int x=0;x<m_VarList.GetItemCount();x++)
{
if(IsDlgButtonChecked(IDC_USERRADIO))
SetEnvironmentalVariable(m_VarList.GetItemText(x,0),m_VarList.GetItemText(x,1),FALSE);
else if(IsDlgButtonChecked(IDC_SYSTEMRADIO))
SetEnvironmentalVariable(m_VarList.GetItemText(x,0),m_VarList.GetItemText(x,1));
}
if(IsDlgButtonChecked(IDC_FORCEUPDATE))
{
DWORD dwReturnValue;
long res;
res=SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0,(LPARAM) "Environment", SMTO_ABORTIFHUNG,5000, &dwReturnValue);
if(res!=0)
AfxMessageBox("System update was successful you will NOT have to reboot the computer");
else
AfxMessageBox("System update was successful, but you will have to reboot the computer");
}
CDialog::OnOK()
As you can see I've tried different combinations of broadcast messages, but the value still does not get updated. I'd appreciate any help you could provide.
The program I use that accesses the system variable was written for testing and consists of a single line of C# code
string Value=Environment.GetEnvironmentVariable("TEST_SYS_VAR");
|
|
|
|
|
Guinness4Strength wrote:
for(int x = 0; x < m_VarList.GetItemCount(); x++)
{
if (IsDlgButtonChecked(IDC_USERRADIO))
SetEnvironmentalVariable(m_VarList.GetItemText(x, 0), m_VarList.GetItemText(x, 1), FALSE);
else if (IsDlgButtonChecked(IDC_SYSTEMRADIO))
SetEnvironmentalVariable(m_VarList.GetItemText(x, 0), m_VarList.GetItemText(x, 1));
}
Since the state of the radio buttons will not change within this for() loop, why not put the if() statement outside of the loop?
In any case, since you indicate that the registry is being updated correctly, how is this other program accessing the registry such that it is not getting the updated values?
Also, if this other program is not running at the time the registry is being updated, the SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, ...) code is meaningless anyway.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|