|
The curve is made up of connecting Bezier segments, each depending on two end points P0 and P3 and two so-called control points P1 and P2. Points in the segment are given by
x(k) = (1-k)3x0 + 3k(1-k)2x1 + 3k2(1-k)x2 + k3x3,
y(k) = (1-k)3y0 + 3k(1-k)2y1 + 3k2(1-k)y2 + k3y3,
where k ranges between 0 and 1.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi,
Can anyone tell me how to set the title of the main window in a SDI Doc/View Architecture app. Do i can totally replace 'untitled - Name Of App' ?
Regards
Richard
|
|
|
|
|
You can try to use CWnd::SetWindowText()
Hoope it help
Bye,
BogdanO
...the night is long ... but not long enought to do some real coding ...
|
|
|
|
|
The standard way of doing this is using <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_cdocument.3a3a.settitle.asp">CDocument::SetTitle</a> .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Add this to your PreCreate of your CMainframe :
cs.style &= ~FWS_ADDTOTITLE;
and after that use SetWindowText
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
|
|
|
|
|
Mazy,
Just noticed you tag line! Great choice
<p>
So, so you think you can tell
Heaven from Hell,
Blue skys from pain.
Can you tell a green field
From a cold steel rail?
A smile from a veil?
Do you think you can tell?
<p>
And did they get you to trade
Your heros for ghosts?
Hot ashes for trees?
Hot air for a cool breeze?
Cold comfort for change?
And did you exchange
A walk on part in the war
For a lead role in a cage?
<p>
How I wish, how I wish you were here.
We're just two lost souls
Swimming in a fish bowl,
Year after year,
Running over the same old ground.
What have we found?
The same old fears.
Wish you were here.
Paul Lyons
"What a long, strange trip its been".
- Robert Hunter/Jerry Garcia
|
|
|
|
|
Thanks Paul
It's so bad that there is not enough space to put all of
this song bellow my signiture every time I put message in CP
o,where is my signiture????
|
|
|
|
|
Hy!
I've creat a UI thread and now I've used ON_THREAD_MESSAGE to intercept a message post by the main thread using PostThreadMessage ...
The posted message arrived to the UI thread but it isn't dispach to the window that I have created and atached to m_pMainWnd of the UI thread.
Any idea how to solve this( eventualy an working example of ON_THREAD_MESSAGE or some kind of URL where I can find more info) ??
Thanx
Bye,
BogdanO
...the night is long ... but not long enought to do some real coding ...
|
|
|
|
|
PostThreadMessage , as its name suggests, submits messages intended for the thread itself, not any of its windows. So it's no wonder m_pMainWnd is not catching the message. ON_THREAD_MESSAGE must be located in the UI thread class. To route the message to the window, you have two options:
- Call the appropriate method of (or send a message to) the window from the thread message handler.
- Do not use
PostThreadMessage and submit the message directly to m_pMainWnd with PostMessage .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanx a lot!!
Bye,
Orbital^
...the night is long ... but not long enought to do some real coding ...
|
|
|
|
|
I need help writing a cpl file.
All references are useless and codes don't work.
Please contact me by email
|
|
|
|
|
It's fairly easy: build a DLL with exports the <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/Shell/reference/functions/cplapplet.asp">CPlApplet</a> function, rename it to have extension .cpl , drop it in the system directory and voilà you've got a new applet in your Control Panel.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I'm sorry.
Won't happen again.
However did u get my question ?
|
|
|
|
|
Try inserting APIENTRY just before CPlApplet .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
before adding APIENTRY ,I could debug the code but now no debug and the code just return 0 with doing nothing.
extern "C" LONG __declspec (dllexport) APIENTRY CPlApplet(HWND hwndCPL,UINT uMsg,LPARAM lParam1,LPARAM lParam2)
something else?
Thanks
|
|
|
|
|
Ummm... Sometimes it takes longer than desired to get these things fixed... Try removing __declspec(dllexport) (but keep APIENTRY !) and add a .DEF file (i.e. create it and add it to the project as if it were a .cpp file) like this:
LIBRARY "MYFIRSTCPL"
DESCRIPTION 'My first CPL'
EXPORTS
CPlApplet @1
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hello, In fact, I have a dialog box where I retrieve several information (name, address, etc), and I would like to create a letter (so a text document) using these informations and print it directly (no storage and differed print, but asking for printer ...).
The possibility to have different fonts/size in the letter, to be able to choose the printer, etc would be great.
Could someone indicate me the different steps (how to create document, how update it with variables linked to the dialog box, how ask for the printer, how to print it, how to change fonts, colors, etc) to arrive at this result .
At least a draft, i will look deeper by myself after.
Thanks in advance
DD
|
|
|
|
|
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
|
|
|
|