The Wayback Machine - https://web.archive.org/web/20090318132200/http://www.codeproject.com:80/script/Forums/View.aspx?fid=1647
Click here to Skip to main content
5,985,269 members and growing! (19,266 online)
Announcements
* Bold indicates new messages since 4:21 18 Mar '09
BullFrog Power
Advanced Search
Sitemap

C / C++ / MFC


Home > Forums > C / C++ / MFC

 Msgs 1 to 25 of 9,616 (Total in Forum: 382,877) (Refresh)FirstPrevNext
AdminHow to get an answer to your questionadminChris Maunder18:19 12 Feb '09  
For those new to message boards please try to follow a few simple rules when posting your question.
  1. Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
  2. Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
  3. Keep the subject line brief, but descriptive. eg "File Serialization problem"
  4. Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
  5. If you are posting source code with your question, place it inside <pre></pre> tags, or click the "Ignore HTML tags in this message" check box.
  6. Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
  7. Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
  8. Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
  9. If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
  10. No advertising or soliciting.
  11. We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.


cheers,
Chris Maunder
CodeProject.com : C++ MVP

QuestionHow to create window with Transparency level starts from 0 to 100%?memberp_19601 min ago 
How to create window with Transparency level starts from 0 to 100%?
Left side transparency level = 0%
Right side transparency level = 100%

Is it possible to use AlphaBlend() API.
Is it possible to use GradientFill() method of CDC.

pls let me know with sample
QuestionHow to know the type of application?memberCool_Phillip53mins ago 
Hi All
Suppose i've a VC+ project. how ll i know wheather its a SDi or MDI or dailogbased project?

Regards
Phillip

Regards
Phillip

AnswerRe: How to know the type of application?mvpDavidCrow24mins ago 
Cool_Phillip wrote:
how ll i know wheather its a SDi or MDI or dailogbased project?


By looking at it?

"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons


AnswerRe: How to know the type of application?memberJerry.Wang15mins ago 
Try to create each one of the 3 types project, look at what is difference, the main difference is CMainFrame
QuestionNet hookmemberShiXiangYang1 hr 10mins ago 
I want use hook to catch net data passed by local machine,how can I do?
AnswerRe: Net hookmemberJerry.Wang19mins ago 
1, The best way is sniffer, download the WinPcap http://www.winpcap.org/[^], and look at the samples.

2. Hoot the network api, such as send sendto etc. download M$ detours , look into the sample which hooks the network api.
QuestionDriver conversion from 32 to 64 using C++memberSanthosh Sebastian2hrs 43mins ago 
Hai all

Is it possible to convert a 32 bit driver application to 64 bit compatible using visual studio 08.
If yes what are the requirements which we should take care?

Advance thanks for all the answers forwarded...

Santo
QuestionNeed information about how to send emails in VC++memberJohn5022hrs 45mins ago 
Hi,
I need some help on how to send emails using VC++ code..? is there any API available for sending emails..?

If so please kindly let me know..

Any help will be appriciated...

Thanks in advance...
AnswerRe: Need information about how to send emails in VC++member _AnShUmAn_ 2hrs 38mins ago 
MAPI[^]

You need to google first, if you have "It's urgent please" mentioned in your question.
Wink_AnShUmAn_

AnswerRe: Need information about how to send emails in VC++mvpIain Clarke2hrs 24mins ago 
Just to echo Anshuman:

http://www.codeproject.com/KB/IP/#Internet%20&%20Network%20-%20MAPI[^]

But there's articles aplenty!

Good luck,

Iain.

In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!

QuestionUnhandled exception when exiting application???memberllp00na2hrs 51mins ago 
I have created an MFC application, dialog based. The application contains 4 child dialogs. and everything was fine.

Now I tried to create a 5th dialog box. The program compiled and ran fine but when i try to close the main dialog window I receive:

Unhandled exception at 0x7c22c81a (mfc71d.dll)

The Call Stack refers to the InitDialog? Frown

llp00na

AnswerRe: Unhandled exception when exiting application???membergayatri.neelema2hrs 1 min ago 
Hi ,
Wanted to know if all the handlers for the child windows are correctly returning the value.
Is the 5th dialog box having some extra code , or is it not returning the value which it is supposed to .
QuestionHow to display the content of particular folder in Tree control?memberAnithaSubramani2hrs 55mins ago 
Hi All,

Im using CTreectrl. I need to display the content of particular folder. The folder is "Sample" it has sam.txt, example.txt ,book.xml etc. How to display the Folder(Sample) and it content.

Please help me..........


Thanks & Regards,

Anitha
AnswerRe: How to display the content of particular folder in Tree control?mvpIain Clarke2hrs 45mins ago 
In the old days, there was a very nice function called DlgDirList (and DlgDirListComboBox) which filled a listbox / combobox with the files in a directory.

But there is no equivalent for a Tree Control, sorry.

You need to combine two bits of knowledge:

1/ FindFirstFile / FindNextFile to loop through all the files in a directory that match (eg) "*.txt".
FindFirstFile has a decent bit of code sample in its documentation that will be better than anything I can quickly type.

2/ And CTreeCtrl::InsertItem to put those items in the tree.

Lastly, download my article: http://www.codeproject.com/KB/system/Drive_Detect.aspx[^], and look in the code. It has code to construct an imagelist with the pictures for the different drives in it. This stage is optional, but little pretty pictures never hurt!

