|
I have a field in a database that will contain the full path to a file. How can I let the user open this program in the default app (like opening a .doc file in Word, or clicking a button and the name of the file, that the user doesn't see is mysheet.xls so that it can open up that file in Excel)?
[insert witty comment here]
bdiamond
|
|
|
|
|
ShellExecute()<br />
ShellExecuteEx()
Jeremy Falcon
|
|
|
|
|
duh, sorry. Thanks!!
[insert witty comment here]
bdiamond
|
|
|
|
|
or you can use
WinExec()
LoadModule()
CreateProcess()
gabby
|
|
|
|
|
Hello people,
Wanted to know how i can make an icon appear transparent when i drag it. Just like windows does it when u drag an icon on desktop (it becomes transparent).
Is there any GDI call that i can use to acheive this. kindly help
|
|
|
|
|
How can I control my modeless dialogs when they are moved? They can be moved all over the place, off the main window into the wide blue yonder. How can I make sure they only stay within the bounds of the main window (which itself can be resized)?
|
|
|
|
|
Override the WM_MOVE windows message with OnMove() in your dialog class and use the parent window bounding rect to limit the movement.
Steve
|
|
|
|
|
See WM_MOVING (to restrict the movement of a window) or WM_MOVE (to reset the position of a window after it's been moved).
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I did it with OnMoving. Great - I can stop the user moving the dialog off the main window. But now what if I want the user to move it off the window but make the part off the window invisible?
|
|
|
|
|
And also is there a way to get a window rect that only gives you the coords of the actual view, i.e. ignores the title bar, status bar etc?
|
|
|
|
|
I wanted to know how would I start to write a program to use your voice to execute specipic programs on the comupter?
|
|
|
|
|
have a look at microsoft's Speech API ( SAPI ).
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
since no one is online elsewhere, here it goes
explain
int *p;
p=(int (*)[4])malloc (3*sixeof(*p))
please
|
|
|
|
|
What exactly are you wanting to know about the two statements?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
int *p;
p=(int (*)[4])malloc (3*sizeof(*p));
This code is allocating an array for
12 bytes long (3 ints = 12bytes) in memory and returns result to variable p
_________<br />
I'm made in C++... and I'm proud of it!
|
|
|
|
|
this code trully allocate array of three int elements.
int *p;
p=(int *)malloc (3*sizeof(int));
|
|
|
|
|
I can't. I'm guessing sixeof is a typo and you ment sizeof. (a forgivable mistake unless you really ment sixeof, in which case I'd need to know more about it)
the int (*)[4] part is wrong. It is tyring to tell the compiler that you have an array of 4 ints, but just allocated 3! Not that the compiler would check, it is legal C to then use p[5], though it is undefined behavior and will randomly crash your program.
Just write
int *p = malloc(3*sizeof(int));
like the rest of us would.
|
|
|
|
|
|
Hi All
I am trying to build a Debug version of Win32 DLL under Dot Net 2003 framework. I link to a Release version of Win32 DLL not using MFC built under the Visal Studio 6.0 .
I always get the above mentioned error with Unresolved external symbols.
Anyway, I can fix it.
I can build release version successfully.
Thanks
Sankar
|
|
|
|
|
Is your Release Win32 DLL in the second sentence also your code or are you using a Windows DLL? If it is your code can you recompile using the debug configuration? If you are using a Windows DLL use the analogous debug version under 2003.
Daniel
|
|
|
|
|
Hi Daniel
No, the Release DLL is supplied by one of the other vendors with which I have to integrate.
But, normally, we can build the debug version of one DLL linking with the Release version of the depending DLLs, right?
\
Thanks
Sankar
|
|
|
|
|
Sorry this is so late I have been on holiday for the last week.
Yes, you can link against release DLL's for debug versions of your code. But, you will not be able to step into the release DLL's using the debugger.
Daniel
|
|
|
|
|
In the results I recieve a pointer to void type as every1 know with bytes from memory. But they are reversed =\
How can I change it ?
I.e.:
bytes in memory: 00218040 // this is in memory
bytes in result: 00408021
I want them like they are in memory.
_________<br />
I'm made in C++... and I'm proud of it!
|
|
|
|
|
Don't know exactly how ReadProcessMemory works but you can make a casting on the result. For example, if you want to read an integer value, do something like this:
int Result = *(int*)lpResult;
lpResult is the void pointer you get from ReadProcessMemory(). The compiler will automatically handle all the work for you .
Hope this help.
|
|
|
|
|
to reverse u can use following code:
for (DWORD x=0x00408021, i=0, r=0; i<32; i+=4, r+=(((x << i) & 0xf0000000) >> (28 - i)));
|
|
|
|