|
NikoTanghe wrote:
The problem is that a resource template is needed.
That is not preferrable, because the class is
shared over lots of different projects
Check CDialog::CreateIndirect then. It allows you to create dialog template in memory - no resources required.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Thanks,
I've completely overlooked this feature.
|
|
|
|
|
How to use the RichText Object Classes in order to parse Win Word docs ?
Thanks.
Aziz Rajim
|
|
|
|
|
Probably better off to use the Word object.
|
|
|
|
|
HiGuys
Iam new to VC++.Today i was trying out the mtgdi example from the MSDN,butikeep getting the follwing linker error
LINK : fatal error LNK1104: cannot open file "mfc42ud.lib"
cant figure out why its happening
Help appreciated,thanx in advance
Agni
|
|
|
|
|
You're doing a unicode build in debug mode and the unicode debug MFC dll is not present.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
I want to make an animation with an image list. But how?
I have NO idea where to start.....
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
Well, you need to create a timer, and then step through your images with no flicker, which means double buffering. I dunno that they need to be in an image list. The most common approach is to put all the individual frames into one bitmap and calculate your position within that bitmap ( i.e. they are positioned evenly so that jumping your across and down positions by a constant value creates frames that animate ) and do a bitblt of the part you need.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
I extracted the system32\vbscript.dll to get the type library(named RegExp.tlb). Then I add the new classes from this tlb to my project! Then I want to new one class of them named IRegExp(derived from COleDispatchDriver), but i don't know whether i need to attach the LPDISPATCH to this instance and how can i do! When i didn't attached it, that is called its default constructor, and run it, I can't not execute it normally! This program is too emengent, so i need ur warmhearted help in time!
[ccode]
void CInetSessionDlg::ParsePage(CString szPattern, CString szContent)
{
//m_regExp's declaration is on other place link this: IRegExp m_regExp;
//The class IMatchCollection and IMatch are both got from the tlb
IMatchCollection * temp;
m_regExp.SetIgnoreCase(TRUE);
m_regExp.SetPattern(szPattern);
if(m_regExp.Test(szContent))
{
temp=new IMatchCollection(m_regExp.Execute(szContent));
for(long i = 0; i < 3/*matches.GetCount()*/; i++)
{
//IMatch match = matches.GetItem(i);
IMatch match = temp->GetItem(i);
CString strLink = match.GetValue();
m_cbHref.AddString(strLink);
}
}
}
[/ccode]
Thanks u very much!
Sincerely, Davidlou
davidlou68@hotmail.com
|
|
|
|
|
http://windows.tucows.com/mmedia/preview/245548.html
|
|
|
|
|
Is this a promo-AD?
Nish
My miniputt high is now 29
I do not think I can improve on that
My temperament won't hold
www.busterboy.org
|
|
|
|
|
In answer to your question, no I wouldn't ever consider buying a product that used the forums to advertise itself instead of supporting the site by buying ad space.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
Hello,
I need to be able to get the HWND of the control currently under the mouse.
I have already written a system wide hook DLL that forwards messages to my window, and I am using ChildWindowFromPoint to step through all of the children of the current window under the mouse.
The problem I have with this method is that it won't select any individual buttons. For example, if I move the mouse over a toolbar button the entire toolbar HWND is returned, but I want the HWND of the individual button I am currently over.
At this point I am thinking of taking a snapshot of the screen and using some image object detection algorithm to get this done. I would prefer a simple approach if possible. I have seen screen capture programs do this, so I know it is possible. I fear they may be using the image object detection method though.
I've been working on this for a while now, and it is driving me !
Does anyone have any ideas on how I can do this?
Thanks!
|
|
|
|
|
Your problem is that the toolbar is only a single window really. The standard toolbar control is one window, when it gets redrawn, it draws each of the buttons. They are not separate windows. You can use Spy++ to verify this.
If you've got the HWND of the toolbar, you should then be able to use standard toolbar functions to get info about each button (GetButtonInfo, off the top of my head). As for determining which button is under the cursor, you'll need to send a TB_HITTEST message with the mouse position and check the return value.
------------------------
Derek Waters
derek@lj-oz.com
|
|
|
|
|
Ok,... i did say that i was going to go through the lessons and learn c++. I did, and these are some of the things that were not so clear... And some of these are just ones that i was wondering about and couldnt find out how to do it.
~Truth Table: The truth table works with binary right? it usualy looks like:
&& 0 1
0 0 0
1 0 1
I dont get how to read this table... or what it exactly does...
~Clear Screen: What is the simplist way to clear the DOS screan?
~%: I kind of now know what a percent sign is, but how do i use it in a code?
~ASCII code: Such as 'a' = #"some number" how do you figuer out what each letter code is? And how does it help you in the future?
~For loop: I get the concept of the for loop and even know how to use a for(;;)"not hard, but you know " are for loops better than do-while? and in which ways?
~Window: This one, no buddy really neads to respond to, and if you do i dont know if i will understand "But if you want to...." How do you make a window in C++ without using MFC? "maybe the response will show me the complexity of it all"
Ok,... Im looking for answers either in web links or strait forward answers "I perfer strait forward answers, but links will help a bunch"
Also... I dont want be annoying, if you become annoyed at my constant questions... try to ignor them maybe "you dont have to respond "
Well, theres that. Thanks everyone!
~SilverShalkin
Gold pixels of petals fall
Water by drip, season's call
Storms of high of boulders reign
Seize of time and magic's pain
Still as night the night lay on
Cursed this night like angel dawn
Crisp as light, rays of spread
The day is back, no more to dread
Dustin Tigner
|
|
|
|
|
SilverShalkin wrote:
&& 0 1
0 0 0
1 0 1
I have no idea what this is supposed to represent - the difference between &/|/~ ? I dunno.
SilverShalkin wrote:
~%: I kind of now know what a percent sign is, but how do i use it in a code?
The most obvious way is in generating random numbers, which return a large number, you can turn it into a number between 0 and 19 by doing this:
rand()%20;
because it returns the remainder of a division by 20 ( in this case ). So anywhere that you need to know the remainder of a division.
SilverShalkin wrote:
ASCII code: Such as 'a' = #"some number" how do you figuer out what each letter code is? And how does it help you in the future?
Is A 65 ? I'm not sure. It doesn't really help you much, but it's easy to write a program that tells you - take advantage of the implicit conversion from int to char.
char c;
for (int i =0; i < 255; ++i)
{
c = i;
cout << i << " = " << c << endl;
}
SilverShalkin wrote:
For loop: I get the concept of the for loop and even know how to use a for(;"not hard, but you know " are for loops better than do-while? and in which ways?
They both exist because they are *different*. For exmaple, if I needed to write out 20 files, I'd use a for loop ( I know the count ). If I needed to step through a list until I found a value, I'd use a while loop.
SilverShalkin wrote:
How do you make a window in C++ without using MFC? "maybe the response will show me the complexity of it all"
VC++ will show you this-, just use the Wizard to create a Win32 application, choose Hello World, and take a look. The big message loop in WinMain is the main thing MFC wrappers for you.
Hope that helps.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
SilverShalkin wrote:
~%: I kind of now know It denotes the modulus of a number over a base
e.g Number % base
it is defined as the remainder of Number / base. Hence x % 20 will return numbers from 0 through 19, as Christian said.
e.g.
1%20 = 1
2%20 = 2
19%20 = 19
20%20 = 0
21%20 = 1
etc.
|
|
|
|
|
SilverShalkin wrote:
~Truth Table: The truth table works with binary right? it usualy looks like:
&& 0 1
0 0 0
1 0 1
I dont get how to read this table... or what it exactly does...
This looks like it is just trying to show you what a bitwise and does (&&)
&&| 0 1
0 | 0 0
1 | 0 1
This is a matrix of what happens when two values are anded together. So to get 0 && 0 you would read down from 0 in the top row, until you get to the row that has 0 in the left hand column.
Make sense?
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
SilverShalkin wrote:
~Clear Screen: What is the simplist way to clear the DOS screan?
Type "cls" at the DOS prompt. Sorry, I'm being a smart ass. I don't know the real answer to that one.
SilverShalkin wrote:
~ASCII code: Such as 'a' = #"some number" how do you figuer out what each letter code is? And how does it help you in the future?
Go to http://www.asciitable.com and look up the letters in the table. Keep in mind that the numbers shown are probably in hexadecimal format.
SilverShalkin wrote:
~Truth Table: The truth table works with binary right? it usualy looks like:
&& 0 1
0 0 0
1 0 1
I dont get how to read this table... or what it exactly does...
Well, as an example, here is the truth table for a logical AND of some a and b (arbitrary choice of variable names):
a b | AND
---------
0 0 | 0
0 1 | 0
1 0 | 0
1 1 | 1
This means that "a AND b" as a logical expression is only true when both a and b are 1. If either a or b (or both) are 0, then "a AND b" is false.
Boolean algebra is a whole field of study by itself. I'm sure there are better explanations online. Just search for truth tables, and you're bound to find something.
Jon Sagara
What about ?
Best Miniputt score: 21
Sonork ID: 100.9999 jonsagara
|
|
|
|
|
Jon Sagara wrote:
Well, as an example, here is the truth table for a logical AND of some a and b (arbitrary choice of variable names):
Ah... It's immediately obvious when the thing is formatted properly.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
Jon Sagara wrote:
Type "cls" at the DOS prompt. Sorry, I'm being a smart ass. I don't know the real answer to that one.
I tried that it worked in QBasic though .
Yes i know... The forum is still little weirded to me. That little scrunched up 0's and 1's was suppose to be a truth table.
Jon Sagara wrote:
a b | AND
---------
0 0 | 0
0 1 | 0
1 0 | 0
1 1 | 1
so in this example, on the far left:
0
0
1
1
is suppose to represent 'a'?
and if this opens up a hole new form of reserch, what is it used for?
also... how do you know what a is = to? "its not common sense is it "
Thanks for your response's
~SilverShalkin
Firm Grip of Darkness
Darkness surounds my hollow heart
Deep trembling shaketh my hurting soul
Why must it be like this?
The weight is pulling me down
it's cold touch, as icy fingers
It plunders my last breath of air
It taketh me away
In darkness
I fall
Dustin Tigner
|
|
|
|
|
It's simple - if a = 0 (false) and b = 0 (false) a&b = 0; 0&1 = 0, 1&0=0, 1&1=1. Both statements need to be true for the statement to evaluate to true. An XOR would look like this:
a b XOR
0 0 0
1 0 1
0 1 1
1 1 0
Get the idea ?
SilverShalkin wrote:
and if this opens up a hole new form of reserch, what is it used for?
To be honest, I think it's a longwinded way of illustrating something pretty obvious.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
SilverShalkin wrote:
so in this example, on the far left:
0
0
1
1
is suppose to represent 'a'?
Yes, but 'a' was an arbitrary assignment. You could just as easily replace 'a' and 'b' with 'M1' and 'M2', or 'Jon' and 'Sagara.' Variable names make it easier to perform Boolean algebra.
SilverShalkin wrote:
and if this opens up a hole new form of reserch, what is it used for?
Boolean logic forms the basis of the computer industry - 1s and 0s, on and off, high voltage and low voltage, TRUE and FALSE. I highly suggest you read tutorials on it and become very familiar with the binary, octal, decimal (a given), and hexadecimal number systems, and how to convert between them.
Boolean logic is used all the time in code: if() statements, while() statements, bit shifting, ... It's very important stuff.
SilverShalkin wrote:
how do you know what a is = to?
Like I said, 'a' was an arbitrary assignment to a table column. Just move down the rows of the column:
State 0: a = 0, b = 0
State 1: a = 0, b = 1
State 2: a = 1, b = 0
State 3: a = 1, b = 1
No, this wasn't common sense stuff for me, I had to study it to pick it up. Maybe some of the CPians with a mathematical background can provide a better explanation and/or point you to some online resources. Feel free to keep asking questions, though. I'll keep answering and try not to confuse you too much.
Jon Sagara
What about ?
Best Miniputt score: 21
Sonork ID: 100.9999 jonsagara
|
|
|
|
|
Jon Sagara wrote:
Boolean logic forms the basis of the computer industry - 1s and 0s, on and off, high voltage and low voltage, TRUE and FALSE. I highly suggest you read tutorials on it and become very familiar with the binary, octal, decimal (a given), and hexadecimal number systems, and how to convert between them.
Boolean logic is used all the time in code: if() statements, while() statements, bit shifting, ... It's very important stuff.
well if you say:
Jon Sagara wrote:
It's very important stuff.
I guess ill study it , Any tutorials in mind, or just look around?
This thread will be good for only a bit more, "Than people stop responding " I'll give a look into it and post a thread sometime in the future with my new questions
If any one else can help out with these questions, that would be great.
Thanks guys
~SilverShalkin
My poetic toung can only speak its
ryhm for so long, i shall return
|
|
|
|
|
I learned Boolean algebra from Modern Digital Design in a digital design course. However, that book is old. The newer version of that books is Digital Design Essentials, which is quite an excellent text. The author provides many worked examples, which are pure gold to students like me. They only downside to these books are the prices: $100+
If I were you, I would scour the web. There are bound to be tutorials out there.
Jon Sagara
What about ?
Best Miniputt score: 21
Sonork ID: 100.9999 jonsagara
|
|
|
|
|