|
There are a number of messages that get sent, and it also depends on whether you have FullWindowDragging set depending on which messages actually get sent. The previous poster answered your question with WM_SIZE, which is true. But there are more messages that get sent when you are resizing a window.
If you give a little detail of what you are trying to do, we can probably give you a better answer that will help you accomplish what you are doing.
Good Luck.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Add to the previous replies : you can use Spy++ , it will show all the messages.
|
|
|
|
|
can i calculate width and hegiht of a string with help of log font.
i can not use =pDC->GetOutputTextExtent(*txt); or underlaying API.
some hint or way.
thanks in anticipation.
regards
|
|
|
|
|
|
Yes Performance. i am to calculate font size to display it with in
a rect. i am to do it for at different angles . and for for more than
200 entities at a time.
i have done it with GetOutputTextExtent but it becomes too slow.
my function is like this.
long counter=1;
long Y1 =0;
long Y2 =0;
long X1=0;
long X2=0;
if(Vertical==TRUE)
{
tfont->SetEscapement(900);
Y1=rect->top;
Y2 = rect->bottom;
X1 = rect->left;
X2 = rect->right;
}
else
{
Y1 = rect->left;
Y2 = rect->right;
X1 = rect->top;
X2 = rect->bottom;
}
while(true)
{
font->SetHeight(counter);
CFont * oldfont = pDC->SelectObject(font);
// Problem each time i am selecting it in device context to check for new
// size. that makes it slow
CSize sz =pDC->GetOutputTextExtent(*txt);
if(sz.cx>=(Y2-Y1)||sz.cy>=(X2-X1)) //text size is equal to rect
{
pDC->SelectObject(oldfont);
return counter; // so return counter;
}
pDC->SelectObject(oldfont);
counter++;
}
return counter;
|
|
|
|
|
What about CDC::DrawText with DT_CALCRECT?
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
Hi,
I have some relative paths (like "../../mydir/myfile.htm") to convert to absolute paths "http://www.myserver.com/mydir/myfile.htm".
Is there something like _tfullpath for file systems?
Thanks
R.
|
|
|
|
|
It s to good to answer one's own question: InternetCombineUrl suits my needs perfectly
R.
|
|
|
|
|
Hi,
I need to add to my application some stuff for html generation and editing, I'm thinking about using MSHTML ( and make an small editor, with some basic stuff), or using Front Page Automation ...
Is Front Page automation more or less ok ? ( I mean Word Automation is not that bad... but outlook automation seems to be hell...).
Thanks in advance, greetings
Braulio
|
|
|
|
|
If you use VC7 with MFC than you have a very handy class called CHtmlEditView which provides just what it promises: simple Html editing capability.
R.
|
|
|
|
|
Hi,
I try to show a bitmap in my dialog based app. using the static control. I use this code:
CBitmap bmp_1;
bmp_1.LoadBitmap(IDB_BITMAP_1);
m_Bmp.SetBitmap(bmp_1);
m_Bmp.Invalidate();
UpdateData(FALSE);
This works good under Windows XP but not under windows 98.
What do i wrong??
Thnks
|
|
|
|
|
What kind of data type is m_Bmp ??
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
A static picture control (CStatic).
|
|
|
|
|
Use CPictureBox insted, or what the nbame is..
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
I know it's a little bit simple, but i can't do it.
Thanks
|
|
|
|
|
How can I create an non Modal Dialog (CColorDialog, CFontDialog,...)
Thank You a lot!
|
|
|
|
|
|
Hi Nishant!
I think the problem to create a NON MODAL CColorDialog, CFontDialog, ... is that there is no template id for the Create(...) function! The DoModal() function of this dialogs will end in an API call!
CModeLess *m_pmodeless = new CModeLess(this);
m_pmodeless->Create(CModeLess::IDD);
m_pmodeless->ShowWindow(SW_SHOW);
For CColorDialog or CFontDialog there is no IDD!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Here is a rather sneaky way of showing a modeless color dialog :-
void CYourDlg::OnBnClickedButton1()
{
CHOOSECOLOR cc;
ZeroMemory(&cc, sizeof(CHOOSECOLOR));
static COLORREF acrCustClr[16];
cc.lStructSize = sizeof(CHOOSECOLOR);
cc.hwndOwner = NULL;
cc.lpCustColors = (LPDWORD) acrCustClr;
cc.Flags = CC_FULLOPEN | CC_RGBINIT;
ChooseColor(&cc);
}
Regards,
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Thanks! Realy good! I didn't remember that there is a owner member in the CHOOSECOLOR struct!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Serial port communcations? I will spare the code for now but I'm having a problem I cant finger out. Not sure if overlapping will help either. I'm new to serial comm routines... If you think you can help send an email to mfeik@comporium.net. If you would like to look at my code I'll send it.. I thought this was going to be a simple dialog box interface but my reads are not proving this to be the case
---------------------------------------------
Be good! But if you can't be good, at least be good at it and try not to get any on ya!
-mjf
|
|
|
|
|
There is a serial MFC class here (somewhere, sorry I'm to lazy to search the link). I used it to communicate with a microcontroller once and exchange data, it worked well.
|
|
|
|
|
i used several years ago, i can't remember everything, but:
u must use overlapped, must use EV_CHAR and EV_EMPTY 2 events.
includeh10
|
|
|
|
|
you don't happen to remember WHY I must use overlapped do you? I have a serious problem with what I thought was going to be a simple app.
---------------------------------------------
Be good! But if you can't be good, at least be good at it and try not to get any on ya!
-mjf
|
|
|
|
|
Developed about 30+ serial apps. due to the industry I work in.
"well that software is just like a polished turd" -
somebody in my office referring to a VB App.
|
|
|
|