|
I can't seem to be able to draw an image using the CxImage library. My code is simply:
CxImage image;
HDC hdc=::GetDC(m_hWnd);
image.Draw(hdc);
Can anyone give the exact code for drawing an image?
|
|
|
|
|
i'm programming Type Assistant
i finished hook dll that can interrupt WM_KEYDOWN messages.But now,i don't know how to send words i iterrupted and after edited--->to window that a user is typing...
for a example:
when user opens notepad (or anything typing program) and type "boo",my program will search in Data and find a word having meaning.Example "book" and if user press Ctrl+Spacebar my program will add 'k' letter to notepad to make a meaning word "book".And here,i don't know how to add 'k'letter to notepad or anything other typing program.
sorry beacause my english ability is not good///
and thanks...
Here we go!!!
|
|
|
|
|
Hi,
You can use keybd_event or SendInput functions to do this.
Regards.
G.K.Z
King Zoser
|
|
|
|
|
Hi
ok i will try...thank you
|
|
|
|
|
hello friends
i want to make packet sniffer
plz help me how shld i start. plz guide me for making packet sniffer using c++.if anyone can send tutorial to make it than plz send it.
plz reply me soon
bye
|
|
|
|
|
You will need to write an intermediate NDIS driver, however I would not start one my self given there are free ones out there. Take a look at WinPCap[^]. That will give you a great start.
|
|
|
|
|
Hello,
I have an MFC dialog that is painted with a custom image background to provide it a jazzy look. Also, all the static labels are owner drawn, and in OnCtlColor I set a transparent background and return a null brush so that my bitmap background will be visible through.
However, I find that this is causing problems for a combo box with dropdown style that I have on the same dialog. If I directly type some text say "12345" into the edit portion of the combo box, and then choose a string "12" from the drop-down list, then the earlier 12345 continues to be visible in the edit portion!! really weird behavior.
I traced the problem down to ON_WM_CTLCOLOR. If I remove ON_WM_CTLCOLOR from the BEGIN_MESSAGE_MAP/END_MESSAGE_MAP entries, then the combo works perfectly normal, but I obviously cannot remove the WM_CTLCOLOR permanently.
Any help will be greatly appreciated, this is an urgent request please, this software will be released into the market within a week, and I am simply stuck after a lot of tryng to figure out whats wrong.
|
|
|
|
|
On further investigation, I noticed one more strange thing. Just above the problematic combo box, there is a radio button with id IDC_RADIO_LEFT.
My OnCtlColor has code like this:
if(pWnd->GetDlgCtrlID() == IDC_STATIC
|| pWnd->GetDlgCtrlID() == IDC_RADIO_LEFT
|| pWnd->GetDlgCtrlID() == IDC_RADIO_RIGHT
|| pWnd->GetDlgCtrlID() == IDC_CHECK_RESIZETOFIT
|| pWnd->GetDlgCtrlID() == IDC_CHECK_PLAYINSEQ
|| pWnd->GetDlgCtrlID() == IDC_CHECK_LOOP
|| pWnd->GetDlgCtrlID() == IDC_CHECK_PAUSEDATSTART
|| pWnd->GetDlgCtrlID() == IDC_CHECK_ENABLELINK
|| pWnd->GetDlgCtrlID() == IDC_STATIC_AFFILIATEID
)
{
// Set the background mode for text to transparent
// so background will show through.
pDC->SetBkMode(TRANSPARENT);
// Return handle to our CBrush object
//hbr = m_brush;
return (HBRUSH)::GetStockObject(NULL_BRUSH);
}
Now if i remove the line
|| pWnd->GetDlgCtrlID() == IDC_RADIO_LEFT
from the if condition, the combo box works fine.
|
|
|
|
|
Well, I got a kind of hack that fixed the problem.
By default, the id for IDC_RADIO_LEFT was #defined as 1001 in the auto-generated resource.h file. I changed this to some other value (5000) and I no longer get the problem.
Probably the ID for the edit portion of the combo box was also 1001 by default, and this was causing problems in the OnCtlColor method.
Hope this helps someone.
Best regards,
~Ambar.
|
|
|
|
|
hello friends
plz help me by sending a source code of packet sniffer using console programming in vc++, or using c++. or some help regarding sniffer.
thanx
bye
|
|
|
|
|
|
Hi everybody. I'm having a problem with a method for a bank account program. There aren't any sytax problems, it just doesn't do what I think it should do. It's part of the creation of an account and needs to check if the account number has already been assigned to another account. Unfortunatly, it doesn't seem to be checking it.
getAccountCount() returns the number of created accounts.
bool account::setAccountNumber(unsigned int inputNumber) {
for (int x = 0; x < getAccountCount(); x++) {
if (assignedAccountNumbers[x] == inputNumber) {
cout << "\t*Account " << inputNumber << " already exists!*" << endl;
return false;
}
}
this->accountNumber = inputNumber;
assignedAccountNumbers[x++] = inputNumber;
return true;
}
If anybody sees my problem, a little help would be great. Thanks in advance.
|
|
|
|
|
Just to illustrate the problem, here's the output of my program, thus far.
(note: setAccountBalance() hasn't been implimented yet. )
Create an account:
What name? <code>Smith, John</code>
What account number? <code>123</code>
What starting amount? <code>$5.00</code>
Bank account 123 was created.
Create an account:
What name? <code>Doe, John</code>
What account number? <code>123</code>
What starting amount? <code>$100.00</code>
Bank account 123 was created.
Create an account:
What name? <code>This, Sucks</code>
What account number? <code>123</code>
What starting amount? <code>$1.00</code>
Bank account 123 was created.
Listing accounts...
0: Name: Smith, John
Account Number: 123
Account Balance: $0.0
1: Name: Doe, John
Account Number: 123
Account Balance: $0.0
2: Name: This, Sucks
Account Number: 123
Account Balance: $0.0
Press any key to continue
Thanks!
|
|
|
|
|
Anonymous wrote:
assignedAccountNumbers[x]
Are you sure this array is correctly holding all the assigned account number?
Could you show me your code snippet here but beware if it more than one page code better option would be to send it by Email to me.
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
Is the value that getAccountCount() returns getting incremented correctly? I would be inclined to add a few more "debug" statements. For starters:
cout << "Count = " << getAccountCount() << endl;
for (int x = 0; x < getAccountCount(); x++)
{
cout << "Comparing " << assignedAccountNumbers[x] << " to " << inputNumber << endl;
if (assignedAccountNumbers[x] == inputNumber)
...
}
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I have the handle of a bitmap picture. How can I acess its pixels?
Any help would be appreciated.
Awasthy
Any work worth doing is worth doing well.
|
|
|
|
|
|
I'm trying to (programatically) bring a dialog window to the top of the Z-order (not "always on top", just to the top of the Z-order). Unfortunately, no combination of any of the following appears seems to work.
SetWindowPos (&CWnd::wndTop, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
BringWindowToTop();
SetForegroundWindow();
SetActiveWindow();
SetFocus();
I even tried posting a WM_NCLBUTTONDOWN , but that didn't work. A nudge in the right direction would be appreciated!
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Since I keep track of the user's "always on top" preference, I decided to simply make the window topmost by doing SetWindowPos (&CWnd::wndTopMost, ...); when I wanted to bring it to the top and lower it's Z-order (if necessary) by calling SetWindowPos (&CWnd::wndBottom, ...); .
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Beginning with 98 and 2K, there are restrictions on when an app can change the foreground window. The restrictions are spelled out in the docs for SetForegroundWindow() .
--Mike--
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
Actually, the Z-order repositioning is done (in a timer tick) by the dialog itself, so these restrictions don't apply, but they're good to know anyway. Thanks!
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
In 3ds max,I want to export XFile.
Which plug-in are better used?
I use 3ds max5's XSkinExp.dle.
The Coordinate of XSkinExp.dle is Left-Hand,But 3ds max is Right-Hand.
So.. the coordinate of picture is error.
|
|
|
|
|
Where can I download the XSkinExp Project Support 3ds max7?
Could you tell me in which web address and which version of DX update or Extra?
I Find this project for a long time.
|
|
|
|
|
Where can I download the XSkinExp Project Support 3ds max7?
Could you tell me in which web address and which version of DX update or Extra?
I Find this project for a long time.
|
|
|
|
|
Hi, I have some questions about inheritance.
For instance, I have a class A and it has
one public method metPubA,
one protected method metProA,
one private method metPriA,
one private int variable intPriA,
one protected int variable intProA,
one public int variable intPubA.
I have derived a class B from A with public kind.
In class B which methods and variables of A will be copied and can be usable?
Is that possible to change the inside of intPriA from B without a public or protected method in class A that changes inside of intPriA?
Lastly, if I create another derived class C from class B with public kind. The intPriA variables that class B, class A and class C has the same one or what? I mean if I change the intPriA from class B what will happen to class C one?
I'm confused on this subject, any help would be appriciated also any good article that has explanation on this would be very very helpful.
Kind Regards,
|
|
|
|