|
Remove the windows.h and use the afxwin.h
- NS -
|
|
|
|
|
hai..
already i tried this.., still it is throwing error. becos i am using MSMQ in my project. it requires mq.h header file. this requires the windows.h header file.
|
|
|
|
|
But afxwin.h includes the windows.h
- NS -
|
|
|
|
|
D.Mani wrote: it requires mq.h header file.
So include that in the project's stdafx.h file, below the Afx-related includes.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
use #pragma once or ifndef / ifdef precompiler instructions to avoid repetitions
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Nelek wrote: use #pragma once or ifndef / ifdef precompiler instructions to avoid repetitions
mfc doesn't allow you to include Windows.h with it! so ifndef/ifdef will be of no use!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Ahhhmmm
the assistant include these by default.
#include < afxwin.h >
#include < afxext.h >
#include < afxdisp.h >
#include < afxdtctl.h >
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include < afxcmn.h >
#endif // _AFX_NO_AFXCMN_SUPPORT
and with this it is supposed to have the most of the "standard" MFC functionality, isn't it?
Maybe adding one of them....
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
yeap you are right
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
how do i implement this as well...please help me with some example as well with a few reference as well.Thank you
|
|
|
|
|
How do i implement this...please do help me ...an example would be really thankful with links as well.
|
|
|
|
|
Would you rather us just come over to your place and code it up? I think that would be the most beneficial for all parties involved.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Feeling a bit snarky today, eh?
Not that I have *ever* left a sarcastic reply to a silly question. Noooo, not me.
Iain.
|
|
|
|
|
Admittingly, yes. But I still refrain from being rude.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello,
I am tying to resize a window in the WM_SIZE message handler but I am not able to resize it properly.
What is cx,cy ?
It says it is new width and height of the client window but how do I use it to modify the window?
What are the co-ordinates I should start with?
Regards
Prithaa
|
|
|
|
|
If you are looking for restrict sizing dynamically, WM_SIZE is not the place. You have to use WM_WINDOWPOSCHANGING instead. Or if you need to just size the window, you can call SetWindowPos, or MoveWindow.
- NS -
|
|
|
|
|
hai...
cx and cy are new width and height only...but at that time of dragging ur window..u will get the new position rite?
which means ...when ever u r dragging or resizing ur window at that time u need to catch the x and y values at that point which u dragged....then pass that values to cx and cy.....this is the new width and height of ur window..
|
|
|
|
|
Hello,
Thanks for the replies.
But how can I catch the the new width and height?
I want to write window restored minimize maximize.
It is confusing to conclude which message handler (WM_SIZE WM_SIZING) to use.
Regards,
Prithaa
|
|
|
|
|
if you want to set the window maximun and minium width and height, then take a look at WM_GETMINMAXINFO message, this message will be sent to all the window by the framework, just fill the MINMAXINFO struct, rest will be taken care by the framework itself
Hope it will help...
Do your Duty and Don't expect the Result
|
|
|
|
|
C++ has several utilities to manipulate strings declared as char var;, i.e. strncpy(a,b,n); where a,b are strings, n is the number of characters, etc. However, when one declares a variable as a CString, and uses the same utility, the compiler says that it cannot convert the CString to a char variable. Are there other C++ or visual C++ 6.0 utilities to work with CString variables? Please provide help on this subject. Thanks, Sid Kraft
Sid
|
|
|
|
|
When you need a const string you can use a CString directly.
When it's being used in a non-const fashion, use CString::GetBuffer.
char *strncpy( char *strDest, const char *strSource, size_t count );
(i.e. Here you can use CString as is for the second parameter since the LPCTSTR operator kicks in. If you use CString for the first parameter, you need it to be non-const. In other words, you need a buffer, so use CString::GetBuffer as the first parameter and later calling CString::ReleaseBuffer before calling any other CString member functions.)
|
|
|
|
|
cast it to (LPTSTR)(LPCTSTR)CString Object
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
Michael Dunn wrote: That has to be a joke.
thats the great mistake i have done!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
But why great mistake?;);P
|
|
|
|
|
sidkraft wrote: However, when one declares a variable as a CString, and uses the same utility...
And why in the world would you want to do that?
sidkraft wrote: Are there other C++ or visual C++ 6.0 utilities to work with CString variables?
They are called methods, and CString has plenty of them.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|