Click here to Skip to main content
Email Password   helpLost your password?
Unanswered questions View unanswered questions in the C / C++ / MFC forum    RSS: RSS Feed
Home > Forums > C / C++ / MFC

You must Sign In to use this message board.
 
 
Per page  Date Filter 
 FirstPrevNext
AdminHOW TO ANSWER A QUESTION
Chris Maunder
23:37 12 Jul '09  
Apologies for the shouting but this is important.

When answering a question please:
  1. Read the question carefully
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
  3. If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
  4. If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.

cheers,
Chris Maunder

The Code Project Co-founder
Microsoft C++ MVP

AdminHOW TO ASK A QUESTION
Chris Maunder
18:19 12 Feb '09  
For those new to message boards please try to follow a few simple rules when posting your question.
  1. Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.

  2. Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.

  3. Keep the subject line brief, but descriptive. eg "File Serialization problem"

  4. Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.

  5. Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.

  6. Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.

  7. If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode HTML tags when pasting" checkbox before pasting anything inside the PRE block, and make sure "Ignore HTML tags in this message" check box is unchecked.

  8. Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.

  9. Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.

  10. Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.

  11. If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.

  12. No advertising or soliciting.

  13. We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.


cheers,
Chris Maunder

The Code Project Co-founder
Microsoft C++ MVP

QuestionModeless dialog frame sizing in MFC MDI
Vaclav_Sal
1 hr 32mins ago 
Could someone more experienced with dialog frame sizing clarify for me how does MFC MDI determines the size of the MDIChildFrame?  
My modeless dialog is in FormView ( Property Sheet component) and I can re-size that by changing the dialog resource. I am using tabs and the dialog frame follows the largest tab / page.
When I use ResizeParentToFit() in OnInitialUpdate   of the FromView I end up with a small frame.
However, when I skip the ResizeParentToFit() and use ShowWindow(SW_SHOWMAXIMIZED) I get different , large, FormView frame.
I stepped thru the ResizeParentToFit() and still do not see where are   the view area dimensions coming from. They seems to be the actual dimensions used by ResizeParentToFit() and ShowWindow(SW_SHOWMAXIMIZED) .

What I really want is to maximize the FormView programatically to fit the whole MainFrame.
The automatic sizing the dialog frame itself is fine, but not exactly what I want.
Any constructive help is as always appreciated.
Thanks for your time.
Vaclav
AnswerRe: Modeless dialog frame sizing in MFC MDI
KarstenK
10mins ago 
you got to do it in your own codee.
look at this Layout Manager for Dialogs, Formviews, DialogBars and PropertyPages[^]
Press F1 for help or google it.
Greetings from Germany

Questionlarger toolbar images
josip cagalj
3hrs 58mins ago 
Hi to all.
Is it possible to have a 32x32 images on toolbar while keeping 16x16 in menu.
I created toolbar resource (IDR_TOOLBAR1) and set it's button size as 32x32 and load it:
if (!m_wndToolBar.CreateEx(this,...) ||
!m_wndToolBar.LoadToolBar(IDR_TOOLBAR1 ))
{
...
}
When compiled and started toolbar correctly shows large btn images but menu is also enlarged showing 32x32 item images!? How to have menu images as before (small 16x16)?

My app info: SDI, VS2008
Thanks in advance!
Questionmaking a modelessdialog box as modal
narayanagvs
4hrs 4mins ago 
Hi,

I have an MDI application.I create an a Modeless dialog on a menu click.I would like to make it behave like a Modal dialog box. How should I do that?


Thanks
Satya
Today is a gift, that's why it is called the present.

AnswerRe: making a modelessdialog box as modal
Rejeesh.T.S
3hrs 59mins ago 
You can try disabling the parent of the dialog by using EnableWindow(FALSE).
GeneralRe: making a modelessdialog box as modal
narayanagvs
3hrs 37mins ago 
Hi,

Thanks for the reply. But I also dont want my mainframe window to receive messages.I want the exact behaviour of DoModal.

Thanks
Satya
Today is a gift, that's why it is called the present.

GeneralRe: making a modelessdialog box as modal
Alison P
3hrs 25mins ago 
narayanagvs wrote:
I want the exact behaviour of DoModal.

Sorry, I don't understand. If you want 'the exact behaviour of DoModal' then why do you create a Modeless dialog? Confused

Smile
Ali

GeneralRe: making a modelessdialog box as modal
narayanagvs
2hrs 59mins ago 
I just want to know. This is a question asked to me.

Satya
Today is a gift, that's why it is called the present.

