|
Well yes, I was afraid that this belonged there but I was not totally sure.
Thanks though.
But well it didnt quite solve my problem, now I get the error;
Just-In-Time Debugging
System.NullReferenceException
To make the code a little more clear, if now it matter I don't know.
This is how I want it.
lblQ->Text = myQuestions[CurrentQuestion]->getQuestion()
myQuestion is a pointer class and getQuestion returns the variable theQuestion which is defined as a string.
and also I just tried two ways:
1:
lblQ->Text = new System::String(myQuestions[CurrentQuestion]->getQuestion();.c_str());
2:
myQuestions[CurrentQuestion]->setQuestion("hi");
string temp = myQuestions[CurrentQuestion]->getQuestion();
lblQ->Text = new System::String(temp.c_str());
Both gave the Just-In-Time debugger error.
Best Regards,
Hmmkk
|
|
|
|
|
Howdy-
I am looking for some clues.
I need to make a window that will track another application, and "dock" itself to the side of that other application.
I am looking for the and easy and efficient way to watch the position of another window and buddy my window up to it. All clues welcome!
Thanks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.santacruznetworks.com">Santa Cruz Networks</A>
|
|
|
|
|
I am writing a add-in for some other program (can't say which) -- and though this program offers a plug-in interface, they offer no UI support.
For the sake of a demo, we want to put a button on their window. I plan to do this by tracking their app (size, location, focus) and positioning myself next to them... like a little puppy dog chasing his master -- my button/window will track this other application.
My assumption is that I mush hook their application with something like SetWindowsHooEx() and get the important messages and post them back to my app which will reposition itself to match that app.
I guess the question is -- is there any other way to do this, than to create a DLL, inject it into their process space, and post messages back and forth?
Thanks
-p
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.santacruznetworks.com">Santa Cruz Networks</A>
|
|
|
|
|
Peter Weyzen wrote:
is there any other way to do this, than to create a DLL, inject it into their process space, and post messages back and forth?
Nope, Unless that APPLICATION expose Interface to do so!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
I don't use bit fields much at all. I have a simple struct as folows (on an INTEL format machine):
typedef struct{
short f1 : 13;
short f2 : 1;
short f3 : 1;
short f4 : 1;
} tststruct;
tststruct tst;
tst.f1 = 8000;
what ends up happening is f1 gets a value of 0xFF40 instead of what I thought I would get (0x1F40). The other members (f2,f3,f4) are all 0x00 as I would expect.
Any idea why?
|
|
|
|
|
Maybe the compiler fills up the remaining 3 bits with ones instead of zeros? Maybe you can do an & with 0x1FFF to filter out the first 3 bits.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
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
|
|
|
|