|
i want to send it to external program
|
|
|
|
|
well for this purpose you need to detaily from program for example if we have a program like notepad.exe that is run now we want to insert a item to File menu(test) and if
you click this item its working i hope its helpful for you if you have a problem if i can i help to you
<br />
HWND hWnd = ::FindWindow("Notepad", NULL);
<br />
HMENU h=::GetSystemMenu(hWnd,FALSE);<br />
<br />
HMENU h1=::GetMenu(hWnd);<br />
HMENU h2=GetSubMenu(h1,0);<br />
<br />
AppendMenu(h2,MF_STRING,22,"Test");<br />
<br />
|
|
|
|
|
i use list view that have control in this page
http://www.codeproject.com/cs/miscctrl/ListViewEmbeddedControls.asp
* if i have database with 3 recode ex:
------
field 1
------
5
7
8
-----
i want to add 3 row in the listView with first colum must be button(ClickMe)
the problem new
-----------------
1 - how i make my app when i click in the fisrt (ClickMe) button -> open new Form with 5 as parameter - > new Form(5);
and second button new Form(7);
Palestine
|
|
|
|
|
How can a dialog be centred? Please explain it with example and appropriate function call and also how can a combo box and radio button be added to the toolbar and what is the function for this.
|
|
|
|
|
blue i wrote: How can a dialog be centred?
By using CenterWindow() .
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
Hello im trying to print memory dump to console output stream.
<br />
for (UINT z = 0; z < 32; z++)<br />
printf("0x%0.2x ", (BYTE)(((PDWORD)((PVOID)exp->ContextRecord->Eip))[z]));<br />
Warning I get:
<br />
warning C4312: 'type cast' : conversion from 'DWORD' to 'PVOID' of greater size
exp->ContextRecord->Eip is DWORD type. Any ideas how to cast this wihout CL warning?
Thanks in advance!
|
|
|
|
|
For one, you aren't taking the address of exp->ContextRecord->Eip.
Beyond that, your code makes no sense. On the one hand, it looks like you are attempting to pull one bit at a time from the value, yet it also looks like you are trying to display each byte that makes up the DWORD value.
I'm thinking you want something more like this:
DWORD val = exp->ContextRecord->Eip;
for (int z = 0; z < 4; z++)
{
printf("0x%0.2x ", (BYTE)(val & 0xff));
val >>= 8;
}
Or just unroll the loop for a small optimization:
DWORD val = exp->ContextRecord->Eip;
printf("0x%0.2x ", (BYTE)(val & 0xff));
val >>= 8;
printf("0x%0.2x ", (BYTE)(val & 0xff));
val >>= 8;
printf("0x%0.2x ", (BYTE)(val & 0xff));
val >>= 8;
printf("0x%0.2x ", (BYTE)(val & 0xff));
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
To output a pointer value using the printf family of functions, use %p in the format string. To print a DWORD, use %lx. To get a zero-filled DWORD, use %08lx.
|
|
|
|
|
This doesnt solved my problem.
Best regards
|
|
|
|
|
I can only guess at what you were trying to do. Were you trying to dump the code at the location of an exception?
The warning itself is telling you that, if you were to recompile this code with one of the 64-bit compilers, that this line would potentially behave differently. The compiler doesn't really know that the CONTEXT type would be different on a 64-bit processor anyway and that this line therefore wouldn't compile. If you want to turn off the warning, use #pragma warning( disable: 4312 ) , or disable the /Wp64 compiler switch.
I recently saw a recommendation from someone at Microsoft that you should now just use the 64-bit compiler to check compatibility and not rely on /Wp64 anyway.
|
|
|
|
|
thanks you, disabling /Wp64 switch worked for me
|
|
|
|
|
I have a very simple question.I speficy the source files for a program in makefile as follows
PROGRAM = sq.exe
all: $(PROGRAM)
########### list of C++ source files
CPPSRCS = \
main.cpp
.......
........
########### build a list of all .obj files
OBJS = $(CPPSRCS:.cpp=.obj) $(CSRCS:.c=.obj)
########### how to link .obj files to create an executable
$(PROGRAM): $(OBJS)
$(link32) -out:$@ $(OBJS) $(LIBS) $(linkflags)
Now in case i have a large number of source files - how can i specify at directory level - viz. all cpp files under directory 'source'?
|
|
|
|
|
I want to be able to automatically install some driver files for use by my application. I have looked high and low and cant find any API documentation to help me out. Does anyone know of a way?
|
|
|
|
|
You can use ShellExecute() or CreateProcess() with devmgmt.msc.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Sorry to be such a pain. Can you eleborate a little? I have used both these functions in the past but how on earth would I use them to prompt the device manager to install some drivers from a particular location?
|
|
|
|
|
My reply was simply in response to the "Launching Device Manager" subject. It obviously could not be used to install devices/drivers.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks David.
|
|
|
|
|
I want to be able to prompt the Device Manager to install some driver files from a specific location from C++.
|
|
|
|
|
Do those driver files have a setup/install program?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
No.
They are custom drivers that have been written for our specific hardware. I have looked high and low for information on it. Im sure its possible but MSDN doesn't have all that much information.
The Linux world makes it so much easier
|
|
|
|
|
Maybe devmgr.dll has some exported functions (e.g., DeviceCreateHardwarePage() ) that can be used.
http://www.experts-exchange.com/Programming/Q_20617785.html[^]
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
Hi,
I have a program that has a commandline option to pass a user and a password. If I start this program from within another windows program using CreateProcess, can dodgy types get hold of this commandline?
|
|
|
|
|
If it's a string literal, yes.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|