|
I cant seem to set a different size font without getting a different font
for example
Fixedsys = new CFont;
Fixedsys->CreateFont( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, FF_SWISS, "Fixedsys" );
mycontrol.SetFont( Fixedsys );
gives me the font i want "fixedsys" but when i do want a font size of 14 or something not default
and i do
Fixedsys = new CFont;
Fixedsys->CreateFont( 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, FF_SWISS, "Fixedsys" );
mycontrol.SetFont( Fixedsys );
it gives me the right size but no the right font, (it doesnt use the fixedsys font)
anyone know what i can do to get a higher font size and keep the font i want?
|
|
|
|
|
What is a Fixedsys font? Truetype? Raster? (I do not have it on my system).
Looks like Fixedsys could not be created with size 14, and you got the closest match.
-----------------------------
Get trial copy of comment generating tool CommentMakerPro, std::string and std::string containers viewer FeinEvaluatorPro and windows manager for Microsoft Visual Studio .NET FeinWindows at www.FeinSoftware.com
|
|
|
|
|
FixedSys is a monospace font as for what type of font it is i dont really know, i know its not TrueType, and its the one that uses the "A" icon like MS Sans-Serif, MS Serif, and Courier, on my computer its set as the defualt font for note-pad, and notepad uses it at different font-sizes just fine.
|
|
|
|
|
Fixedsys is a raster font, and raster fonts only support a fixed set of sizes. You will have to enumerate all possible sizes for such a font, an select a size appropriate for your needs. You might want to check EnumFontFamiliesEx for this.
|
|
|
|
|
I know WM_POWERBROADCAST can disable SLEEP key, but cant disable POWEROFF, which way can do this?
|
|
|
|
|
I have a webpage with a java applet child window. I want to write a program that can set focus on the applet and then fill in some data within it. Basically it's an online "time card" for submitting work time. I have a set schedule so I'd like to script it so I don't have to enter "9-5" over and over. Also, I don't have access to any of the applet source code, so this has to be done all with my own external app. I have some rudimentary undersanding of MFC but I assume this will take some heavy keystroke passing. Any ideas on how to make it easy?
.:curless.Tim:.
http://www.mio.uwosh.edu/curlet91
|
|
|
|
|
Hey all,
I am using InternetAttemptConnect()[^] to invoke the dial-up dialog when the user is on a dialup connection. I would like to know how to programmatically cancel the dial-up dialog that is created.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
O.K. Scriptkiddies!
I was hoping that someone might want a challenge.
I have been looking at AngelCodes Desktop Overlay code that allows for a directdraw screen animation to be displayed onto the win32 desktop.
http://www.angelcode.com/dev/overlay/
"This demo will show an animated image like an old TV without signal on your desktop, under your windows and icons. It does this by using DirectDraw overlay surfaces that are masked to the desktop background color. DirectX 7 or later is needed to run the demo. "
Now for the newbee question and hopefully one might be up for this challenge (NOTE: do not care about being a resource hog).
I would like to know how to draw a very very basic box, 3d object, or load a image into that code instead of the static screen the code shows.
Exmaple: http://www.cplusplus.com/src/direct3d.zip
AngelCode does not have the time as he is very busy.
Now, I have searched and searched the web with only answers like "Just use Active Desktop", but I do not want to do a gif/flash animation.
I would like to get a code sample to show a simple 3d box on the desktop.
Very Very basic so that my little brain can get that light bulb going to go "OH THATS HOW THEY DO IT!"
I hope that one of you would like a challenge, or even help out a newbee at this to get my brain, and coding in the right direction.
Sure it might be a dumb thing to do, but I would realy like to learn how anyways.
Thank You
|
|
|
|
|
Is no up to this challenge?
Even if you happen to have some links that would be great.
|
|
|
|
|
Hello, Somebody knows a good and easy tutorial for C++ ActiveX??? I made one that I think that works as well but I don't know how to include this inside my HTML page, I don't know how to register my OCX file and what is the ClassId... Can anybody help me?
Wender Oliveira
.NET Programmer
|
|
|
|
|
How on earth can it work if you don't register it ?
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Just using FrontPage or any HTML editor, you can insert your ActiveX control to web page. I dont know which version of FP that you are using but I have FP 2002. Here is command:
Insert -> Web Component -> Advanced Controls -> ActiveX Control -> Your ActiveX Control.
To register an ActiveX control, you can issue command: regsvr32 ocxfile or make a cab file that can be downloaded from network server.
|
|
|
|
|
I know how to register my OCX file, the problem is that I don't know the ClassID to add my object tag inside my HTML.
Wender Oliveira
.NET Programmer
|
|
|
|
|
hi,
Can we draw or aquire input from the desktop of a windows system.
|
|
|
|
|
Check this
http://www.codeproject.com/bitmap/DeskShoot.asp
|
|
|
|
|
Hi,
I am using VC++ 6.0 to access a webservice. The returned XML data contains strings with french characters (éèà...). I use a CString to store these strings then add the strings to a list control. The problem is that those characters do not display correctly. For example the word 'Marché' displays as 'Marché'.
I guess it is because the strings are encoded someway (unicode ?).
How can I convert those strings to display properly ?
|
|
|
|
|
hey guys,
I am trying to create an openGL window in which I want to display a BMP image of any size and then I want to do some processing on that image and I am trying to do this in VC++ using GL library. Can anybody help me out how I can read the data in the image after I read the image for displaying so that i can do processing on it.
One more thing I want to know is whether we can display a BMP image using glut library directly.
thanks in advance,
Pavan.
Pavan Kumar N Tiruveedhula
2382 Duncan Dr #4
Fairborn, Ohio-45324
1 (978) 473-1244
|
|
|
|
|
I know one site that does have some very cool examples to learn from:
http://nehe.gamedev.net/
I hope that helps!
|
|
|
|
|
hi,
yeah i appreciate your advice but i have already gone throught that site and i think that it is not having anything relating to access the data of the image after reading the image...that's wht i actually want
thanks,
pavan.
Pavan Kumar N Tiruveedhula
2382 Duncan Dr #4
Fairborn, Ohio-45324
1 (978) 473-1244
|
|
|
|
|
Hi,
On a similar note, I am also have trouble accessing a .bmp image. This is what I have got so far,
Let file.bmp be the target .bmp file. It can be accessed as follows,
---------------------------------------------------------
BITMAP bm;
HBITMAP hbitmap = (HBITMAP)::LoadImage(NULL,"file.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE);
GetObject(hbitmap,sizeof(BITMAP), &bm);
--------------------------------------------------------
The above 3 lines gets you from file.bmp to a BITMAP data structure you can access and manipulate. The BITMAP data structure can be seen at MSDN via http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_2h6a.asp
BITMAP is just a struct, not a class, and so is accessed directly.
The above lines require #include <windows.h>
I was able to get to the BITMAP data structure, but have yet to decode what everything in the data structure means. This is not much, but it's a start.
Any additional help on the data structure would be greatly appreciated. Thanks in advance.
Victor
|
|
|
|
|
Hi to all in bit crunch land.
I am not very advanced with the VStudio.net platform so don't fall over hurting yourself laughing that this!
I am trying to polish off a program that will read an .ini file for its parameters and locate a registry key value based on these parameters and replace the subject key with the supplied data.
The problem I seem to have is in using a pointer to the key value in the statement: lRet = RegOpenKeyEx(HKEY_LOCAL_MACHINE, reg_key_tree, 0, KEY_QUERY_VALUE, &hKey);
reg_key_tree is defined as: char reg_key_tree[1024];
lRet returns a 2 on this branch unless I have previously opened the registry on the same machine using the desktop GUI and then it returns the 0 for ERROR_SUCCESS. Once the registry has been opened, this program always works. I have reviewed code from Microsoft and on the face of it, it should work.
If I compile the program with the reg_key_tree variable written out and surrounded in quotes, it always works regardless if the registry had been opened in any other window.
Can someone teach an old dog this new trick? Thanks in advance.
Carpetbagger
|
|
|
|
|
Check my article about the little windows utility.
There you will find everything you can do with the win registry.
gabby
|
|
|
|
|
hello,
if i m not wrong ur problem is when
char *reg_key_tree = "Software\\microsoft\\etc"
lRet = RegOpenKeyEx(HKEY_LOCAL_MACHINE, reg_key_tree, 0, KEY_QUERY_VALUE, &hKey);
and when
lRet = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\microsoft\\etc"
, 0, KEY_QUERY_VALUE, &hKey);
there is no prblm.
well, i tried out this with my application. there is absolutely no problem. check out ur pointer def...
ask_you
|
|
|
|
|
In Ada, the coder can access the first and last values of an enumeration using attributes as follows:
Some_Enum'FIRST
Some_Enum'LAST
No matter what the enumeration or type, the first and last values are returned.
Is there an equivelent ability in C/C++?
|
|
|
|
|
That is not built into C++, you can simulate it with something like:
enum EColors
{
_firstColor,
Red, Blue, Orange, Mauve
_lastColor
}; Then to test whether a number is in the allowable range you test (n > _firstColor && n < _lastColor) I find it easier to do tests when the sentinel values are not legal enum values. If _firstColor were the same as Red , and Mauve the same as _lastColor , you also introduce a maintenance problem because you (and any other devs) have to remember to keep the definitions of _firstColor and _lastColor in sync with the enum values.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
I even hear the Windows "OMG I booted up fine" sound.
-- Paul Watson diagnosing hardware problems.
|
|
|
|
|