|
When I create the MFC dialog application (with the manifest generation enabled) my dialog should use the XP visual style common controls, right?
Well, it doesn't! Is there anything else I have to do?
-- modified at 19:18 Saturday 1st October, 2005
|
|
|
|
|
See this[^] MSDN article on how to enable XP visual styles in your VC6/VC7.x generated app.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
Thank you. It is working now.
And it looks much nicer now
|
|
|
|
|
|
Can anyone please tell me why this code code gives a segmentation? The
class NonLeafTrieNode
{
public:
NonLeafTrieNode(){};
NonLeafTrieNode(char);
private:
friend class Trie;
NonLeafTrieNode **ptrs;
char *letters;
int endOfWord;
bool isLeaf;
};
The code below are in the Trie class and I use this to access the isLeaf variable in the class.
int flag = p->ptrs[pos]->isLeaf;
if (!(pos == -1) && flag)
If I keep the isLeaf variable a boolean the code gives a segmentation fault, but whenever I make it a integer the code works perfectly.
Can anyone tell me why this happens.
Thanks a lot
LiquidE_SA
|
|
|
|
|
The implication from your code is that -1 is a possible value for pos . In that case, p->ptrs[pos] is never going to work...
|
|
|
|
|
LiquidE_SA wrote:
int flag = p->ptrs[pos]->isLeaf;
flag is an int and you are trying to assign a bool to it. When you change isLeaf to an int the types are the same.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
bool != int
--
Look straight into the light!
|
|
|
|
|
LiquidE_SA wrote:
int flag = p->ptrs[pos]->isLeaf;
change it to
bool flag = p->ptrs[pos]->isLeaf;
-prakash
|
|
|
|
|
I want to know that how to use SIP,H.323,RSVP,RTCP protocols in VC++.
|
|
|
|
|
On Sep 22 I put up this query, but without getting any answer:
I have the webbrowser in a program but want also to access the equivalent of this functionality:
internet explorer: Tools/internet options/general/fonts/language script
I expect it is not something exposed in the webbrowser, but otherwise.
Does anyone know how it can be done ?
SINCE then I have found how to do it, and since it is relatively straightforward, I am surprised not to get any answer.
The solution is given in the Microsoft book, Programming the Internet Explorer.
It all hinges on the lines:
hr=lpDispatch->QueryInterface(IID_IOleCommandTarget, (void**)&lpOleCommandTarget);
hr=lpOleCommandTarget->Exec(pguidCmdGroup,nCmdID,0,NULL,NULL);
where nCmdID =3 if you want the Internet Options.
If you are interested you will find all the details in the book.
Raymond Mercier
|
|
|
|
|
Thanks for your post, Raymond. Is this[^] the book to which you're referring?
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
Yes, that's it:
Programming Microsoft Internet Explorer 5 (Microsoft Programming Series) (Paperback,)by Scott Roberts
The material you need is on pp.259-262.
Although the book was written for IE5, and I am now using IE6, and Visual Studio 6 & 7, the code does not need to be changed, not even the GUID for CGID_WeBrowser.
Raymond
|
|
|
|
|
How can I redraw the full screen (all the windows)?
|
|
|
|
|
i guees you are talking of invalidate,or then go for GetDesktopWindow()(desktop handle) then invalidate that,i havent done its just a guess ,if you mean one from program then just invalidate().
|
|
|
|
|
Thanks for the response.
Unfortunately it didn't work
The reason I need to erase/redraw/invalidate everything is becouse I am drawing on the screen DC (GetDC(NULL)) but at the some point I want to revert changes.
I guess enumerating all windows and invalidating the visible ones could work but I tought the might be a better way...
|
|
|
|
|
InvalidateRect(NULL, NULL, TRUE) will invalidate all windows.
Now I need something like UpdateWindow or RedrawWindow, but for all windows.
-- modified at 13:22 Saturday 1st October, 2005
|
|
|
|
|
Enumerate all the windows and if the WS_VISIBLE style bit is 1, then set it to zero then back to 1 and this toggle will force a repaint. Send an F5 keystroke to the desktop window and it will redraw all the icons etc.
OR since you want to use the entire screen, create a window with no frame or menu and size it to the display then get the DC for that window. When that window is closed/destroyed all the other windows/desktop will redraw on their own. This is how many screen savers work!
|
|
|
|
|
Thank you. I think one of your methods will be perfect...
|
|
|
|
|
Hi
how to Insert BLOB images into Oracle Databse using ADO in vc++. Help me if possible. is there any way to use Stored Procedures in that.
Thanks
|
|
|
|
|
Hi again people. It's the weekend but I'm bustin' my neurons with some MFC. I have a basic MFC exe and when I create a dialogue2 from my main dialogue, dialogue2 isn't shown in the TaskBar. How can I make a secondary window of my application be represented in the TaskBar? I actually hide my main dialogue before displaying dialogue2, but still, dialogue2 ain't shown in that TaskBar... grrr.
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
You want the WS_EX_APPWINDOW style. You can set this in the dialog properties window with the "Application Window" flag.
|
|
|
|
|
Tell where you see the "Application Window" flag in the MFC designer of the Visual C++ 6 IDE ::- D. I don't. Anyway, I did it with SetWindowLong ::- ). Thanks! This type of setting wasn't very well described in MSDN but I did find it AFTER you told me.
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
Hi all,
I want have DLG application, which is not compiled with _UNICODE ( means it is not UNICODE ,right?). In that I am having one list control to display certaing strings.
In perticular, I want to display strings in UNICODE (WCHAR) in say 2nd col of list ctrl for all rows,
Is it possible to do this anyhow?
Without compiling application to as unicode!!!
Any suggestion?
Jetli
Constant Thing In World Is Change.
|
|
|
|
|
This is tricky but you can actually mix unicode and ansi windows within an Application. When you define _UNICODE all the macros get mapped their *W functions. So SendMessage becomes SendMessageW, etc. Windows converts between unicode and ansi between windows your behalf so that if you call SetWindowText from an ansi program to a unicode program, the recieving program will get unicode from the ansi that the sender sent.
Windows tells if a window is unicode or not by how it was created. So RegisterClassA would be an window procedure expecting ansi and RegisterClassW excepts unicode. You can change this by calling SetWindowLongPtrW and passing GCLP_WNDPROC with a new WndProc. Make sure to end your new WndProc with CallWindowProcA because the original accepts ansi. This will however make the entire control unicode.
If your really want to save every character you can and only want that column's strings in Unicode you can try a combination of LVS_OWNERDATA and LVS_OWNERDRAWFIXED to manage your own strings and drawing.
|
|
|
|