|
I want to add some text in my progress bar on it's initilization. How to do so.
Reply me soon
|
|
|
|
|
I think somebody already posted an article about that on this site. Take a look at the MFC Control/Progress Bar.
|
|
|
|
|
If you're using MFC use SetPaneText otherwise send a SB_SETTEXT message.
|
|
|
|
|
Sorry, I incorrectly read "status bar".
|
|
|
|
|
Hello!
Is it possible to create an application on VC++.NET targeting the Palm OS?
If it is... how to do it?
I do not wan't to learn CodeWarrior (I don't have the time)
Thanks!!
|
|
|
|
|
I've created a remotecontrol service that runs on our PC's, we have a large network of dialups.
I then have an Authenticated session created against the PC from dialling in PC on IPC$ as an administration user. This user then sends a request to the named pipe, to launch a specific program.
This launched program, then does a NetView and finds other machines on it's network, then it will launch programs using the same technique on the other machines on it's network. The user that is dialing in, is the same on each machine, with the same username and password. The are not in a domain. CreateProcessAsUser using the Token that was given from the dialin authenticate.
Problem is.. When the program is launched remotely, it doesn't work against the other machines, only itself.
If you Logon to the machine, and run the program it's fine.
I can't see anything in the eventvwr to demonstrate that an error relating to security is occuring.
Does anyone have any ideas what I might be missing for my remote user?
|
|
|
|
|
I am writing a program which runs just fine in the computer where I am developing it. The OS is Windows XP. Since I wanted someone else to see my program I tried to run it on an old laptop that I have which runs on Windows 95. Unfortunately I got an error generated with _com_error which says:
Error Number: 0x80040154
Error Message: Class not registered.
I fixed this error by installing DCom95 and MDAC 2.5 Service pack 3 because they were required for windows 95.
However I get another error which says:
Error Number: 0x80004002
Error Message: No such interface supported.
This is part of the code
// Initialize the COM environment
if( FAILED( hr = ::CoInitialize( NULL ) ) )
{
_com_issue_error( hr );
}
// Create a connection with the database
// THE FIRST TIME THE PROGRAM WOULD FAIL RIGHT HERE
if( FAILED( hr = m_pConn.CreateInstance( __uuidof( Connection ) ) ) )
{
_com_issue_error( hr );
} // end if
m_pConn->Open(L"Provider=Microsoft.Jet.OLEDB.3.0;\
Data Source=SomeDbFile.mdb;",
L"", L"", adOpenUnspecified );
// NOW IT FAILS RIGHT HERE
// Create an instance of Command
if( FAILED( hr = m_pCmd.CreateInstance( __uuidof( Command ) ) ) )
{
_com_issue_error( hr );
} // end if
Besides installing DCOM95 and MDAC Is there anything that I can do to to make the program run in Windows 95?
none
|
|
|
|
|
what's the type of the m_pCmd variable? it is possible that you are using some interface which is supported in later versions of ADO library (e.g 2.7), since the code is developed on WinXP.
also, IIRC, there were some changes in interface IIDs between the versions of ADO.
which ADO tlb are you #importing?
|
|
|
|
|
This is the declaration for the m_pCmd variable:
_CommandPtr m_pCmd;
The ActiveX component I added to my project is:
Microsoft ADO Data Control, version 6.0 (OLEDB).lnk
To tell you the truth I don't have any tlb files, but only tlh and tli.
If what you say is right then I need to install ADO 2.7 on Windows 95 machines. According to Microsoft ADO 2.7 runs on Windows 98 and above. Now I could try to install ADO 2.7 on Win95 and see how it works. Thank you very much for your help so far.
none
|
|
|
|
|
these tlh/tli files are the result of #import directive. you probably have something like #import "msado15.dll" (i thought it was msado15.tlb, my error). i remember having similar problems with app i wrote 2 years ago for my company, but we solved them by installing the same version of ADO on all machines.
also, you can use OleViewer utility to check the contents of the ADO library on both systems, and interface IIDs.
|
|
|
|
|
You are right, using OleViewer I have ADO 2.7 on XP. I just don't know how to read the interface IDDs. On the other hand when you say use OleViewer on both systems, are you implying that I need to have VC++ 6.0 installed on Win95 because that is not my intention? The computer with Win95 is just a test site for the release version of the program. I know that on Windows 95 I have ADO 2.5 because I downloaded it from Microsoft a couple of days ago. So what you're saying is, that no matter what, I need to install ADO 2.7. The thing is that ADO 2.7 won't work on Windows 95.
Thank you again for taking the time to help me.
none
|
|
|
|
|
to read IIDs just find the ADO typelib in Type Library section of OleViewer, right click on it and select "view...". A new window will popup and in the left side of that window click the appropriate interface. in the right side pane you will see the declaration of the interface, including its UUID. you don't have to install VC++ on Win95, just copy OleView.exe
you can try installing ADO 2.5 on WinXP, and do your development against that version of ADO, but i'm not sure if this will introduce some unwanted side-effects, since i don't have that much experience with ADO.
hope this helps
|
|
|
|
|
Thank you so much Zed. You have been a great help and you have no idea how much I appreciate it.
If nothing works I guess my final solution will be not to provide a Windows 95 version. I still have to give it a try to make it work.
By the way, yesterday I found a program from microsoft which allows you to check the ADO installed in your system. It is called ComCheck and you can find it on http://download.microsoft.com/download/5/3/4/534afa5c-71d4-4dab-bce8-afd65f8f8de5/cc.exe
Just in case you ever need it.
I still used the OleViewer.
none
|
|
|
|
|
i'm glad you found some of the information useful.
you can also check microsoft's ADO newsgroups, i'm sure you will found someone who had same problems with ADO versions, and hopefully, a solution for it.
thanks for advice about ComCheck
|
|
|
|
|
Hi, i new to Visual C++ and have some enquery about tab control, hope to get some expert guidance.
Previously i made a tab control with 3 tabs but both 3 tabs have nothing on it. How do i customise each tab control? (Example) Such as tab1 with dropdown list, tab2 with radiobuttons, tab3 with text field.
I have seen some other project which they design each tab on its own using the dialog resource. Do i need to do it that way? If that is the case, I need to design 3 dialog for my 3 tabs ? Help really needed here.
m_tab_ctrl.InsertItem(0, "Tab 1");
m_tab_ctrl.InsertItem(1, "Tab 2");
m_tab_ctrl.InsertItem(2, "Tab 3");
i had included the above code in the CDialog::OnInitDialog();
Any solutions? Thanks in advance.
I green to Visual C++, Please be gentle to me. (Simpler terms please )
|
|
|
|
|
You have two solutions:
1) the one you mentionned (or you can also use the CPropertyPage class if you just need a dialog with only the tab control - take a look at the documentation !!)
2) if your tabs are really simple you can hide/show the controls on it depending on the active tab (hmmm, it's not a very elegant solution but I use this if the tabs arre really simple)
Hope this helps
|
|
|
|
|
Use the property sheet...
If you have to handle messages from the controls inside the tabs, it would be easier...
Here's how to start:
1. Create a new class derived from CPropertySheet (CMyPropertySheet or whatever).
2. Create one dialog for each tab you need.
3. Create a class for each dialog, but don't use CDialog as the derived class, you must choose CPropertyPage.
4. Handle all events you want to in each dialog...
5. In order to create the Property pages you should do it in the contructor of the property sheet (look at AddPage (from my memory ))
(Remember to create a variable for each dialog(propertypage) that you need to add inside the property sheet. Remember to include all the Property Pages *.h (headers) in the MyPropertySheet.h...
In order to make the results visible you'll have to call do modal...
NOTE:
if you want to create the property sheet embedded you'll have to work more, but it is also easy...
try it, if you cannot reach it, post another message.
Hope this helps...
|
|
|
|
|
I'm trying to write a program that reads state abbreviations from an input file and then outputs the corrosponding state to an output file. (this is my first class in programming)
I'm using a while loop that runs until the end of input file and switch statements to match states and abbreviations, here is a portion...
<br />
inAbrev >> firstLetter >> secondLetter;
while(inAbrev)
{<br />
<br />
switch (firstLetter)
{<br />
case 'A' : switch (secondLetter)<br />
{<br />
case 'L' : outState << inAbrev << " is " << "Alabama" << endl;
break;
case 'K' : outState << inAbrev << " is " << "Alaska" << endl;<br />
break;<br />
case 'Z' : outState << inAbrev << " is " << "Arizona" << endl;<br />
break;<br />
case 'R' : outState << inAbrev << " is " << "Arkansas" << endl;<br />
break;<br />
}<br />
I can get it to compile but my loop (and maybe my switch statements) seems to be wrong.
The problem is that it gets stuck on the first input (AL) and goes into an infinite loop of just reading that input,
it is never evaluated and nothing is output.
I'm probably missing something simple but my beginners brain can't find it.
Any help would be great.
Thanks,
Aaron
arrrgh
|
|
|
|
|
The first line should be inside the while loop.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks Joaquin, my while loop now works. However for some reason my switch statements are not being run. If you or anyone has any suggestions it would be great.
Thanks again,
Aaron
arrrgh
|
|
|
|
|
Dear All,
I am creating a dialog application using MFC , and in which i am using a "Date Time Picker control"
I want to set the time in format hh:mm.
---------
I have kept ID of control : IDC_TIME
and using the following macro in Initdialog
DateTime_SetFormat((HWND)GetDlgItem(IDC_TIME),"HH:mm");
---------
But it is not serving my purpose. I donot want to make its member variable. Can u make some modification in above code to solve the problem.
Please comment.
|
|
|
|
|
You need to get a pointer to the control - this should work:
-----------------------------
CDateTimeCtrl* pCtrl = (CDateTimeCtrl*) GetDlgItem(IDC_TIME);
ASSERT(pCtrl != NULL);
pCtrl->SetFormat("HH:mm");
-----------------------------
Hope that helps
JohnJ
Time for a but no
http://www.rainbow-innov.co.uk[^]
|
|
|
|
|
I'v built a SDI based application,and create two classes based on CWnd, in the view, i created them and set theirs parent to this view, and want the last window on the topmost, the first on the middle layer, and the view on the back, so i use SetWindowPos() function with the last window class,but it doesnt work,when i click the middle layer window ,the middle layer window appear to the top,why?
Is there anyone can give me any idea?
Thanks anyway!
|
|
|
|
|
|
In my application:
the view be the background,
the 1st CWnd based window be a portrait(middle layer),
and the 2nd be a frame(topmost layer,and with a rect hole in it),
so the three layer can make up a photo,(god,my poor english!),Can you understand?
So,i can't set one window to the other's parent,the two can be moved separately.
|
|
|
|