Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer
Recent update: 2008-3-7

Setting permissions on directories

636 byte By Luke Alexander at 2008-3-7
I have tried to set permissions on a directory in Windows NT 4 using the standardAccess Control APIs - the source code is below - unfortunately it only addsSpecial Directory Access, and not Special File Access to the directory.Does anyone know where I'm going wrong.EXPLICIT_ACCESS * expAccess =...

Dynamically created controls and message maps in MFC

997 byte By Travis Hall at 2008-3-6
Using MFC, it is easy enough to create a dialog from a template created atdesign time, and to route windows messages through the message map of a classbased on CDialog which embodies the functionality of the dialog, for controlsplaced on the template at design time. For example, I can make a new dia...

Dialog based application

414 byte By bill zemek at 2008-3-5
When one creates an MFC Dialog based application, the resultant executableis very small and compact (eg < 40 K), but the runtime window is static -it cannot be minimised or resized.Can someone advise me what I must add to the project to make the window atleast minimisable. (Perhaps it is better t...

CComboBox?

551 byte By Val at 2008-3-3
HeyI am trying to teach my self MFC and I havea couple of problems.I really need your help guys couse I am stuck!!!I created myApp with MFC appwizard as dialog (not SDI or MDI)and I have button that will bring another dialog2 in my first dialog1 I havecombobox as dropdown list with data listfrom sec...

SetwindowsHookEx, GetItem, Crash in ComCtl32.DLL

4488 byte By Johnny at 2008-3-1
Hello All...First off, I would like to thank ChainsaW, Steve, and Damit for their helpwith this particular situation. However, I am still having problems...For those who dont know, let me reiterate my problem:I am writing an application that gets a CTabCtrl item. The CTabCtrl item(TCITEM) resides...

write behind cache

259 byte By Edgard Riba at 2008-2-28
How can I check if Write Behind Cacheing is turned on or off, and turn it off/on programmatically? This is important for non-SQL databases' integrity. I want my program to both warn, and if possible turn it off. TIA, Edgard L. Riba

How can I know whos currently using a file ?

336 byte By Frank Megel at 2008-2-27
When I try to open an office document that is already in use, I get an alertmessage and I'm asked if I want to open the document in a read-only modebecause Mr. X is currently using this document.Well, I'm trying to find out where the function that provides the name ofMr. X is located.Thank...

Browser Panes

330 byte By Emad Steitieh at 2008-2-26
You can use the WebBrowser control whether you are using C++ or VBMichael L. <ignite@ignited.net> wrote in messagenews:38b443df@news.dev-archive.com...>> Is there any way I can implement an IE or Netscape pane into anapplication?> (Ideally without the use of MFC)> Thanks....

prevent mdi child wnd name from displaying in Window menu

298 byte By Max at 2008-2-25
By default, MFC adds the MDI child window names in the "Window" menu(after a seperator), typically, in a MDI application or a sigle doc mutiple view application - more accurately, it adds the names into the second menu item counting from right to keft. Anybody know how to disable this?

Drawing with out erasing

442 byte By SUKU at 2008-2-24
Hi,I want to draw a rectangle over an existing drawing. That rectangle can beresized using mouse. While drawing the new rect, previous one has to be erased.Doing so erases the existing drawing on which i had drawn the rect. How todo that with out erasing? (I am not doing this in OnDraw as it makes w...

Set Text Background trasparent in CListCtrl

498 byte By Evelyn at 2008-2-23
Hi,Would there be anyone help me answer the following question?I use CListCtrl to form a list view in my application. I use SetBkImage(IMAGEPATH,TRUE, 0, 0), where IMAGEPATH is the path of image, to set a bitmap imagefor the background of list view. However, the text background cannot be transparent...

File I/O

381 byte By Harry at 2008-2-22
I use Document/view structure. My data has to be saved in a file structurewhich is written in C (fopen). I like to use MFC document SetModifiedFlag()fn to remind user when the window is closed, the file is modified. Do yousaved it or not. I put the c function in IsStoring {}, the program crash.Any b...

How to send multipart/form-data info to a script via VC++ applicatio

1125 byte By Vasily V. Dodonov at 2008-2-22
I have a local file.Using HTML Form, I can send it to a script and then manipulate the data.Now I want to do the same using VC++ application. To do so, I need to POSTfileName in a multipart/form-data format.How can I do this?Here is the CGI/HTML I use...my $query=new CGI;$currentConfigurationName=$q...

Languages Localisation

659 byte By Saiful at 2008-2-21
Hi AllI need to build a software that need to be able to be localised to take inlanguages other than English. But I don't have any experiences in this area.Can anyone help me by telling me how to go abt doing this or supplying/directingme a good article on this? I do have an existing software t...

Docking Window. Two docking nodes in CFrameWnd.

598 byte By Yuri at 2008-2-20
Hi!I'm using MFC during couple years, and now I met with a big problem. I needto make a docking by no normal way: top and bottom docking nodes must laybetween left and right, but a dockable toolbar has lay in a straight line(see pic):|---||.TOOLBAR.||---||.|.TOP.|.||.|--|.||L|....|R||.|--|.||.|...

Modem Programming

385 byte By Siva at 2008-2-19
Hi,I want to program my modem thru vc++ or C by using WIN32 API.OS-NT 4.0 Sevice Pack 4.0 or greater.How to connect my modem?I want to perform the following tasks.Connect to end-user telephoneSome communication will be doneDetect end user telephone statusand othersArticles, source codes, books all w...

Enumerating Subkeys using ATL class cRegKey

149 byte By Strider at 2008-2-18
How do I do it? I have looked at msdn and all the methods and can't figure out how to enumerate the subkeys of a key. Thanks jc

How to get all desktop level window handles?

99 byte By yangw at 2008-2-17
Do you have some good ideas to get all active desktop level windows handles or some useful API?

How to get all desktop level window handles?

99 byte By yangwang at 2008-2-16
Do you have some good ideas to get all active desktop level windows handles or some useful API?

More tree checkbox frustrations

1061 byte By Cliff Lewis at 2008-2-15
I am working with a CTreeCtrl and CTreeView that has checkboxes. When thetree view first appears, all of the boxes are unchecked. I want the opposite--allboxes checked. I have written a routine that steps through all the itemsin the tree and calls GetTreeCtrl().SetCheck(hItem, TRUE) for each item.I...

I have a large dinamic bitmap, how can I save it into file *.bmp

64 byte By Alexey M at 2008-2-15
I have a large dinamic bitmap, how can I save it into file *.bmp

How to change push button color in Visual C++ 6.0 - YES

644 byte By brk at 2008-2-15
As a matter of fact, yes I do..Oh, by the way, you can use OnCtlColor becausethat is what I use!!1. Create a button with the "OwnerDraw" property set.2. Create an HBRUSH member variable in the Dialog class:HBRUSH m_hButtonBrush;3. In the initialization of the dialog _ OnInitDialog(),initialize the v...

API functions vs. standard functions...

67 byte By brk at 2008-2-14
What is the difference? Example? How can I tell one from the other?

ado and mfc

319 byte By Richard Schuster at 2008-2-14
I would like to know how to incorporate MFC (I want to use COleDateTime andCString objects) into code that uses ADO database access.Creating an MFC object will not compile. This is the message:fatal error C1189: #error : WINDOWS.H already included. MFC apps mustnot #include <windows.h>...

Sending Message

358 byte By Pablo Reyes at 2008-2-10
Hallo!I want to know how do I send a Message from aMDIFrameWnd class (CMainFrame).From the toolbar from the MainFrame I push a buttonthat calls a member function (OnToolsF2).This fuction should send a Message, and a CDocumentclass receive it and run a code.(OnReceive Message?)....Any help will be ve...

Sending Message

358 byte By Pablo Reyes at 2008-2-9
Hallo!I want to know how do I send a Message from aMDIFrameWnd class (CMainFrame).From the toolbar from the MainFrame I push a buttonthat calls a member function (OnToolsF2).This fuction should send a Message, and a CDocumentclass receive it and run a code.(OnReceive Message?)....Any help will be ve...

concole application and tcp/ip

592 byte By Stanisaw Bartkowski at 2008-1-31
I have written telnet client application using console mode (WIN32 consoleapplicaton). It works very slowly underWIN9X, particulary while displaying a lot of data on the screen (using WriteConsoleOutputAPI function).To handle TCP/IP I'm using standard socket function (connect, send, recv...).I...

Toolbar hints displayed in the statusbar for Dialog Boxes

499 byte By Justin Heaver at 2008-1-22
Hi All,I have designed a dialog box that contains a toolbar and statusbar. I amtrying to display the toolbar button hints on the statusbar, as well as thenormal tooltip hints. I have looked at examples and they use the WM_SETMESSAGESTRINGto display the hint on the statusbar but when I move the mou...

Copyright character

144 byte By Shyam at 2008-1-19
Hi friends i will be very glad if you can tell me the code for copyright character. i mean "circled c". Regards Shyam.

Displaying a JPEG

579 byte By Travis Hall at 2008-1-13
I'm not sure whether this is really a Windows-specific question, but anyway...I wish to display an image saved as a JPEG file (with .jpg extension) ina dialog box. Can anybody tell me how to go about this?I have worked out how to load an image saved as a bitmap, but not a JPEG.I'm guessing...

Application run as process

173 byte By Andrei Alexandru at 2008-1-13
Hi, my name is Alex and I'd like to know how can I run an application as process (or what should I do to run an applicatin that is invisible in EndTask window).

ATL ACTIVEX SERVER COMPONENT

2520 byte By Luis Abreu at 2008-1-12
I need to build an ActiveX Server component for sendind email messages. I've built a client object(Internet Explorer Object) to test my code and itworked. The problems started when I copied the code to my server component(ATL ActiveX Server component). This component has one method, Send(), and...

errors in created DLL

520 byte By Goldy at 2008-1-12
I exported a function from Matlab as a *.cpp file, made it into a DLL andused it in a Visual Basic project. When I ran the program within the VisualBasic environment, I encountered no errors. But when I made this projectinto an *.exe file and ran it again, there was an error in the MSVCRT.dll(some...

How to get notification for chk box in CTreeCtrl

132 byte By Rajeev at 2008-1-10
I want to handle notification when i click chk box in treeview, but i don't see any notification message which allows this.

Dynamic Array of ActiveX controls

381 byte By marc cohn at 2008-1-10
Hi all,Does anyone know how to create a dynamic array of active x controls.I am having the user add active x controls dynamically to a window, but ihave to reserve a member variable for each one. I would rather have eachactive x control added to a dynamic array so i don't have to guess how man...

I cant use ADVanced API registry functions on MFC VC++4,0

282 byte By Steve at 2008-1-10
Yes, it's the truth! OK for getting and setting INI files, but not for RegOpenKeyEx function, also having been included advapi.lib on linker settings: in this case MFC says " RegOpenKeyEx - undeclared identifier". Is anyone who explains what I can do? Thanks a lot!

How to access .dbf file directly?

277 byte By lvxs at 2008-1-10
I want to access .dbf file directly in ODBC form. But I must construct a DSN in ODBC control panel. But I don't want to show ODBC dialog to user. So I want to create virtual and temporary CDatabase and access .dbf file. How can I do this work? thanks!

Suppressing save file option

2124 byte By Christopher Sharp at 2008-1-9
I would be very grateful for some help. I'm working on a program writtenby previous authors with which I need to make some changes. On startingup the program I want it to skip over asking the user for a filename, andfound that in the code fragment:...ASSERT_VALID(pDoc);CString nameFile=pDoc-&...

Capturing selected text - is it possible?

296 byte By Tom at 2008-1-9
Please help!! I am writing a dialog based application (I am relatively new to this) and before I display the dialog I want to get the currently selected text in another running application. I do not know if this is possible - any tips or help would be greatly appreciated!! Thanks

DataBase Handler

288 byte By ali khan at 2008-1-9
Sir, If i derive a class From CDatabase as CDatabase:Cstudent {... } And if i create instances like Cstudent s1,s2,s3; all of them will create 3 Handles.How can i use single handle to use many access to the Database. Thanks in advance.

How to change push button color in Visual C++ 6.0

505 byte By Joseph at 2008-1-9
Posted this question on C++ general but it may better fit underthis posting:I was able to change my dialog box background color in Visual C++6.0 under InitInstance() with SetDialogBkColor(). That functionset the text and background color but excluded the push buttonsinclude on the dialog window.Trie...

Want to learn OOP. know C++ but want to start over any advise where

316 byte By M. Shams Mukhtar at 2008-1-8
Go read Thinking in C++ by Bruce Eckel, u'll enjoy it okshamswww.xpersoft.comshams@teacher.comshams@xpersoft.comFarhan wrote:> hi> Want to learn OOP. know C++ but want to start over any advise where to start.> Please help.>> Thanks...

Color changing using resources (win 32 & c)

693 byte By sloth at 2008-1-8
Help.....I'm using a resource defined dialog box in my program (some buttons anda list box). No problem invoking it, installing a DialogProc function, retrievingmessages, etc. Is there any way to change the background and text color ofthe list box? (I've tried getting the dc to the listbox...

dll Export

196 byte By jaffer at 2008-1-8
Sir, I have written a function which is returning an object can i use this function as a dll in VB? How can i use the object in VB?give with an example. Thanks in Advance

Trying to make a left Nav Bar like outlook 2000

383 byte By kin-zaze at 2008-1-8
hi ,i ' like to make a left nav bar lika outlook so i've tried to make a controlbar in which i could insert a splitter wnd with different view i've createda CMybar::CControlBar and try to make a CWndSplitterWnd in it but with differentview inside but i met too much problem so any help...

Trying to make a left Nav Bar like outlook 2000

68 byte By kin-zaze at 2008-1-7
hi , i ' like to make a left nav bar lika outlook 2000

Crossposting - Not always what it appears to be :)

1157 byte By Thor Kornbrek at 2008-1-7
I have a question that will appear to Bill to be a crosspost. This is notthe case. I am new to this newsboard, and did not know that the getting startedsection is for (ANSI/ISO specific questions. <Danny Kalev>. Not an exactquote.)I have a question about an MFC Class, CArray:I know that the ba...

writing .dbf file using VC++

532 byte By Tahir Aslam at 2008-1-7
I am trying to write a dBASE III table using Visual C++. I have obtainedinformation on structure of that table at www.inprise.com. The program writesbyte by byte file header, field descriptors and actual records using CArchiveclass. It appears to work correctly and smoothly. However when I open the...

Dll programming

133 byte By Agustin at 2008-1-7
My Vbasic application can't see the functions I exported from a Dll made in C++ Builder. What have I do the export them?

Want to learn OOP. know C++ but want to start over any advise where to start

117 byte By Farhan at 2008-1-6
hi Want to learn OOP. know C++ but want to start over any advise where to start. Please help. Thanks