|
hii...
how do i use CreateDialogIndirect to create a dialog box?
how can the DLGTEMPLATEEX be used to retrieve /specify the properties of an existing dialog box?
and how is the callback function DialogProc to b used?
regards,
kedar.
|
|
|
|
|
|
it is a program of MSDN , which i have written in console win32 application because in win32 applicaiton it was also giving problems.It gives an error that SetDICreateDeviceInfoList() does not take 7 parameters....Plz help me out
#include <windows.h>
#include <setupapi.h>
#include <stdio.h>
DWORD Err;
HDEVINFO DoDeviceEnum( GUID InterfaceClassGuid)
/*
Routine Description:
Retrieves the device information set that contains that contains
the devices of the specified class.
Parameters:
InterfaceClassGuid - The interface class GUID.
Return Value:
If the function succeeds, the return value is a handle to the
device information set.
If the function fails, the return value is zero.
*/
{
HDEVINFO DeviceInfoSet;
HDEVINFO NewDeviceInfoSet;
// Create a device information set that will be the container for
// the device interfaces.
DeviceInfoSet = SetupDiCreateDeviceInfoList(NULL, NULL);
if(DeviceInfoSet == INVALID_HANDLE_VALUE) {
Err = GetLastError();
printf( "SetupDiCreateDeviceInfoList failed: %lx.\n", Err );
return 0;
}
// Retrieve the device information set for the interface class.
NewDeviceInfoSet=SetupDiGetClassDevsEx( InterfaceClassGuid,NULL,NULL,DIGCF_PRESENT | DIGCF_DEVICEINTERFACE,DeviceInfoSet,NULL,NULL);
if(NewDeviceInfoSet == INVALID_HANDLE_VALUE)
{
Err = GetLastError();
printf( "SetupDiGetClassDevsEx failed: %lx.\n", Err );
return 0;
}
return NewDeviceInfoSet;
}
int main(int argc, TCHAR* argv[])
{
DoDeviceEnum(NULL);
return 0;
}
|
|
|
|
|
i have included windows.h, stdio.h, setupapi.h
|
|
|
|
|
brilliant101 wrote:
It gives an error that SetDICreateDeviceInfoList() does not take 7 parameters....
Right, it only takes two, which is what you have. SetupDiGetClassDevsEx() does take seven parameters, however, which you also have. Please provide the error verbatim from the compiler.
Unless you are just looking for something extra to do, there is no reason to respond to all of your posts with the name of the header files that have been included. Using < and > correctly will suffice.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
How to get text on screen at current mouse position.
le van giang
|
|
|
|
|
I can see that you're cross posting, so what language are you interested in?
Furthermore, your question is a bit fluffy, I think you have to be a bit more specific.
As leppie says in the C# forum, it's not possible to just get the text at a certain point.
But you can get the text from the HWND at the current corsor position, look up these functions in the Win32 API: WindowFromPoint, SetWindowsHookEx, GetWindowText, ChildWindowFromPoint.
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|
|
do you want the text to appear within your application window or anywhere in screen(including the area out of your application window).
1) if you want the text to appear within your application window,
handle WM_LBUTTONDOWN OR onLButtonDown(in mfc), and within that get the device context of client(GetClientDC(this)) and display the text using TextOut or DrawText.(use point for mouse location)
2) if you want the text to appear anywhere in screen,
-Capture the mouse using SetCapture.
-Get the screen device context, using CreateDC(NULL).
-display the text using TextOut or DrawText.(use point for mouse location)
|
|
|
|
|
The word "get" is ambiguous here. Do you want to read text from the screen, or write text to the screen?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I want to read text from anywhere on screen.
|
|
|
|
|
That will require use of the IAccessible interface, specifically the get_accValue() method.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hello,
Could anyone tell me how to cope with this error message.
the start of my code goes like
#pragma once<br />
<br />
using namespace std;
...
I get the errormessage that the namespace does not exist, and msdn provide little information about this error message.
error C2871: ´std´:a namespace with this name does not exist
Sorry if I provide to little code or further descriptions...
But maybe somebody has a tips
best regards
doneirik
|
|
|
|
|
That should compile OK on any machine. Exactly on what line did you get the error message? Maybe where the error is generated your code is at a different scope not within that of your "using" declaration? Maybe where the error is generated the header file with your "using" declaration is not included?
|
|
|
|
|
this can come from the files you really include.
for example :
#include <string.h> this will include all the C standard function to manipulate C-string (strcat(), strlen(), etc...) in the global namespace : ::strcat(), ::strlen(),...
#include <CSTRING> this will put the functions in the std namespace : std::strcat(), std::strlen(), ...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
doneirik wrote:
Could anyone tell me how to cope with this error message.
the start of my code goes like
#pragma once
using namespace std;
...
I get the errormessage that the namespace does not exist, and msdn provide little information about this error message.
error C2871: ´std´:a namespace with this name does not exist
You probably should include a file with code in namespace std before 'using' namespace std, e.g.
#include <vector>
using namespace std;
|
|
|
|
|
hai ..
can anybody help me in my problem?My problem is to maintain constant size to one text file.eg 500kb then if i add any thing it will not show that text files size increasing.please help me.
regards
shaanu
shan
|
|
|
|
|
How about (temporarily) using a copy of the text file instead and add to that?
|
|
|
|
|
I am storing 32 bit keys.so i want to store some more keys.but the size of text file should be constat.i want to limit its size by some 500 kb like that.so what should i do for make constant size of text file in vc++?
shan
|
|
|
|
|
what about overwriting the file content ???
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
If you add to a file, it's going to increase in size. There is no way around this. This is a very odd requirement.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
hi all,
I want to draw 3D object like a ball using GDI+ Graphics,Brushes..Can any body Guide me to do it?
Thanks in advance..
|
|
|
|
|
dear sir.
i am an MSc studient, I need some informations about my project which its titled "image compression using multiwavelet transform" (source code program to do it)in visual C++
with my regards
|
|
|
|
|
Do you know of any such api or function which enlists applications?
eg, Internet explorer,Word,Power point etc.
Also do you know of any api which enlists the the hardware devices like
mouse,keyboard,NIC etc
Please tell about these apis and their header files
Thanks a lot
|
|
|
|
|
brilliant101 wrote:
Do you know of any such api or function which enlists applications?
eg, Internet explorer,Word,Power point etc.
To get a list of running processes, use Process32First() and Process32Next() .
brilliant101 wrote:
Also do you know of any api which enlists the the hardware devices like
mouse,keyboard,NIC etc
Please tell about these apis and their header files
This is exactly what SetupDiEnumDeviceInfo() and SetupDiEnumDeviceInterfaces() are for.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi,
I develop a multi langugage support GUI screen in SDK, The appropriate language font doesn't displayed in dialog control, i done the settings in windows XP. But it doesn't displayed.
plz write your suggestion.
Regards,
Inbha.
|
|
|
|