Good luck,

Iain.

In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!

AnswerRe: How to display the content of particular folder in Tree control?member _AnShUmAn_ 2hrs 39mins ago 
Use FindFirstFile/FindNextFile api's to get the content of the folder. You can check using WIN32_FIND_DATA if the specific object is a file or a folder.

You need to google first, if you have "It's urgent please" mentioned in your question.
Wink_AnShUmAn_

AnswerRe: How to display the content of particular folder in Tree control?memberStuart Dootson2hrs 37mins ago 
You know, CodeProject has a whole section of articles on tree-controls[^], including this one[^].

Do try and show some initiative. You managed to find this site - searching it and finding that article would have been the ideal next step...

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

Questionerror LNK2019: unresolved external symbolmemberPankajB4hrs 34mins ago 
Hi there.

FYI: I am using a DLL with an exposed class. When I try to create an object of the same class, I got below error message. Can someone please provide some pointers on this i.e., Why am I getting this error message and what can i do to resolve this problem?

Error 1 error LNK2019: unresolved external symbol "public: __thiscall CDataAccessManager::CDataAccessManager(class ATL::CStringT<wchar_t,class ATL::StrTraitATL<wchar_t,class ATL::ChTraitsCRT<wchar_t> > >Wink" (??0CDataAccessManager@@QAE@V?$CStringT@_WV?$StrTraitATL@_WV?$ChTraitsCRT@_W@ATL@@@ATL@@@ATL@@@Z) referenced in function _wmain eDocManager.obj

Incase any further information required, please let me know.

Thanks.
PanB
AnswerRe: error LNK2019: unresolved external symbolmvpCedric Moonen4hrs 26mins ago 
Do you have a body for your CDataAccessManager constructor ?

Cédric Moonen
Software developer

Charting control [v1.5]
OpenGL game tutorial in C++

GeneralRe: error LNK2019: unresolved external symbolmemberPankajB4hrs 20mins ago 
Yes I do. Anyway, i found the solution. I replaced the lib file and everytjhing seems to be working now. Thanks anyway.
QuestionHow to replace/change the container menu item and menu item behaviour from an activex controlmemberMember 43614554hrs 55mins ago 
Hi All,

I have inserted a "Adobe Acrobat Reader activex control" into my "mfc activex control" project, so that I can use it instead of adobe's default activex to view pdf files in internet explorer.

Now, when the Acrobat activex loads in internet explorer, the file menu gets modified. Typically, the "Print" option is modified in such a way that it calls the acrobat reader's print dialog box.

I want to have my activex control override the default File menu behaviour of Internet Explorer just like the acrobat reader control does. Why I would want to do this is to be able to discard the original (Internet Explorer's) Print message and call the inserted acrobat reader's Print function (or any other similar function present in the control).

After much attempts at trying to find relevant documentation, I could not find anything that would be of much use Confused. Can anyone please point me out to either some similar document/link where such an example has been elaborated.

Many thanks in advance... Smile
QuestionA dialog with button controls does not have focus OnKeyDownmemberAglaiaMasaki5hrs 15mins ago 
Hello.
At the first time, I made a dialog with OnKeyDown function and there was no control on the dialog.
My OnKeyDown function worked well. I pressed a key(spacebar) and OnKeyDown function was called. Smile

Next, I made some CButton controls on the dialog. And I soon noticed something wrong, OnKeyDown had no effect.
I found the reason. One of the button controls had focus automatically, and when I pressed spacebar that button was clicked. OMG
(If there was no control on the dialog, that action would call OnKeyDown function.)

So I added the code "AfxGetApp()->m_pMainWnd->SetFocus();" in OnInitDialog, yet that seems ineffective.

I want to make the dialog grab 'keydown' focus like the first time, not the button control.
I need ideas and advice.
Thank you for reading this.

May the sky bring you a full measure of health and prosperity.

AnswerRe: A dialog with button controls does not have focus OnKeyDownmemberCode-o-mat4hrs 21mins ago 
If you read the documentation of CDialog::OnInitDialog[^], you find this:
Return Value

Specifies whether the application has set the input focus to one of the controls in the dialog box. If OnInitDialog returns nonzero, Windows sets the input focus to the first control in the dialog box. The application can return 0 only if it has explicitly set the input focus to one of the controls in the dialog box.

So return FALSE from OnInitDialog. Does that help?

> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <

GeneralRe: A dialog with button controls does not have focus OnKeyDownmemberAglaiaMasaki3hrs 52mins ago 
I tried and the button control seemed losing its 'focus', but when I pressed spacebar, the button was still clicked.

(The problem is that my action(pressing the key) didn't call the OnKeyDown function because of the buttons.
Once I removed the buttons for test, the program worked well. Yet I have to add buttons.)

Anyway, thanks for your answer. If you have any ideas, please let me know. Smile

May the sky bring you a full measure of health and prosperity.

GeneralRe: A dialog with button controls does not have focus OnKeyDownmemberCode-o-mat3hrs 35mins ago 
I'm not sure but you could try catching the key press in the PreTranslateMessage[^] method of the CDialog...

> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Last Updated 9 Aug 2007
Web19 | 2.2.1047 | Advertise | Privacy
Copyright © CodeProject, 1999-2009
All Rights Reserved. Terms of Use