How to write text into window? [closed] - c++

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
Parent form handle hwnd is existed. Now I want to populate it with edit controls into which output-text is written. I am not familiar with WIN32 API, Thanks for showing me some code examples. Thank you!~

http://msdn.microsoft.com/en-us/library/ms633546(VS.85).aspx
If you want to set text using chars then you can use SetWindowTextA so you don't need to bother with multibyte to/from wide characters.
I suggest the Programming Windows book by Charles Petzold.
You say hwnd is your parent then you could create the edit controls with default text like:
HWND hedit=CreateWindow(TEXT("EDIT"),TEXT("Default window text"),WS_CHILD | WS_VISIBLE, 0,0,400,300,hwnd,0,0,0);
Read up on the docs for CreateWindow at http://msdn.microsoft.com/en-us/library/ms632679(v=vs.85).aspx

Use CreateWindow to create Edit controls and do whatever you want with them.
Use google, etc or MSDN search before asking something.

Related

Open File Dialog Windows API [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
How do you show the Open File Dialog on Windows using just straight C++ and the Windows API?
I'm trying to load an image to display on the screen.
You want the common file dialog API, specifically GetOpenFileName - http://msdn.microsoft.com/en-us/library/windows/desktop/ms646927(v=vs.85).aspx

How to find process by windows title and close it whenever open [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I want to close process by windows title whenever that process open. How i do it?
On Windows, use FindWindow() to locate a window with the desired title, and if found then use PostMessage() to post a WM_QUIT message to it. If the window is still running after a period of time, then you might be able to brute force kill it, depending on permissions, by using GetWindowThreadProcessId(), OpenProcess() and TerminateProcess().

interactive dialog creation with opengl [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
How can I create authentication screen over using OpenGl ? Are there any tutorial or web page ?
NOTE : I have not found any, if I found, I would not ask the question.If there are any page, just give a name so that I can erase this question.
Please look the image on the http://docs.oracle.com/cd/E13169_01/ales/docs22/integrateappenviron/wwimages/aldsp4%20client%20login.gif
EDIT : I want to take input from screen .
OpenGL is not the library you are looking for, there are many thing you can do with it but this is not one of that, for the graphic user interface you can use GLUI http://en.wikipedia.org/wiki/OpenGL_User_Interface_Library
for some more articulated you can use AntTweakBar
http://www.antisphere.com/Wiki/tools:anttweakbar
Both are well integrated with OpenGL
You can force this by just drawing all the buttons and implement a kind of text field, but this is not what OpenGL is made for.
At your place I would use a language like Objective-C for Mac platforms, and C# for Windows platforms.If instead you want to stick with C++, then use a library like Qt.

OpenFileDialog, GetOpenFileName [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
The "Open" and "Cancel" button aren't localized on the .Net's OpenFileDialog (always in English). Therefore I use GetOpenFileName with WinApi. It works, but there is a strange error:
If the owner window of the dialog is not specified, the dialog is not modal, so the user can hide it without closing (I don't want this).
If the owner is specified, "Open" and "Cancel" again in English always.
Here are some examples what I've experienced:
In .Net + Win7 the two buttons texts are always English, but everything else is localised: menu, hints etc..
Everything is the same with a MFC application using CFileDialog.
Default applications (eg. Notepad) are fully localised.
GetOpenFileName makes fully localised dialog, but only if I don't specify the owner window.

How to find USB driver letter? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
I own one of those old U3 Cruzor USB's, and I want to create an application running on the image/iso/cd part (with a custom flash using "universal customizer") finding the other driver letter, reading an ini (.inf) file and starting an application based on what it finds in that file.
Not sure what language to create it in. But I would like it to be as small, fast and compatible as possible (windows xp, vista, 7. and not requiring .NET framework).
How does I find the driver letters for the USB?
This can be achieved using the DriveInfo class: http://msdn.microsoft.com/en-us/library/abt1306t.aspx
To get the volume label of the drive do the following.
DriveInfo[] allDrives = DriveInfo.GetDrives();
foreach (DriveInfo d in allDrives)
{
if ((d.IsReady == true) && (d.DriveType == DriveType.Removable))
{
Console.WriteLine(d.VolumeLabel);
}
}
edit: just saw you dont want to use .NET...