|
Yes ON_WM_NCACTIVATE is there
We are not getting as far as the OnNcActivate routine - we are just not getting the message from Windows for the child window.
Thanks for the response Mark. Any other ideas?
Sandy
|
|
|
|
|
Sandy Kinghorn wrote: we are just not getting the message from Windows for the child window
You're not trying to catch it in the parent, right?
Mark
|
|
|
|
|
Trying to catch via the windows message map. OnNcPaint is being passed through the map. OnNcActivate is not.
The window causing problems has a style of child set in its proerties, and is used as a child of a modal dialogue. Several instances are created o the fly, and need to indicate active one via its title bar.
thanks
Sandy
|
|
|
|
|
Sandy Kinghorn wrote: ...used as a child of a modal dialogue...
I think the built in activation only works on "top-level" windows, not on child windows. I tried
with imbedded overlapped children an couldn't get it to work either, whether the parent dialog
was modal or modeless.
The only way I know of to get the built in activation behavior with overlapped child windows is
to use MDI windows. Not necessarily a desired solution.
Otherwise you could look into indicating the active window some other way - drawing the title bar
yourself, changing the window frame appearance, etc.
Mark
|
|
|
|
|
I want to have a key shortcut to call a dialog in an MFC Application. CFormView I can do it in CView but for some reason I can't seem to get it to work in CView if anyone knows how please tell me.
Thanks
Jenn
|
|
|
|
|
You can use an "Accelerator" and in its handler you can open the dialog you want.
Your text is missing punctuation, so I am not sure I was able to understand it.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
I never read over my message sorry it didn't make much sense. I tried an accelerator but for some reason nothing seemed to happen. Do you know how exactly to do it???
|
|
|
|
|
How to get reference count on File handle... I mean how many process opened the paticular file...
|
|
|
|
|
The best is to open a file only for reading and writing and than giving it free. Other things are bad style.
Greetings from Germany
|
|
|
|
|
I don't see any API that exposes a handle's reference count.
Mark
|
|
|
|
|
i need to help in open gl programming in visual c++..can i post my doubt here..is this the right place...pls reply me as soon as possible...
|
|
|
|
|
makaveli_07 wrote: can i post my doubt here..
please don't cross post... though I can understand the reasons why asking in every forum with some of the heavy handed dealings with posters recently....
If the question is about specific implimentation, how to write the code, or what code to write, or how to use the API in C++ this is the "best" not necessarily the only fit.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
I need to write some unicode text (using ScriptString API) in a dialog window. In main window I would place the drawing stuff in WM_PAINT, but how to deal with dialogs? Do I need to create some owner-drawn element and catch WM_DRAWITEM? If so, which owner-drawn element? I have never created custom controls, hope this won't end up with doing something that challenging.
If you can give also some advice how to make Unicode text's bacground transparent / custom color, if it is possible with a huge amount of work?
Thanks, and try to be as clarify as you can, I have very little WinAPI/ScriptString/Uniscribe/Unicode/whatever experiences.
|
|
|
|
|
i have an assignent to read txt from a file and then remove the extra spaces in the txt. so far i can open the file and display the text. i can't come up with a way of removing the spaces. i have been advised so far to either use strcmp, which i am not sure where that is going to get me, and to 'assign' the individual text to an array and then rejoin the array without the spaces. i firstly don't know how to assign the text to an array. when i try i get an error when compiling saying that i can't convert from 'string' to 'const char*'. can someone please help. i am new so please be gentle.
my code so far:
#include <iostream>
#include <fstream>
#include <string>
using std::cout;
using std::endl;
using std::string;
using std::getline;
int main ()
{
string myStringErrors;
std::ifstream file("Lab1.txt"); //name of orignal file
if (!file)
{
std::cerr<<"Can't open file"<
|
|
|
|
|
use std::string::c_str() to get the C-style string contained in the std::string object
also, please use the <pre></pre> html tags in your messages when you post some code samples in the forum
|
|
|
|
|
i am not sure what you mean by that. how do i use std::string::c_str? what goes in the ()? thanks for the code posting help.
|
|
|
|
|
you put nothing in the parenthesis, this function receives no parameters :
std::string str = "hello";
char* psz = str.c_str();
printf("%s", psz);
|
|
|
|
|
|
zoobiskuit wrote: i can't convert from 'string' to 'const char*'
This is done by using std::string s member-function c_str() , which returns a const char* to the string contained.
You can the go through this const c-string on a char by char basis and copy anything save the extra spaces to another string.
Hope this helps.
P.S.:
"The light at the end of the tunnel is the light of the oncoming train"
or
"Due to the present economic uncertanities, the light at the end of the tunnel will be switched of until further notice"
-- modified at 7:41 Wednesday 24th January, 2007: fixed typo(notive -> notice)
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
jhwurmbach wrote: "Due to the present economic uncertanities, the light at the end of the tunnel will be switched of until further notive"
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
Hi,
I need to compile a cpp program using cl.exe
How do i compile a cpp program using cl.exe ?
Thanks.
|
|
|
|
|
you don't need to start a new thread again and again
have you tried to type cl.exe /? in command line to have the syntax ?
and as it might be a bit too huge, have you looked in the msdn ? the information is obviously there
|
|
|
|
|
Can you give the msdn link ?
Thanks.
|
|
|
|
|
|
I thought you would have different ideas .
Thats d reason i asked you that link.
I have seen that link before. Still i need more articles about it.
Thanks.
Nice things do nice works
|
|
|
|