|
Your casting was wrong
You should have done it this way...
/********Your Code *****************/
(CGeneratorView *)pFirstView-> OnPopupRemove();
/************************************/
/********Suggestion*****************/
((CGeneratorView *)pFirstView)-> OnPopupRemove();
/************************************/
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
I want to display files in listview using icons associated with file ext.
but I can't find where does window store info about files to extract icons from. Can somebody tell me how to do that ?.
Thanks in advance.
|
|
|
|
|
One solution is SHGetFileInfo().
Kuphryn
|
|
|
|
|
probably i lost my eyes looking 2 hours in msdn for this function.
Thanks for your help.
|
|
|
|
|
Hi,
I have a virtual (LVS_OWNERDATA) list control working just fine. Only problems is I can't programatically change an item's state. Docs say that the virtual list view does manage selection+focus state, and, when I click around, it surely does. But SETITEM, modifying the state, returns false, and does nothing.
Any ideas?
[edit] found it - LVM_SETITEM doesn't work, but LVM_SETITEMSTATE does. (yes, I was filling the LVITEM correctly)[/edit]
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|
|
Post the code that sets the item state.
Kuphryn
|
|
|
|
|
thx - found it (LVM_SETITEM doesn't work for the virtual ctrl, but LVM_SETITEMSTATE does)
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|
|
Hi!
How to extand and access the internat Office object structure.
Is there any Dev Kit for Microsoft Partners that in not available to "normal" users?
Something like NOKIA back entrence!?
gicio
|
|
|
|
|
ifstream fs("demo.txt" );
'fs' uses undefined class 'basic_ifstream<char,struct std::char_traits<char=""> >'
C:\IniFile.cpp(59) : error C2440: 'initializing' : cannot convert from 'char [9]' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
Error executing cl.exe.
This is the constructor
ifstream( const char* szName, int nMode = ios::in, int nProt = filebuf::openprot );
what am i missing ?
|
|
|
|
|
Do you have the right #include files in place? Is the UNICODE directive defined?
|
|
|
|
|
no it hasnt been defined . so what are the includes that I need ?
|
|
|
|
|
This worked for me:
#include < fstream.h >
void main( void )
{
ifstream fs("demo.txt");
}
|
|
|
|
|
Hello all,
Is there a C++ regex library in MFC I can easily use? What about without MFC (ie. command line app)?
I've been reaquainting myself with C++ and have been using Borland's Bcc32 compiler but I do have VS.NET and can do MFC.
*->>Always working on my game, teach me
*->>something new.
cout << "dav1d\n";
|
|
|
|
|
MFC does not provide such a class. You might want to search CodeProject, or use Google to do a broader search.
|
|
|
|
|
Check out the Boost[^] library. They have a regular expression parser.
Brad
|
|
|
|
|
A mighty fine package too!
--
Frivolous Theorem of Arithmetic: Almost all natural numbers are very, very, very large.
|
|
|
|
|
Yeah, if you can compile it all right...
I was succesful in compiling bjam (their 'make' like tool) and then compiled the regex libraries (ironically, using 'make'). Now when I import it (#include <boost regex.hpp="">), however, one of the *.LIB files cannot be located (BOOST_REGEX_BCB5_SSS.LIB).
C++ newbie time: how does one resolve this easily?
*->>Always working on my game, teach me
*->>something new.
cout << "dav1d\n";
|
|
|
|
|
|
In atlrx.h file you can find regular expression classes that ship with VC.NET.
|
|
|
|
|
Hi!
I tried to use http://www.codeproject.org/miscctrl/colour_picker.asp in my project. In my dialog it works well!!!
But if i use in in a ttolbar (without using the ColourPick class) the popup is displayed for about 1sec and then it dissapears.
<br />
void CWordChildFrame::OnToolbarDropDown(NMTOOLBAR *pnmtb, LRESULT *)<br />
{ <br />
CRect rc;<br />
m_wndStyleBar.SendMessage(TB_GETRECT, pnmtb->iItem, (LPARAM)&rc);<br />
m_wndStyleBar.ClientToScreen(&rc);<br />
<br />
new CColourPopup(CPoint(rc.left,rc.bottom), <br />
COLORREF(RGB(255,255,255)), &m_wndStyleBar, "Auto","More"); <br />
}<br />
The strange is, that if i remove the "//", the message box is displayed and then the colorpicker works well. It is shown until i click on a color.
What have a done wrong?
Thanks mike
|
|
|
|
|
It's hard to say without knowing how the CColourPopup class works. Have you tried contacting the developer of the class?
As a side note, I want to point out that creating the CColourPopup object like you're doing (with new) is bad practice since the memory does not appear to be released. If each CColourPopup object does not somehow delete itself, it will remain in memory forever and more will come as the user keeps popping it on the toolbar.
Regards,
Alvaro
Hey! It compiles! Ship it.
|
|
|
|
|
Hi!
Thanks for your answer!
I found the problem: i removed the TBSTYLE_DROPDOWN flag from the toolbar style and it worked! Dont ask my why - it seems that the message handling of TBSTYLE_DROPDOWN works differant than the standard toolbar buttons-message.
cya
|
|
|
|
|
I have on the screen a rich edit control (CRichEditCtrl) that needs to be printed/drawn on a different device. There is some graphics item also being drawn. I have tired different items to draw this text out and their results. These are:
- Using Format Range to output the text.
- The text comes out looking good. It does not line up with the graphics that are displayed on the screen in a WYSIWYG format. As an example; drawing a line at the end of a string on the screen. When printed this same string/line does not line up as it appears on the screen. The height of the font (lines are drawn at top and bottom) seem to indicate that the font height is correct.
- Using ExtTextOut with Kerning pairs to output the text.
- This palces the strings out nicely. The graphics looks pretty good when using variable pitch fonts.
- Using Courier New Regular, it too looks pretty good.
- Using Courier New Bold does not look good. The width of the text is smaller than it appears on the screen. The height again appears to be correct (with the line above the text and below).
- Using TextOut to output the text.
- This does not even appear to be close!
So, my question is there a better approach than the ones I have tried. I have the requirement to create a WYSIWYG editor that contains text/graphics. At first, I chose the Rich Text control so the users have the ability to change fonts within the control. With out using the FormatRange to print the text, I have to scan each character looking for a change in the font. The other problem, in the MSDN documentation, it states that to have a WYSIWYG text using the CRichEditCtrl, you need to associate the control with a printer. The problem is, when the user creates the document, this will not be known. I need to be able to have a device independent control and drawing.
If you are interested in seeing the test code that I'm using, please email me and I can zip it up and send it.
Any help would be appreciated.
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
I'm now trying to get the position of the characters in the control, then outputting them seperately. Seems better, the graphics is much closer to what is on the screen. It is off some (about 1/2 of a character.) I'm wondering if it is a round off error?
Larry
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
In progam I need to do own tray how I can do this?
|
|
|
|