|
Some other folk posted a message some days ago about using a hidden CRichEditCtrl for printing purposes. Doing a quick search on the net yielded this article. Also, creating a simple RFC on the fly is easy.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I have a very annoying problem, and I've got no idea how to fix it : when I type some code in Visual Studio, the parameters of methods, or the available methods of an instance don't appear !!
It used to work !!!
Anyone knows how to switch this feature on ?
Thanks !
Jerome
|
|
|
|
|
Just guess:
Tools--->Options--->Keyboard
Change some of configuration there
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
Close VS, delete the projectname.ncb file in the directory where you have your project, and start VS again...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Hi everyone. Is there existing source code, or perhaps someone could explain to me how, to allow a tooltip to pop up over a combo box when the user puts the mouse over the combo box? MS Word does this when the user puts the ouse cursor over the font size combo box on one of the control toolbars. I have a font size combobox on a control bar, and I want the tooltip to pop up when the user puts the mouse over it. Thanks in advance!
|
|
|
|
|
In CP there is article about List box with tooltip support,check it,they are the same.
You have to subclass,from CComboBox and ovverride some functions that you can see in that aticle.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
This is the technique i use (this is probably an MFC-only technique):
- Create the toolbar with a placeholder button at the position you want the combo box to be.
- Give the placeholder button the same ID as the combo box.
- Enter a description for the placeholder button. Put a newline within the description; all text after the newline will be the tooltip.
- After the toolbar is created, modify the placeholder button to be as wide as you wish the combo box to be, and make it a separator.
- Make the combo box a child of the toolbar, give it the same ID and position as the placeholder button (the ID bit is critical to having it work).
- Set the owner of the combo box to be the window you wish to recieve combo box messages.
If the toolbar is in a CFrameWnd -derived window, you should be good to go. If not, you'll have to do a little extra work to handle tooltip notification messages, but otherwise it's pretty much the same.
good luck!
farewell goodnight last one out turn out the lights Smashing Pumpkins, Tales of a Scorched Earth
|
|
|
|
|
Hi,
I have a SDI Application.In InitInstance() of my application i have
SetWindowPos(.....);
ShowWindow(SW_SHOW);
My problem is it looks as a momentry shift before putting up the main window.
Could anyone have any idea?
Thanks
Neha
|
|
|
|
|
Override PreCreateWindow for main frame and set window position there.
|
|
|
|
|
I wanted my window to be topmost so i used setwindowpos()..
|
|
|
|
|
This can be done from PreCreateWindow using CREATESTRUCT::dwExStyle, WS_EX_TOPMOST flag.
|
|
|
|
|
Yes,You are right.i will try with that..
|
|
|
|
|
|
|
I had tried that,still i get the same problem..
|
|
|
|
|
Which flags are you using with SetWindowPos?
Either you use:
SetWindowPos(NULL, x, y, cx, cy, SWP_HIDEWINDOW | SWP_NOMOVE | SWP_NOSIZE);
ShowWindow(SW_SHOW)
or
MoveWindow(...)
ShowWindow(SW_SHOW)
or
SetWindowPos(NULL, x, y, cx, cy, SWP_SHOWWINDOW);
Cheers,
/Fredrik
Sonork ID: 100.11430:PhatBoy
|
|
|
|
|
I had used the first one with &wndtopmost as first parameter.
Neha
|
|
|
|
|
I meant the nFlags parameter. If you supply SWP_SHOWWINDOW and then call ShowWindow(SW_SHOW) then you have two "show". My guess is that that is your problem. Have you tried the alternatives I suggested? Btw, with the third one, remove the ShowWindow call.
Cheers,
/Fredrik
Sonork ID: 100.11430:PhatBoy
|
|
|
|
|
I had written SWP_HIDEWINDOW inSetWindowPos().
Ok,I tried with SWP_SHOWWINDOW & no ShowWindow(SW_SHOW).
Still there is no change..
|
|
|
|
|
It seems to work fine for me. Have you tried it the way Alex Farber described?
Cheers,
/Fredrik
Sonork ID: 100.11430:PhatBoy
|
|
|
|
|
Put this code in your OnCreate of MainFrame not PreCreate
SetWindowPos(&wndTopMost, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
ShowWindow(SW_SHOW);
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
Hello,
I want to open a dialog box openfile but I don't know how to make it open always in the same directory (the directory where the .exe is), in a MFC project of course
Thanks.
|
|
|
|
|
I guess you're using CFileDialog , right? If so, then between the construction of a CFileDialog (let's call it dlg ) and the line to dlg.DoModal() set dlg.m_ofn.lpstrInitialDir to the path of your exe. This path you can obtain with ::GetModuleFileName(NULL,...) , stripping the .EXE file name out of the result (leaving then only the path, which is what you want).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi !
It´s possible to convert from OLE_HANDLE to a normal HANDLE ( for example HENHMETAFILE).
What´s the difference between a Handle and one OLE_HANDLE ?
Thanks in advance, Bye !
Braulio
|
|
|
|
|
I have a project which I added to another project in an effort to make the new project dependent on some of the classes there. In VC studio, I check the box so that the project is dependent on the new project. I added the header into the old project for the class I want to use but I get linking errors.
What am I doing wrong? I do not want to always add the classes I write into every project each time.
Thanks in advance. I have received so much help lately and appreciate it very much.
|
|
|
|