|
The bitmap is appearing in the correct place: location 0,0 of the Page. If you want the bitmap to appear at location 0,0 on the Sheet (the containing window that holds the buttons and the tab control), I believe you need to draw it manually from within the CPropertySheet -derived class. This is likely to cause problems, however, because the Sheet is not going to know that you are drawing things there.
You can obtain a temporary CWnd pointer for [Cancel] by calling GetDlgItem( IDCANCEL ) from within the CPropertySheet -derived class, after the Sheet proper has been created. Using that pointer, you can move, size, enable, change the text, etc. of [Cancel].
Peace!
-=- James.
"Fat people are hard to kidnap."
(Try Check Favorites Sometime!)
|
|
|
|
|
James,
Thanks for your response. I was able to place the bitmap on the property sheet. The problem is that when the pages get added, they overlay the bitmap. Is there anyway to have the pages added at some offset so they don't overlay the bitmap on the sheet?
Thanks,
Bob
|
|
|
|
|
Not that I know of, but you could place the bitmap/icon at the same location on each of the property pages. That is what I do...
Peace!
-=- James.
"Fat people are hard to kidnap."
(Try Check Favorites Sometime!)
|
|
|
|
|
We use MAKEFOURCC(c1,c2,c3,c4) to create a fourcc.
How can we get the four characters back from the FOURCC?
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
Use reference parameters or pointers
frisco wrote:
MAKEFOURCC(&c1,&c2,&c3,&c4)
|
|
|
|
|
How did you know to answer frisco's question before he even asked it
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
That's not what I mean.
FOURCC fourcc; (in fourcc there are four characters)
this gives something like this: 880175460
how can i retrieve the four characters from var fourcc?
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
I guess Prem Kamur needs to refine his psycic abilities
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
char *strFourCC = reinterpret_cast<char*>(&fourcc);
Then you could index the four characters. It will not be a valid null terminated string because there is no NULL, but you could still do strFourCC[0] and so on.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
I get syntax error on '('.
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
Sorry I forgot about the HTML formatting, here you go!
char *strFourCC = reinterpret_cast<char*>(&fourcc);
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
tnx
that's it allright
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
Hi,
Not sure if this is the right place to ask, but I am trying to use a regex parser to find some text in a text file. How would I write a regular expression that something like:
the word "Theodore" at the beginning of a line, followed by six lines of anything whatsoever, followed by a single lnie that I am iterested in.
I am having trobule matching part about find the next 6 lines with anything whatsoever in them
Thanks,
Aaron
|
|
|
|
|
It all depends on the syntax of your parser. But have you tried to make a definition for a line?
I will just use pseudo-code, but it would be something like this:
(0 or more characters) + (1 newline character)
Then in your large expression you could look for your target word, then 6 lines, and search for what ever in the single line that you are interested in.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
I am using the boost regular expression parser. I'm pretty new to it, I think it's basically like PERL.
How would I make a definition?
Thanks,
Aaron
|
|
|
|
|
I am sorry I am not familiar with either of those tools. However if you simply create a string definition to pass your regular expression in the boost kit, you can just create a string and enclose it in ( ).
Then you can construct a larger string from all of the smaller strings. There may be better ways to construct expressions with your parser, if I get a chance to look at boost I may post something a little more concrete.
Good Luck!
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Try this:
[code]
^"Theodore"(.*\n){6}
[/code]
This should do the first line and the 6 lines. (according to the standard used by the flex scanner)
Best regards,
Alexandru Savescu
|
|
|
|
|
I don't want exit Dialog by click Close button (x) default, help me!!!
|
|
|
|
|
Just handle the WM_CLOSE message but don't call the base class's handler.
You could also change the dialog style to not display the close button at all.
--
Dana Holt
Xenos Software
|
|
|
|
|
A better way is to handle WM_SYSCOMMAND and to do nothing (i.e. simply return) if the code is SC_CLOSE .
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
is it possible to enable/disable one tab from one propertysheet at run time??
how can create all the tabs , and then at run time, disable a tab makeing it gray and not able to click it??
thanks
Max
|
|
|
|
|
I do not think you can disable a menu item.
But you could delete and add the item back.
|
|
|
|
|
Paul DiLascia answered this question, search MSDN (Q&A: C++ in Microsoft system journal) for 'CTabCtrlWithDisable'.
|
|
|
|
|
I cover this in a demo in my MFC book (see sig). It's a fairly involved process, but here are the basic steps. Let me know if you need any additional help and I'll send you a demo app.
- Create a member variable to store the current tab index.
- Create an array member variable to hold all of the index values for the currently disabled tabs.
- Handle the TCN_SELCHANGING notification message to set the current tab index.
- Handle the TCN_SELCHANGED notification message to decide if you want to enable the tab to be activated. If you don’t, you must post a PSM_SETCURSEL message. In this message, the last active tab index is specified.
Let me know if you need it and I'll send you the demo app from the book
Cheers,
Tom Archer
Author - Inside C#, Visual C++.NET Bible
|
|
|
|
|
thanks for the help
i see that there is no standart way of doing this...
this is realy a good way
thanks
(will try it this weekend)
|
|
|
|