|
I've got to Dialogs (DialogA & DialogB). DialogA has an edit box which I want to write to. DialogB consists of a few BUTTONS, when the user clicks one of these buttons I need a message to appear in the edit box of DialogA. Would some detail how this might be done using the following APIs
GetDlgItemText
SetDlgItemText
Kind Regards
Caoimh
|
|
|
|
|
Very simple, get the pointer of dialogA in dialogB, then in the eventhandler of the button in dialogB do the following
pDlg1->SetDlgItemText(IDC_XXX,"Text");
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
Hi !
I'm thinking about buying Visual Studio .NET.
I've heard and read many things regarding .NET and the need for the people using my application to have the CRT if it's not already installed on their machine.
My question is : is this true only for C# applications ? If I'm developping an app in C++ with .NET, will I get a executable which won't need the CRT ? Will my app work for example on Win98 ?
Since which version of Windows is the CRT automatically installed ?
Thanks for your infos,
Jerome
|
|
|
|
|
Visual C++ in VS.NET is the only tool that will generate native Win32 code. Therefore you don't need to distribute the .NET runtime (unless you use the .NET managed C++ classes)
Michael
But you know when the truth is told,
That you can get what you want or you can just get old,
Your're going to kick off before you even get halfway through.
When will you realise... Vienna waits for you? - "The Stranger," Billy Joel
|
|
|
|
|
Hi !
I'm having a problem wih the autolist member option.
Me and my coworkers are working on the same projet. I have on my disk a visual studio workspace, which includes 4 projects. My coworkers have _exactly_ the same configuration.
My problem : I want to have the autolist member when I type a class name, which is a class from the other project in the same workspace.
It works for my coworkers (the list of member variables and methods) appears in the text editor, but not with me.
I checked the options of Visual Studio and autolist member option is set.
Could anyone tell me what's wrong with my configuration ?
Thanks !
Jerome
|
|
|
|
|
There is nothing wrong in the configurarion, it is due to currupt .opt .clw files in your workspace directory...
Try deleting the .opt file (after closing ur workspace) and then load ur workspace in the visual studio.
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
Hi!
Is there any easy way to make your application to be multilanguage? What can be used for it? I want to let the user choose if he or she wants english french or german....
Well... I am a beginner ...
|
|
|
|
|
yeah certainly, You need to create resource only dll, this resource dll will contain all the messeage in the local language.
during application load time, load the appropriate dll to display appropriate language messages.
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
Hi everybody!
I think evrything is in the title...
I write a dialog based application, and I need to use the F1 key.
But I don't want to see a message box asking me where the help file is!
How is it possible to tell my dialog box F1 is a key like others?
Thanks!
|
|
|
|
|
Handle WM_HELPINFO event.
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
don't know what i did but when i press the ClassView tap, i don't see the member variable any more. also when i enter code like: class. it suppost to pop-up the box to pick the member variable but now it don't show nothing. I'm a noob here, so those help me a lot. what did i turn off?
|
|
|
|
|
You didnt turn it off, sometimes it goes away when the intilisense database is currupt.... close the workspace deleteing the .opt file in ur workspace directory and reload the workspace.
this may help you, there is another way of deleteing the .clw file and adding the classes to the classwizard, since you said you are a noob, dont try it, coz it may f*uck up the classwizard.
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
if i load the workspace from my laptop, it will show but it don't on my main comp. so, i don't think any wrong file in the workspace. this is weir and anoying.
|
|
|
|
|
i have a program reading data from a text file and display each section to a grid display. i do a EOF test make sure every info has been extract but seem like a infinite loop.
int counter = 0;
char Char;
char Array[100];
ifstream file;
file.open("somefile.txt");
do{
file.get(Char);
Array[counter] = Char;
++counter;
}while(Char != file.EOF());
seem like good but it a infinite loop;
any help?
|
|
|
|
|
change
while(Char != file.EOF());
to
while(!file.EOF());
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
|
For standard messagebox, there are push button options like MB_OK, or
MB_OKCANCEL. Could I change the caption of these buttons like in place of CANCEL, say EXIT?
Any quick method for that?
|
|
|
|
|
If you want to spend some effort to change the text of the buttons it is better to design your own popup message window that will look eligant and match ur application them and change the text the way you want it.
a customised sample that you may be interested in
Click Here[^]
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
Clearly, no you can't...
TOXCCT >>> GEII power
|
|
|
|
|
You can modify message boxes with a bit of trickery:
http://www.codeproject.com/dialog/delaymessagebox.asp[^]
But then again, they're pretty simple beasts - you may just like to create a dialog class of your own, or use something like this:
http://www.codeproject.com/dialog/xmessagebox.asp[^]
Be aware, message boxes are often unecessary and anoying - be certain such a message is required before adding it.
How do you move in a world of fog, That's always changing things?
Makes me wish that i could be a dog, When i see the price that you pay.
|
|
|
|
|
Shog9 wrote:
Be aware, message boxes are often unecessary and anoying - be certain such a message is required before adding it.
LOL
The ONLY time I use a MessageBox is to annoy me into fixing something - sort of a super //TODO:
Paul Hooper
If you spend your whole life looking over your shoulder, they will get you from the front instead.
|
|
|
|
|
This article here:
support.microsoft.com/support/kb/articles/q155/9/18.asp
shows how to add scrolling to a CFormView. Its a short
paragraph of code. It works, but when I keep the program
with the scrolling open and then click another program,
I get an error at this line:
if (GetFocus()->m_hWnd == pWnd->m_hWnd)
the first line. It doesn't like the GetFocus() command.
Any ideas on how to get rid of the error. Please, any
response any one can give me will be greatly appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
this is the text from msdn
A pointer to the window that has the current focus, or NULL if there is no focus window
so the statement GetFocus()->m_hWnd will fail if GetFocus returned NULL (memory exception)
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
Any code change recommendations. I tried alot of different
changes including:
if (GetFocus()->m_hWnd == pWnd->m_hWnd ||
GetFocus()->m_hWnd == NULL)
but I am not having any luck
|
|
|
|
|
Its all wrong.
CWnd *pFocusedWnd;
pFocusedWnd = GetFocus();
if(pFocusedWnd->m_hWnd == pWnd->m_hWnd)
...
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|