GeneralRe: making a modelessdialog box as modal
Alison P
2hrs 50mins ago 
OK, thanks for answering, I don't think I can help you, I hope someone else can.

Smile
Ali

AnswerRe: making a modelessdialog box as modal
Alison P
3hrs 58mins ago 
This link explains all about modal dialog boxes:-

http://msdn.microsoft.com/en-us/library/ms644996(VS.85).aspx#modal_box[^]

Smile
Ali

AnswerRe: making a modelessdialog box as modal
Mohan Ramachandra
3hrs 50mins ago 
Just call DoModal [^] member function of the dialog in the, menu message handler.
AnswerRe: making a modelessdialog box as modal
KarstenK
17mins ago 
Create another dialog class with the dialog resource of your dialog.
Press F1 for help or google it.
Greetings from Germany

QuestionVC++2008(graphics)!
anassamar
4hrs 18mins ago 
Hi,
I am working in VC++2008 environment, Please Could you tell me why when I use the following header file:

#include;

the following error is appeard:

d:\work c++\alg_helbert\alg_helbert\df.cpp(53) : fatal error C1083: Cannot open include file: 'graphics.h': No such file or directory


I want to use the follwing functions:
setcolor Graphmode Textmode , lineto ……………!!!!

Thank you
thank you
soso

AnswerRe: VC++2008(graphics)!
Mohan Ramachandra
3hrs 38mins ago 
I think you are trying to compile the code, which was written using turbo c++ compiler? Because

anassamar wrote:
'graphics.h':
and
anassamar wrote:
I want to use the follwing functions:
setcolor Graphmode Textmode , lineto ……………!!!!

are graphical functions and header file provided in turbo c++ compiler.
AnswerRe: VC++2008(graphics)!
Avi Berger
12mins ago 
To add to Mohan Ramachandra's reply, this was a proprietary library for the DOS environment. In other words, this was a graphics library for use in DOS programs only, not Windows or anything else. It was also designed and provided by one company - it is not standard, is not a part of C, and not a part of C++.

While you certainly can do graphics for Windows, it is done differently. See here[^] for graphics stuff that is used with windows at the api level, though there is more in knowing when and how to use this stuff. Do note that normally in a windows program, one only draws to a window device context in response to a WM_PAINT message. (If you are using MFC, that would be in OnPaint or OnDraw. )

Graphics and display is different in Windows than it was in DOS. You have a lot of research and reading to do.

Good luck.
Please do not read this signature.

QuestionCompilation errors
Aabid
5hrs 3mins ago 
hi friends,

i am using Visual studio 6.0, Windows.

i dowload an opensource project "wput" :: Wput is a command-line ftp-client that looks like wget but instead of downloading, uploads files or whole directories to remote ftp-servers.

http://wput.sourceforge.net/[^]

as i compile the project i got tons of errors,

ftp-ls.c(40) : fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory

unistd.h is not present anywhere in my system.

Any suggestions!
AnswerRe: Compilation errors
Cool_Dev
4hrs 59mins ago 
unistd.h is not present anywhere in my system.


thats why you are getting the error. Find out that file, and set the correct 'include path' in project settings. Big Grin
AnswerRe: Compilation errors
HimanshuJoshi
4hrs 55mins ago 
Can you use the pre-compiled binary instead of compiling it?
"I'm willing to admit that I may not always be right, but I am never wrong." - Samuel Goldwyn

GeneralRe: Compilation errors
Aabid
4hrs 36mins ago 
hi

i do not understand what you want to say?
can u explain little better
GeneralRe: Compilation errors
HimanshuJoshi
4hrs 34mins ago 
I want to say that in-order to use the functionality of wput can you just use the
binary file instead of compiling it? Or do you need to compile the source code?
"I'm willing to admit that I may not always be right, but I am never wrong." - Samuel Goldwyn

GeneralRe: Compilation errors
Aabid
4hrs 23mins ago 
ok..

i need to compile the source code.
GeneralRe: Compilation errors
HimanshuJoshi
3hrs 37mins ago 
Have you read the INSTALL file that comes with the source package. It will have the information on how to
compile.
"I'm willing to admit that I may not always be right, but I am never wrong." - Samuel Goldwyn

AnswerRe: Compilation errors
CPallini
4hrs 34mins ago 
Aabid wrote:
ftp-ls.c(40) : fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory

As the name suggest, unistd.h is a UNIX-like (maybe Linux) specific header.
Have you read the compiling instruction on the project's home page?
(I guess you may compile it on Windows provided you use, for instance, Cygwin). Smile
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]


Last Updated 10 Aug 2007 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2010