|
I order to be docked, I suppose the control bar should implement some virtual functions like CalcDynamicLayout and CalcFixedLayout .
Instead of CTabCtrl , maybe you can use CToolBar , wich incorporates a CTabCtrl , accessible by GetToolBarCtrl() .
As a sample of resizable control bar, you can take a look at http://www.datamekanix.com[^].
|
|
|
|
|
I have a CRichEditCtrl , in a certain point i want to change the font, so what i will add to the rich edit using ReplaceSel will be in the new font i have selected...
I am using this code:
CHARFORMAT2 cf;
::ZeroMemory(&cf,sizeof(CHARFORMAT2));
cf.cbSize = sizeof(CHARFORMAT2);
int iTotalTextLength = GetWindowTextLength();
m_edtChatMsg.SetSel(iTotalTextLength, iTotalTextLength);
m_edtChatMsg.GetSelectionCharFormat(cf);
cf.dwMask = CFM_FACE | CFM_SIZE;
_tcscpy(cf.szFaceName,lpszFaceName);
cf.yHeight = nFontSize;
m_edtChatMsg.SetSelectionCharFormat(cf);
unfortunately this code isn't working
can any1 help?
thanks in advanced
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Maybe instead of GetWindowTextLength() you should use m_edtChatMsg.GetTextLength() ?
|
|
|
|
|
no, it didn't help... although it was a small bug of mine
still, can't change the rich edit font
any other suggestions?
thanks
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
The next fragment sets the font and append a text:
long len = m_cRich.GetTextLength();
m_cRich.SetSel(len, len);
CHARFORMAT2 cf;
ZeroMemory(&cf, sizeof(cf));
cf.dwMask = CFM_FACE | CFM_SIZE;
lstrcpy(cf.szFaceName, _T("Courier New"));
cf.yHeight = 400;
m_cRich.SetSelectionCharFormat(cf);
m_cRich.ReplaceSel(_T("New text"));
It works.
-- modified at 6:16 Wednesday 21st June, 2006
|
|
|
|
|
thanks
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
See Here[^] maybe it is some helpful to you
whitesky
|
|
|
|
|
how we can get GMT time without using Current time
|
|
|
|
|
|
|
this is my code not workin
CTime time;
time.GetGmtTm(NULL);
m_time.Format("%d:%d:%d",time.GetHour(),time.GetMinute(),time.GetSecond());
|
|
|
|
|
sree_as wrote: this is my code not workin
What means 'not working' ? Compile error, runtime error, the code does not behave as expected (and supply information), or some other crazy thing...
Please, when asking a question, remember that we cannot see what you see !
Did you even try to read the links we gave you ?
This will do nothing:
time.GetGmtTm(NULL);
because you don't store the result. And you also constructed an uninitialised CTime object so it doesn't contain a valid date. Did you read the link I posted ? It describes how to construct a CTime with the current date and time.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
actually my problem is i have one dialog on that one combo box contains contry list and one static text for digital time.
it's is working.
but when we open my window time and u convert to another contry automatically our time changing.
due this currentTime().because when we changed it to another all will going wrong,
please help
sree.
|
|
|
|
|
You still didn't explain what the problem was. 'All will going wrong' won't help me very much to give you a detailed solution.
Where are you stuck ? What is the problem you are having ?
Did you read both links that we gave you ? They should contain enough information for you to know what to do. If not, is there something you didn't understand ?
And also, when explaining your problem, get rid of everything that is not related to the problem. Focus on the problem only.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Cedric Moonen wrote: And also, when explaining your problem, get rid of everything that is not related to the problem. Focus on the problem only.
You are really very pedagogic today
Two times for different people in a few minutes.
Thank you! You are one of those keeping this site at the top
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
|
Hi,
I am using ShellExecute for the first time. But, I am encountering the following error:
error C2065: 'ShellExecute' : undeclared identifier
I have included windows.h and shellapi.h ... shell32.lib is also there. Can somebody suggest me a way out of this problem.
Thanks,
|
|
|
|
|
In an MFC based application you don't need to include any specific files for ShellExecute.
What type of application are you using?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
-- modified at 4:04 Wednesday 21st June, 2006
|
|
|
|
|
Perhaps you have included "shellapi.h" before "stdafx.h" . If so, move all of your #include directives after #include "stdafx.h" .
Hope it helps.
|
|
|
|
|
Thankyou! That was very helpful It worked.
--
Viorel. wrote: Perhaps you have included "shellapi.h" before "stdafx.h". If so, move all of your #include directives after #include "stdafx.h".
Hope it helps.
|
|
|
|
|
what application type?
whitesky
|
|
|
|
|
Noob mfc question:
What's the best way of creating forms like invoices and reports? Those reports have a strict layout.
What i got so far was printing pdf's or html. The problem with html is that though it's easyer to create..it's imposible to set page counts and so on.
Postscript would be a good ideea but i don't know how to display it in a MDI
|
|
|
|
|
I want to write a virtual cd-rom like Deamon tools(DAEMON'S HOME), but quite simple one. I just have a little basis on driver development.
What should i do if i want write such a virtual cd-rom? Could you please give me some advices or some links on internet, thanks!
Go go go, enemy sighted!
|
|
|
|
|
I need to lock a file stream(opened using fopen) in exclusive write lock. I came across a code segment where the functions flock() and fcntl() were used to lock the file. I need to have the header files unistd.h and sys/file.h in order to use these functions but these header files are not available. I am using Windows XP and Microsoft Visual C++. From where can I download these files?
|
|
|
|
|
I think the flock() function, unistd.h and file.h header files are only for Unix. In Windows, you can try _lock_file() function. Another way is _locking() function. For first argument, specify the value returned by _fileno() .
Alternatively you can try LockFile function as described at http://msdn.microsoft.com/library/en-us/dnucmg/html/UCMGch09.asp?frame=true[^].
Hope it helps.
|
|
|
|