|
OK I handle the ON_KICKIDLE. But the pCmdUI functions still fail to do anything.
Can I handle a dialog app menu in UPDATE_COMMAND_UI or do I manually need to retrieve the menu with a CMenu class? I hope not.
Thanks for the help.
Darroll
|
|
|
|
|
Maybe you find better help here.[^]
|
|
|
|
|
I have a problem with the position of the toolbars. For a better discription, open wordpad. Dock the toolbars side by side so that they both are in the same row. Now resize the main frame window so that to reduce the size from the right side to the left. Reduce to the smallest possible horizontal width. Notice that the second toolbar that you docked on the right of the first one has moved down. Now resize to increase the size. Notice that the toolbar is NOT moved back to right of the first toolbar. i.e. to its original position before reducing size.
I need to reposition it when the size is increased. Also, I need the docking support on all sides of frame, dynamic size and dock state toggle on double click, so simple rebar cannot be used.
MS Office uses the msoCommandBar which does all the desired, but i cant use it as i dont have its class, control or documentation.
The environment I am using is Visual C++ 6.0 with sp5.
The "Best" is what you can never achieve.
|
|
|
|
|
Hi Everyone:
I try to explan folows,and please help me to judge if it is correct or not.
<hr>
SetWindowOrgEx(hdc,0,50,NULL);
->map the logical point (0,50) to the device point (0,0)
-><a href="http://mail.ntust.edu.tw/~B9007036/Q_1.gif" target="_blank">result</a>
SetViewportOrgEx(hdc,0,50,NULL);
->map the logical point (0,0) to the device point (0,50)
-><a href="http://mail.ntust.edu.tw/~B9007036/Q_2.gif" target="_blank">result</a>
<hr>
But I don't know how to understand and explain when using function
"SetWindowOrgEx" and "SetViewportOrgEx" together in program like follow:
<hr>
case WM_PAINT:
hdc = BeginPaint (hwnd, &ps) ;
SetMapMode (hdc, MM_ISOTROPIC) ;
SetWindowExtEx (hdc, 276, 72, NULL) ;
SetViewportExtEx (hdc, cxClient, cyClient, NULL) ;
SetWindowOrgEx (hdc, 138, 36, NULL) ;
SetViewportOrgEx (hdc, cxClient / 2, cyClient / 2, NULL) ;
SelectObject (hdc, GetStockObject (NULL_PEN)) ;
SelectObject (hdc, hBrushRed) ;
DisplayTime (hdc, f24Hour, fSuppress) ;
EndPaint (hwnd, &ps) ;
return 0 ;
<hr>
Could someone tell me?Thanks!
The only educated men are self-educated.--J.Bennett
|
|
|
|
|
You should not use SetWindowOrgEx and SetViewportOrgEx together but one or the other! That was my first my first reaction when I look at your code and MSDN confirms it.
MSDN:Generally, you will use one function or the other, but not both. Regardless of your use
of SetWindowOrgEx and SetViewportOrgEx, the device point (0,0) is always the upper-left corner.
ÿVOTD:9 "Be happy, young man, while you are young, and let your heart give you joy in the days of your youth. Follow the ways of your heart and whatever your eyes see, but know that for all these things God will bring you to judgment." - Ecc 11:9
|
|
|
|
|
Hi.Ernest Laurentin
I have already read the MSDN that you say.But this source code named "DigClock" is written by Charles Petzold in Chapter 8 in BOOK "Programming Windows 5/e".
Code
I am very confused and curious.How do we explain when using "SetWindowOrgEx" and "SetViewportOrgEx" together.
Could someone help me?Thanks!
The only educated men are self-educated.--J.Bennett
|
|
|
|
|
Okay, for MM_ISOTROPIC, this is need since this is the only to way to map screen/viewport coordinate by yourself. This is a cool way to obtain Zooming effect for free since SetWorldTransform is not supported under Win 9x. This mode is provide for flexibility if you want to force the mapping of your drawing to a portion of the screen. In Charles Petzold example, he set the Viewport to the screen size (cxClient,cyClient) and the map the Window coordinates to 276x36. In that case all the drawing being done in the screen coordinates (276x36) will be mapped to the viewport. The trick with his code, he already calculates everything to fit his screen 6 characters + 2 colon (6x42 + 2x12 = 276!).
Hope that help!
ÿVOTD:9 "Be happy, young man, while you are young, and let your heart give you joy in the days of your youth. Follow the ways of your heart and whatever your eyes see, but know that for all these things God will bring you to judgment." - Ecc 11:9
|
|
|
|
|
Hi.
I understand what you say.But I don't explain and understand when using function "SetWindowOrgEx" and "SetViewportOrgEx" together.I have two examples using only one of them.Follows:
SetWindowOrgEx(hdc,10,10,NULL);
Illustrate
SetViewportOrgEx(hdc,10,10,NULL);
Illustrate
But how explain when using SetWindowOrgEx and SetViewportOrgEx together.I just want to know this.Thanks!
The only educated men are self-educated.--J.Bennett
|
|
|
|
|
How can I add a combo box (dropdown box) in a "CommandBand" (see article http://www.codeproject.com/ce/commandbar.asp from Bruce Hearder) or in the normal AppWiz created toolbar (=on the bottom of a pocket pc screen) in eVC++ 3.0 ???
--
Nice greets, Daniel.
|
|
|
|
|
I am looking for a thread safe container class similar to std::map. Is there any such available in standard C++ ?? If not then please tell me any such if you aware about ???
|
|
|
|
|
Standard C++ don't even mention threads.
C++ container classes should not be "thread safe" due to the inherent overhead it would create for everyone. If you want to access a container instance from multiple threads, you have to provide your own locking.
|
|
|
|
|
I like SourceSafe's file comparison feature and the way it displays differences much better than other products such as WinDiff. Unfortunately, we'll be dropping SourceSafe for something else for our next project, and we'll have to use WinDiff or whatever else we can find that does an ok job.
My question is: if I leave my copy of SourceSafe on my computer, is there a way I could somehow use the VSS protocol (or whatever else) from a program that I would write in order to use SourceSafe's file comparison feature? Would it be possible to compare two local files or would I need to add the file to SourceSafe first?
Thanks for any information you can provide!
|
|
|
|
|
if you want the best diff utility there is, get a port of unix "diff" for Win32. diff is so powerful it's almost alive.
STL is a religeon. Enquiries to Reverend Christian Graus
|
|
|
|
|
From what I remember, VSS implements a standard protocol known as RCS. So yes, with that in hands, you may get docs on how to read the VSS database by yourself.
Though chances are that in the end MS made the database proprietary for odd reasons such like security and scalability.
If you could do a diff with Araxis Merge, you would end much better I tell you.
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site. Support for development will ship at the same time as the Windows XP Service Pack 1 (SP1) release.
|
|
|
|
|
I use Windows Commander's "Compare by content" feature to compare single text files.
Pavel
Sonork 100.15206
|
|
|
|
|
|
i m having a problem in loading my customised bitmap(coloured) as cursor in my exe
i inserted a coloured bitmap in resource and & called LoadImage (...)
But did not get correct results
i can get a monochrome bitmap loaded but while loading a coloured Bitmap the function fails
Plz suggest me some solution to it
|
|
|
|
|
Hmmm! should not fail unless you not using correct parameter. Try using LR_DEFAULTCOLOR for colored bitmap or post some code with values for your LoadImage call.
I am in YYY
|
|
|
|
|
i tried it , but it didnt work
i tried it like this also
HCURSOR nCursor;
nCursor = AfxGetApp()->LoadCursor(IDC_CURSOR1);
SetCursor(nCursor);
here i created IDC_CURSOR1 as a monochrome cursor then it worked but when i created a coloured corsor it didnt work
|
|
|
|
|
Is an icon just a bitmap file of a certain size and color depth? The reason I'm asking is cuz I have Paint Shop Pro and it won't open up an .ico file for editing.
Was wondering if I could take a bitmap file and scale it down to the size of an icon but if it's a different format I'd need to know that. If it isn't then I can just save it as a bitmap and rename it to .ico extension.
|
|
|
|
|
VC+ 6 will edit icons. The difference is they have areas which take on the background color an areas which are transparent, but I think they are essentially a bmp.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
|
|
|
|
|
|
Oh and to clarify:
An icon is a series of multiple bitmaps with varying sizes and color depths. All the bitmaps are stored in a single file with additional header information.
Theoretically you could extract or inject a single bitmap provided you manipulate the header information correctly.
|
|
|
|
|
So, is there a decent icon editor that also imports bitmaps? I don't really want to design an icon in VC6. I'm used to using PaintShop Pro. I basically want to create or find a larger image and shrink it down to the size of an icon and then save it as an icon.
I guess I could do this in Paintshop Pro and then copy and paste it into VC6 right?
|
|
|
|
|
This would work but you'll most probably lose your custom color palette so all the colors will seem wrong.
Have you tried Microangelo yet? That's quite a capable icon editor - you might be able to do what you want with that. I don't have the link but you can google it.
|
|
|
|