|
It can't be that hard. Why not use SetWindowPos( ) keeping the left and top coordinates the same and resize the height and/or width of the window?
|
|
|
|
|
BTW, I recently D/L'd Paint Shop Pro 7.0 and all of it's floating toolbar windows are rolled up that way but when you put the mouse over the caption or title, it restores itself to it's previous size. Cool!
|
|
|
|
|
That's what I was initially thinking, but that doesn't allow me to make the "rolled up" window have a different template. It'll just make the current window smaller, eh?
If you'll notice what they do in Winamp (sorry, only program I know that has this feature), when it is rolled up, the title bar changes and buttons are added. Which is what i'm going for.
The idea behind this is: the user can make the window as small as necessary without sacrificing the ability to use the more important functions (and Minimize makes the window disappear completely).
|
|
|
|
|
Yes, it will make it smaller but you can shrink it down to the title bar size only which is what you want, right? I think you need to set CS_OWNERDRAW and draw the title bar yourself if you want buttons. Search this site and others for examples.
|
|
|
|
|
Check this out:
http://codeguru.earthweb.com/buttonctrl/ccaptionbutton.html
http://codeguru.earthweb.com/dialog/custom_dialog_caption.shtml
and...
http://codeguru.earthweb.com/misc/wm_nclbuttonup.html
Good luck!
|
|
|
|
|
In winamp when the title bar is changing it is pulling bitmaps from either the default skin or from zip files containing the other skins (if you rename a skin file to .zip it will be unzippable). Same goes for the buttons and the rest of the graphics in winamp. I'm not sure what is done programatically to get them to draw over, but a few of the things mentioned looked like it could work.
I had a little fun doing a skin for winamp once so I learned about how they change the image. I hope that helps some.
Quinn
|
|
|
|
|
How can we read & write File Title.
This File Title is the one visible by Right Clicking the File Properties on the Windows Explorer & hitting the Summary Tab.
Thanks
Ganesh Agrawal
|
|
|
|
|
This info is usually only available for Microsoft Office documents (Word, Excel, PowerPoint). MSDN article HOWTO: Read Compound Document Properties Directly with VC++ provides a full working sample showing how to retrieve the information.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi,
what is the best (and simpliest) way to communicate between processes ? One process is typical MFC application, the second is console service. So how can these two applications communicate ? It must run under W95/98/NT/2k/XP.
Thanks in advance. Standa.
Celebrate Mr. Cesilko!
|
|
|
|
|
|
How I could implements fast playing of wave file (for example 2x faster) by using waveOutXXX functions?
|
|
|
|
|
With <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/mmfunc_6mhx.asp">waveOutSetPlaybackRate</a> ?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
please help me all step to create my button with own draw
thanks!!!
|
|
|
|
|
there are many owner drawn buttons on this site. look around and find one that looks good.
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
|
how can i insert contents in to the HELP of my sdi project.
looking forward from all the gurus of code
|
|
|
|
|
how can i add help feature in my sdi project
looking forward from all the gurus of code
|
|
|
|
|
you can use HTML Help Workshop (which you can download from Microsoft web site) to create the in-fashion *.chm help file. Then in your code, you can just use ::HtmlHelp(this->m_hWnd, helpname, 0, HH_DISPLAY_TOPIC); to display your help.
remember to link with htmlhelp.lib, and include <htmlhelp.h> in file "StdAfx.h".
|
|
|
|
|
hello!i want to code my own favorits administration program!it should look like the original favorits; a treeview on the left side of the ie window and an additional menu bar on the lower side of the window to administrate my favorits!this prggie is nearly written but i dont how to integrate this into the internet explorer!
i'll appreciate every answer!!!
|
|
|
|
|
I think you have to make a inproc server dll and register it in IE
see an example : http://www.codeguru.com/net_general/DOMTree.html
|
|
|
|
|
I work with VStudio 6.0 Student edition. SP5
Well, it is not a problem to compile a hello application,
either command line or from the ide. It even is not a
problem to compile reversi, a c source.
But when i try to build flip3d or scribble, the build
either reacts by:
system beep
folowing messages:
--------------------Konfiguration: flip3d - Win32 Debug----
----------------
Microsoft (R) Program Maintenance-Dienstprogramm: Version
6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. Alle Rechte
vorbehalten.
or for scribble with a system beep and
the following messages:
Temporäre Dateien und Ausgabedateien für "Scribble - Win32
Debug" werden gelöscht.
--------------------Konfiguration: Scribble - Win32 Debug--
------------------
Building help file...
after these messages MSDEV still works with six threads.
What is my problem?
Lack of memory? I have got 512 Mb DDRam and a SIS 735 1,4
Ghz Athlon system.
Some ressources missing?
I have got nothing spectacular on my system.
By the way i have got an old Toshiba Laptop 150Mhz Pentium
system with 32 MB, i have got the same problem for scribble
there.
a further case on my desktop system:
After downloading a huge project from the internet i have
encountered the same problems with building the project.
After adjusting include paths the system compiles
all the source files. Then the system comes to the
point to build the dependencies.
And there it hangs up. Again, six threads are working.
And i can just stop MSDEV by either killing the process or
using ctrl alt del.
So whats the problem, how can i detect it and how can i
solve it?
.
|
|
|
|
|
I tried F1 for MSDN help on
GetadoEOF () for a recordset and there were no entries. I looked at msado15.tli and found:
inline VARIANT_BOOL Recordset15::GetadoEOF ( ) {
VARIANT_BOOL _result;
HRESULT _hr = get_adoEOF(&_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
but cant decipher what this is doing? Its end of some file but which file? The web didnt offer any insight either though its used a lot. How does one figure out what these things are. Recommend a good basic , friendly ADO book?
Is this ADO stuff MFC or is it generic and we just happen to use it in an MFC project?
Thanks,
ns
|
|
|
|
|
ns,
ADO (Active Data Object) is not MFC.
Microsoft have many ADO examples to assis VC++ developers.
Good luck,
Alex
|
|
|
|
|
Maybe this link[^] will help.
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I want to ask about how to use startdoc(), startpage() to print data on paper imediately then receive the next data and print imediately and receive the next data and print ......
Example : If I want to print this below data in first page imediately and after that I receive the other data and print imediately not like Microsoft word which must receive all data and print 1 time.
110011110
How to do that loop?
This below is my program want to do that.
If first data is 110011110
I change 1 in the above data to solid black (which have 2 pixel width and 4 pixel height) and 0 in the above data to solid white (which have 2 pixel width and 4 pixel height)
code:
------------------------------------------------------------
DOCINFO di ;
CPrintInfo printInfo ;
CString filename ;
CDC dc ;
CRect draw_area ;
CPrintDialog dlg(FALSE) ;
if (Dlg.DoModal() == IDCANCEL)
return ;
HDC hDC = dlg.GetPrinterDC() ;
if (hDC == NULL)
return ;
di.cbSize = sizeof(DOCINFO) ;
di.lpszDocName = "Document name"
di.lpszOutput = NULL ;
// prepare the print information structure
dc.Attach(hDC) ;
printInfo.m_bDirect = TRUE ;
printInfo.m_rectDraw.left = 0 ;
printInfo.m_rectDraw.right = dc.GetDeviceCaps(HORZRES) ;
printInfo.m_rectDraw.top = 0 ;
printInfo.m_rectDraw.bottom = dc.GetDeviceCaps(VERTRES) ;
draw_area = printInfo.m_rectDraw ;
dc.StartDoc(&di) ;
//receive first data
CString testline = "110011110" ;
int x = 0 ;
int y = 0 ;
int pos = 0 ;
// start printing the document
dc.StartPage() ;
CBrush brush;
// Creation of the brush with a black color
brush.CreateSolidBrush(RGB(0, 0, 0));
while (pos < testline.GetLength())
{
if ((testline.GetAt(pos)) == '1')
{
// Create a rectangle with coordinates x,y,x+2,y+4 corresponding with top, left, bottom, right
CRect Rectangle(x, y, x + 2, y + 4) ;
// Fill a rectangle in the current device context or DC
dc.FillRect(&Rectangle , &brush);
x += 2;
}
else if ((testline.GetAt(pos)) == '0'){
x += 2;
}
pos++ ;
}
y += 4 ;
x = 0 ;
pos = 0 ;
dc.EndPage() ;
printInfo.m_rectDraw = draw_area ;
//OnEndPrinting(&dc, &printInfo);
dc.EndDoc() ;
VERIFY(dc.DeleteDC()) ;
------------------------------------------------------------
|
|
|
|