|
Hi Gurus,
I wanted to do gradiant filling of irregular pattern. ie, for example, there is a Text in the DC, and the complex region defines the whole Text. I achived this thru', using paths and then converting paths to region fn. Now i need to fill these each characters with Gradiant filling which has to use the shape of the Text. ie, i need a procedure to seperate each character from the Text into a individual region and fill them with the Gradiant , which actually uses the shape of those character. How to achive this.
Pl. Help me.
I've a sample image of it. But i don't know how i can attach that image with this post.
Advance ThanX,
Subbi
|
|
|
|
|
The easiest solution I can come to think of is alpha-blending that text with a gradient bitmap and the trans-blit it onto the final surface.
You didn't mention time/CPU cycles constraints.
|
|
|
|
|
hi all,
here's what i want to do: i want to call a simple function by using a pointer to that function. curious about WHY? ok, the stupid enough reason is that i just want to do it (no offence to nike ) please help and feel free to fill in the blanks in the following piece of code.
void func1()
{
cout << "func1" << endl;
}
int main()
{
// something's gotta go here
return 0;
}
|
|
|
|
|
Wanting to call the following function using a pointer-to-function:
void func1();
Either typedef the pointer-to-function-type:
typedef void (*pfn1_t)();
or use it as-is:
int main()
{
void (*pfn1)();
pfn1 = &func1;
(*pfn1)();
pfn1_t pfn1_ = &func1;
(*pfn1_)();
return 0;
}
|
|
|
|
|
Or, to make the code simpler, drop the * before the function pointer, since it's unnecessary:
(*pfn1)(); becomes pfn1();
--Mike--
http://home.inreach.com/mdunn/
The Signature, back by popular demand: Buffy. Pajamas.
|
|
|
|
|
I'm hoping most of you have seen Winamp...
I want to know how they made that Winamp app look and feel the way it does. I'm not interested in the skins that we can add on, but in the way they managed to make a really thin title bar, a tiny scroll bar, etc etc. (btw: is Winamp a fancy dialog box )
|
|
|
|
|
> I'm not interested in the skins that we can add on, but
> in the way they managed to make a really thin title bar
WM_NCPAINT and company.
|
|
|
|
|
If I were doing a WinAmp-like UI, it would be a window with no caption or border, and all the UI elements drawn manually (including buttons and scrollbars). When a WM_LBUTTONDOWN message arrived, I'd compare the mouse coordinates with the RECTs of all the "controls" to figure out which "control" was clicked on.
--Mike--
http://home.inreach.com/mdunn/
The Signature, back by popular demand: Buffy. Pajamas.
|
|
|
|
|
Given declarations like this:
void func(int, int (*)(int, int));
class a
{
public:
static int func1(int b, int c);
};
Is it possible with modification to do this:
...
ret = func(0, a::func1);
...
Or is there a better Object Orientated solution? I'm kind of baffled.
|
|
|
|
|
> Given declarations like this:
> void func(int, int (*)(int, int));
This one returns "void".
class a {
public:
static int func1(int b, int c);
};
Disregarding parameters, this one returns int. Are you really sure you want to do this? If you are, try reinterpret_cast, but I'm quite confident you'll find std::mem_fun more suitable.
|
|
|
|
|
Change
void func(int, int (*)(int, int));
to
void func(int, int (a::*)(int, int));
--Mike--
http://home.inreach.com/mdunn/
The Signature, back by popular demand: Buffy. Pajamas.
|
|
|
|
|
I'm reading an INI file with GetPrivateProfileString on a windows 2000 machine. When I read a string, I get back the entire line including any comment that might be there, like so:
"value ; this is the comment"
This is *not* the desired nor the expected result - I've been using INI files for a long time and have never seen this happen before.
One strange thing about this ini file is that the keys look like this:
thiskey = value ; this is the comment
There is a space between the keyname and the equal sign, and between the equal sign and the value. Could this be what's causing the retrieval of the comment as well as the value?
Next question, is there a way to programatically get/set a comment in an ini file (short of treating it like a normal text file)?
|
|
|
|
|
I'm afraid the .ini file syntax hasn't been specified too clearly by MS or whoever.
Since it is not detailed what a string to be read by Get(Private)ProfileString(),
I won't make any assumptions regarding special characters.
The only comment I have yet come across is the single line comment, that is a line
starting with a ';'
A rest-of-line comment would demand specific treatment of the ';' character.
It seems to be unimportant wether the '=' is surrounded by whitespace or not.
To get slightly more (and less) control of how an .ini file is accessed, use
Get(Private)ProfileSection(), which reads a whole section into memory.
|
|
|
|
|
1. What is the best way to reboot the system which is really not platform specific?
ExitWindowsEx seems to be the function, but it has too many
platform restriction. I tried looking for a KB but could not
find anyone on this.
Any help?
2. I have a simply installation startup, which will install some system stuff like DCOM95/MDAC/50COMUPD/HHUPD before executing the main program to be installed.
Most of the updates require a reboot, and I use the RunOnce registry key to automatically restart the installing steps.
The problem is the main installation is Windows Installer
based program and I wish to follow the tradition here to allow the user access to the desktop. However, with the RunOnce key, Windows seems to wait for the program to complete before displaying the desktop. Is there any good way to yield control to Windows to display the desktop?
Best regards,
Paul.
|
|
|
|
|
The ExitWindowsEx function will work on all Windows platforms, but under NT/W2k/XP, you will have to check and/or modify the system privileges to enable the ExitWindowsEx call to work correctly.
See this link on CodeGuru for some code:
http://codeguru.earthweb.com/cgi-bin/bbs/wt/showpost.pl?Board=vc&Number=232529&page=16&view=collapsed&sb=5
Cheers,
Peter
|
|
|
|
|
Thanks, just looking for a safer ways and I got it now.
Regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for day job or programming contract anywhere!
|
|
|
|
|
It seems that WS_EX_LEFTSCROLLBAR style is not working with combo boxes - has anybody found a solution to that?
Even thought there is a property called "left scrollbar" in the resource editor, it does not change a scroll position. ModifyStyleEx is also not working...
|
|
|
|
|
It works on my Win2000 box. Are you sure that you have enough items in your combobox to actually display the scrollbar? Combos with no items display no scrollbar at all.
Tomasz Sowinski
http://www.shooltz.com.pl
|
|
|
|
|
Yes, it filled with items and I have a scroll bar but in the usual place, that is on the right. I am on NT4 thought - gottat test it at home with w2k...
Using a SPY++ I can see that the drop style has changed if I use ModifyStyleEx against the ListBox part of combo only, the resource editor only changes the style of the edit part. I tried all the combo types - simple, drop down and list to no avail... Strange...
Dziekuje za pomoc.
|
|
|
|
|
From the CreateWindowEx docs in MSDN:
"WS_EX_LEFTSCROLLBAR: If the shell language is Hebrew, Arabic, or another language that supports reading order alignment, the vertical scroll bar (if present) is to the left of the client area. For other languages, the style is ignored."
Have no idea what if W2K US-English shell supports Hebrew, Arabic or reading order alignment. Seems that you can forget about this style if your app is going to run on different Windows versions.
Tomasz Sowinski
http://www.shooltz.com.pl
|
|
|
|
|
Yeah, it looks like it works on my "English-speaking" w2k as well.
How annoying is that!
Cheers
|
|
|
|
|
Hi all,
I have two application, A.EXE and B.EXE. The two applications communicate using OLE Automation method. A.EXE is the server and B.EXE is the client. Now, I want B.EXE to pass a HWND to A.EXE, and A.EXE will draw image at the given HWND. I can't make it.
CWnd::FromHandlePermanent(hWnd) return NULL.
I would like get advice from codegurus here whether this approach is possible or not. If not, is there any other method to do so?
thanks
regards,
yhtay
|
|
|
|
|
> Now, I want B.EXE to pass a HWND to A.EXE, and A.EXE will draw
> image at the given HWND.
[...]
> I would like get advice from codegurus here whether this
> approach is possible or not.
No.
|
|
|
|
|
Is the HWND just the handle to the main window for B.EXE ? If so, why not just enumerate the windows and find it that way ? Or use Copydata to send the info between processes ?
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Hi All,
I am working with VC++(Windows NT).I have created an ATL Service !Now, what I want firstly is that when I run that service, it should not appear in the Task Manager .But, at the background the process should be running ! How can I do that ?Which is the suitable API function for this ?
Thanx in advance for the Help .
Yamini Devi
|
|
|
|