|
Office doesn't use normal toolbars;
you can get the same feel by creating an a tear off rebar (w/custom draw) you can find on this site.
|
|
|
|
|
Hy, but how can i make, that it LOOKS like office 2003 ?
screenshots:
http://www.pcwelt.de/ratgeber/screenshots/ggalerie.php?bildname=http://www.pcwelt.de/graphics/screenshots/14/14&id=14&bildanzahl=54&seite=2&neu=0&name=Office%2011&link=&linktext=#
thanx, greets
|
|
|
|
|
Well,
handling custom draw in your rebar lets you draw your custom vertical gripper, while doing it in your toolbars enables you create the gradient effect and custom check boxes...
Try searching articles on custom draw on this site.
|
|
|
|
|
hy, thanx for the tip. now i found a program called menubarxp. there ist a function which draws the gripper:
void CXPToolBar::CreateGripperBrush ()
{
ASSERT (m_brGripperHorz.GetSafeHandle () == NULL);
ASSERT (m_brGripperVert.GetSafeHandle () == NULL);
WORD horzHatchBits [8] = { 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00 };
CBitmap bmpGripperHorz;
bmpGripperHorz.CreateBitmap (8, 8, 1, 1, horzHatchBits);
m_brGripperHorz.CreatePatternBrush (&bmpGripperHorz);
WORD vertHatchBits[8] = { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA };
CBitmap bmpGripperVert;
bmpGripperVert.CreateBitmap (8, 8, 1, 1, vertHatchBits);
m_brGripperVert.CreatePatternBrush (&bmpGripperVert);
}
now, when i change the horzHatchBits , i get a different looking gripper. but i dont see the point! how can i make now a gripper with 4 small rectangles like in office 2003 ?
thanx 4 your help!
|
|
|
|
|
Well,
I think you'll have to draw it as you like... zoom in Office's gripper and try to draw something similar, you should have a device context to draw to;
note that you can increase the width of the gripper by sending a message to the rebar or toolbar, if you want.
|
|
|
|
|
ok, and how can i make the smooth color-fade?
greets
|
|
|
|
|
|
|
Hello @all,
does anyone know, wether or not Unicode can be used with Win98 or wether it is possible to add this feature to this Win98.
I' ve tried to copy the Win2k unicody libs to win98, but this failed.
Thanks for good answers...
|
|
|
|
|
|
hi everyone,
i made a DLL including some functions only for test ,i have realated .LIB file .
while i wanna importing it in other cpp file ,compiler throws me the early mentioned error (LNK 2019 unresolved external symbol)
well i search a lot and seem many peaple have this prrblem in vc7 .
now could u give a working pattern in making DLL and using it under win32 platform .
many thanks .
|
|
|
|
|
Does anybody know why this will compile on the computors at my university (borland 32) and not on my computer (MVC++ V6). even if i replace, append, or don't touch the library .h includes? Am i just using a out-of-date method? if there is a better way to do this i would love to know, i'm getting frustrated with the lack of mobility of this tiny program.
here is the code. (end of question is after code)*/
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
void get_A_in(int a_in[2][2]);
void main(void){
int A[2][2],i,j;
get_A_in(A);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
} //end main
void get_A_in(int a_in[2][2]){
int row,col;
row = wherex(); /*Here is the problem, What should i say for MVC++?*/
col = wherey();
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY | FOREGROUND_RED);
a_in[0][0] = 1;/*print_none(row, col); This is just cosmetic Printing stuff with a*/
a_in[0][1] = 2;/*print_st(a_in,row, col); Scanf in the function*/
a_in[1][0] = 3;/*print_nd(a_in,row, col); you can see row and col*/
a_in[1][1] = 4;/*print_rd(a_in,row, col); used here in the print_XX functions*/
//print_all(a_in,row, col);
}//end get_A_in
/* and each of the elements in the 2X2 work fine[ie. print_ functions] (i didn't want to print unnessesary code), the problem is with the wherex/y lines. Basically I need a function that will return the interger value of the current row, and colum, of the cursor position in the DOS window. kind of like the reverse of SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord); like GetConsoleCursorPosition (but i don't know it that exsits).
I Would realy appreciate any help on this, i'm soo lost; just can't find an equivilant function. Thanks for your time.
Mark;)*/
|
|
|
|
|
I don't know why this got cut but the included libraries are
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<conio.h>
|
|
|
|
|
Hi guys,
I am using a bitmap of size 1280 x 1024. I want to resize it 1024 X 786. If I use StrechBlt function in VC I am loosing some info. How to resize the bitmap without loosing any info. I used photo editor to resize but I could not get my size requirement. There I am getting either 910 X 786 or 1024 x some other dimension. Can anybody suggest some solution??
Regards.
Satya
|
|
|
|
|
Unfortunately, whatever method you use, you will lose some info.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
Hi jdunlap,
If I want to resize a bitmap and further want to use the resized bitmap how to do it??
Regards,
Satya.
|
|
|
|
|
If you are wanting to resize the bitmap in C++, you create a new bitmap with the dimensions you want, and StretchBlt the contents of the old bitmap onto the new one. This is the simplest way. It doesn't lose too much quality, either.
'this is written in VB
Dim phBmp as long
Dim WorkDC as long
'WorkDC is the temp DC we use for the StretchBlt
'phBmp is the new resized bitmap
'IBmp is the BITMAPINFO of the old bitmap
'mvarhDC is the normal DC for our bitmap
'mvarhBmp is the old bitmap
'create the new DC
WorkDC = CreateCompatibleDC(hdc) 'assuming that hdc is a screen DC
'create the new bitmap
phBmp = CreateCompatibleBitmap(mvarhDC, mvarDocWidth, mvarDocHeight)
poldbmp = SelectObject(WorkDC, phBmp) 'select new bitmap into work DC
'copy the old bitmap to the new
StretchBlt WorkDC, 1, 1, IBmp.bmWidth, IBmp.bmHeight, mvarhDC, 1, 1,IBmp.bmWidth,IBmp.bmHeight, vbSrcCopy
SelectObject WorkDC, poldbmp 'put back old bitmap in work DC
SelectObject mvarhDC, phBmp 'select the new bitmap into our normal DC
DeleteObject mvarhBmp 'delete the old bitmap
DeleteDC WorkDC 'destroy the temporary work DC
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
Hi,
Do you have the same code in c++, bcoz I don't know VB.
Regards,
Satya
|
|
|
|
|
Sorry about that - wouldn't have been able to help you last night otherwise, beacuase I didn't have time to port it to C++. But here it is!
<br>
HBITMAP phBmp;
HDC WorkDC;
WorkDC = CreateCompatibleDC(hdc);
phBmp = CreateCompatibleBitmap(mvarhDC, mvarDocWidth, mvarDocHeight);
poldbmp = SelectObject(WorkDC, phBmp);
StretchBlt (WorkDC, 1, 1, IBmp->bmWidth, IBmp->bmHeight, mvarhDC, 1, 1,Bmp->bmWidth,Bmp->bmHeight, SRCCOPY);
SelectObject(WorkDC, poldbmp);
SelectObject(mvarhDC, phBmp);
DeleteObject(mvarhBmp);
DeleteDC(WorkDC);
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
|
Dear All,
I am developing a MFC dialog based application which requires facility of a Hotkey. ie. if I press hot key combination such as Ctrl+Shift+P , then my dialog application should come.
(like we press Windows button + e and "Explorer" window appears)
Please suggest
Rohit
|
|
|
|
|
Just create a shortcut to your app with the hotkey Ctrl+Shift+P.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Actally this dialog window is a part of my application . And I want that this window should appear if we press a hotkey (even if the application is closed)
|
|
|
|
|
Use the RegisterHotKey API. Whenever the user presses the hotkey you specified, your window will receive a WM_HOTKEY message.
Like this:
result=RegisterHotkey(
hwnd,
id,
MOD_ALT || MOD_CONTROL,
VK_M
);
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
|