|
I just saw it and that is not exactly what I need: I want to increment the file and product version numbers and also have to do some version control stuff before I do this.
I just need to know how I can a Custom Build option/tab to an empty project.
Anyone got a clue on how to do this ?
|
|
|
|
|
I NEED A POINTER TO ANOTHER DIALOG, WOULD SOMEONE PLEASE DETAIL HOW I CAN DO THIS. PLEASE
Kind Regards
Kevin
|
|
|
|
|
CDialog* pDlg = &AnotherDialog;
please say more, and we'll be glad to help you more ...
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
What I'm trying to do is as follows: I've DialogA and DialogB. DialogA has a EDIT BOX (say EBOX1). Dialog B consists of a Button (say BUTTON1). When I press BUTTON1 on DialogB, I want a message to appear on EBOX1 of DialogA.
I would like to use the API SetDlgItemText
Suggestion very much appreciated.
|
|
|
|
|
you need to pass DialogA to DialogB to be able to access it.
something like this draft :
...
DialogB dlgB;
dlgB.SetOtherDialog( &dlgA );
...
DialogB::SetOtherDialog( DialogA* pDlgA )
{
m_pDlgA = pDlgA;
}
...
DialogB::OnButtonClick()
{
if ( m_pDlgA != NULL )
{
m_pDlgA->SetTextOnControl( );
}
}
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Haven't you asked this same question twice before? Are the responses you're getting not working? The ones I've seen look right on the money.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
also see my answer to 'MFC Dialog member sharing'. You should be able to see it by clicking 'next' at the bottom of this page
If it's broken, I probably did it
bdiamond
|
|
|
|
|
Where have you defined the dialog classes? In MainFrame or directly in some function?
Robert-Antonio
"CRAY is the only computer, which runs an endless loop in just 4 hours"
|
|
|
|
|
anybody have idea in creating a pie chart n bar chart (read data from file) with visual c++ n opengl programming?
|
|
|
|
|
I want print in MFC in a same document an horizontal and a vertical page !
How can I do ?
|
|
|
|
|
You'll need to set up a DEVMODE for each page orientation and call ResetDC to change the current orientation from/to Portrait or Landscape.
onwards and upwards...
|
|
|
|
|
This problem is often sent here. See my answer, that I posted a month ago.
Robert-Antonio
"Czech Railways discovered, that in case of disaster the most damaged wagons
were the first and the last. So they decided to create trains without them."
|
|
|
|
|
Hi,
I'm doing a little project in MFC. I want to be able to move up and down between my 12 Edit Controls with the arrow keys. The TAB key only goes down, I want to go up too.
I'm a beginner and I did not find informations on internet about this. Can someone indicate me to a article or an example on the subject. It must be simple, but my knowledge of MFC is limited.
Thanks
Dave
|
|
|
|
|
TAB goes forward in the taborder, SHIFT+TAB goes backwards.
Roger Stewart
"I Owe, I Owe, it's off to work I go..."
|
|
|
|
|
|
Hmm. If the edit controls are single line, you can make the arrow keys do this.
If they are multi-line (and I'm guessing they aren't), you wouldn't want to.
The obvious question is WHY?
The use of TAB and Shift-TAB is a perfectly acceptable standard navigation technique.
What I'd do if I had to do this is derive from CEdit (CEditWithUpDown), and have it check in OnKeyDown for the up/down arrows, and if they were found, use GetNextDlgTabItem to find the next/previous control, and set focus to that.
Steve S
|
|
|
|
|
Thanks, I didn't know the Shift+Tab! But I want to use the arrow keys too, I think it will be easier to navigate between the edit controls and more instinctive. And also, the persons who will use my little program are already used to a similar program that navigates with the arrow keys.
My Edit controls are all single line, so I'll do what you suggest Steve, Thanks.
By the way, this web site is really nice, it's helping me a lot to learn about MFC and C++.
Dave
|
|
|
|
|
You may be able to do it by overriding the controlling windows PreTranslateMessage function and putting in this code:
if (pMsg->message == WM_KEYDOWN)
{
CWnd *pWnd = GetFocus();
if (pWnd)
{
if (pWnd->IsKindOf(RUNTIME_CLASS(CEdit)))
{
switch (wParam)
{
case VK_UP:
pWnd = pWnd->GetNextWindow(GW_HWNDPREV);
if (pWnd)
pWnd->SetFocus();
return TRUE;
case VK_DOWN:
pWnd = pWnd->GetNextWindow(GW_HWNDNEXT);
if (pWnd)
pWnd->SetFocus();
return TRUE;
}
}
}
}
I just threw this code together after a quick scan of the MSDN. It may work as required.
Roger Allen - Sonork 100.10016
Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
|
|
|
|
|
I am trying to open a file where the filename is contained in a variable. This is what it is so far
#include <iostream>
#include <fstream>
#include <string>
#include <iomanip>
using namespace std;
int main()
{
fostream saveFile;
string file = "file.dat";
saveFile.open(file);
cout << "The file " << file << " was created!" << endl;
return 0;
}
And it just isn't working. Any help?
|
|
|
|
|
saveFile.open(file.c_str());
Roger Allen - Sonork 100.10016
Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
|
|
|
|
|
Christian Graus wrote:
Please don't use fopen, unless you're using C and not C++. Use iostreams where you can.
How about CreateFile ? I guess it is also a good way of reading n writing to a file.
|
|
|
|
|
Like I said, use iostreams where you can, it's a much better framework. There are valid reasons for using the Windows specific methods though, not least that the error messages you get back are better.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Christian Graus wrote:
use iostreams where you can, it's a much better framework
I will agree to an experienced person. 
|
|
|
|
|
Is there anyone out there who's had experience with this library? I'm new to these large libraries and I've no idea how to install it so that I can use it in a program. My question is basically how to I add the library to my project so I can use it? Do I have to add a lib file or something? Any help would be much appreciated. Step-by-step instructions would be the best because I am totally lost on this.
Thanks.
- monrobot13
|
|
|
|
|
Doesn't boost come with these instructions ?
You need to include the right header files, and link to the right lib files, which means you'll want to add to your projects search paths. What version of VC are you using ?
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|