|
linton samuel dawson wrote: The wizard boms out completely...
Which means what?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
CPropertySheet returns from DoModal() prematurely.
For the record / to reiterate, obviously more pages are 'queued up' which do show when I replace the PressButton() with SetWizardButtons() and click the "Next" button.
|
|
|
|
|
In the OnCallBackConnect() function, how about sending the parent a user-defined message so that it can "press" its own button?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Simplicity in itself (why didn't I think of this?!)
Anyway, have a cigar on me David. This works a treat!
Still baffled as to why it won't work without this 'workaround' but hey...
|
|
|
|
|
In fact, a user defined message is not required I found.
If instead I use ...
GetParent()->PostMessage(PSM_PRESSBUTTON, PSBTN_NEXT, 0);
where I would previously call CPropertySheet::PressButton() (where GetParent() is of course the property sheet) then this works too.
Could this also be the missing clue? CPropertySheet::PressButton() does exactly what I do now but with a SendMessage() instead.
|
|
|
|
|
You shouldnt work with the same Window in different thread via getting it from the original handle. You better post registered messages to the window handle.
Greetings from Germany
|
|
|
|
|
Ehrm.... I don't use the FromHandle() method and I *am* posting messages like you suggest.
|
|
|
|
|
I'm calling a setup program setup.exe through a bat file. The problem is that although I'm able to execute the setup program the command prompt lies in the background. The intent is to get rid of this prompt; so that if one clicks on install.bat file the installation is shown in the foreground as going smooth without having the window due to running the bat file visible. Note that the bat file is a must as it contains a handful of dos command that has to be executed around the installation. Could there be any other way to package this stuff? Please help.
|
|
|
|
|
Do you control the setup program? If so, is there some reason the DOS commands can't be run from within your Setup program via CreateProcess with SW_HIDE?
Judy
|
|
|
|
|
Yes The bat file controls the running of the setup program.
|
|
|
|
|
tom groezer wrote: Yes The bat file controls the running of the setup program.
That's not quite what I meant when I asked if you controlled the Setup program. Is it your setup program? Did you write it? If that answer is yes, see the second sentence of my previous reply.
"Do you control the setup program? If so, is there some reason the DOS commands can't be run from within your Setup program via CreateProcess with SW_HIDE?"
Judy
|
|
|
|
|
Adding to Judy's reply, check if ShellExecute() would be of any use to you.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Hi All,
I keep getting the infamous "updating source control status" freeze up at random times during the day in Microsoft visual Studio 2005 Professional Edition.
This message keeps coming in the status bar even if I am just navigating through the class view or solution explorer view.
Following solutions haven't worked:
1) In Visual Studio, turn off Tools > Options > Source Control > Plug in
Settings > "Perform background status updates"
2) Create an empty folder c:\vsstemp. Then in Visual Studio, Tools >
Options > Source Control > Plug in Settings > Advanced > Folder for temporary
files - set to "c:\vsstemp" rather than the default location on the network.
3)In the Registry entry for source safe change the AllowStatusUpdates from 1 to 0...but unfortunately it's already 0.
Someone please suggest a solution for this or this a permanent bug ???
...A Programmer may or may not be the master of the programming language grammar...
|
|
|
|
|
http://www.codeproject.com/Questions/111260/VS-NET-2008-hangs-everytime-we-load-our-project-fr.aspx?tab=mostrecent
UPDATING SOURCE CONTROL STATUS
YaY! YOU FRIGGIN ROCK! Thank you so much! You dont know how bad this was affecting my work!
Because you helped me so much, I'm gonna return the favor and help those who dont know how to update the hosts file.
We have Visual Source Safe 2006 and Visual Studio 2008.
Our VSS database is on a network drive.
Step 1 - Determine which server\computer the VSS Database is on:
In Visual Studio 2008 select File->Source Control->Change Source Control. Note the "Server Name". You're only interested in the server name which is the value between the beginning back slashes and the next backslash. In my case it is dddmisfile
\\dddmisfile\vssdatabase\FocusDD
Step 2 - Determine the ip address of the server: Open a Command Prompt (start->Run type cmd and press enter) and ping your server name (type ping YOURSERVERNAME in the command prompt box). I typed ping dddmisfile and this is what I got:
c:\>ping dddmisfile
Pinging dddmisfile.azdes.gov [10.104.49.10] with 32 bytes of data:
Reply from 10.104.49.10: bytes=32 time=-52ms TTL=128
Reply from 10.104.49.10: bytes=32 time=-52ms TTL=128
Reply from 10.104.49.10: bytes=32 time<1ms TTL=128
Reply from 10.104.49.10: bytes=32 time<1ms TTL=128
Ping statistics for 10.104.49.10:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = -52ms, Average = 1073741798ms
The IP Address you are interested in is the one that follows Reply from
In My case its 10.104.49.10
You're also interested in the fully qualified domain name: which is the name of the server with the domain appended to it. In My case its dddmisfile.azdes.gov
Step 3 - Add a line to your hosts file with any text editor Open the file with notepad. Type this in the run box (Start->Run)
C:\WINDOWS\NOTEPAD.EXE C:\WINDOWS\SYSTEM32\DRIVERS\etc\HOSTS
This is what I see before I modify it:
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
To add your server name to this list, simply add a new line and type the ip address then press tab then the fully qualified domain name:
10.104.49.10 dddmisfile.azdes.gov
Thats it! Close Notepad and you're done! Dont even need to reboot!
Dont for get to save your changes!
|
|
|
|
|
Hi all,
Actually, i want to read a ".reg" file and to write it values accordingly in a list control. Now my problem is i m not getting how to read this file. Is there any way to read this file...
|
|
|
|
|
neha.agarwal27 wrote: i m not getting how to read this file.
What is going wrong?
Show your code so far, please. And the errors you get.
A .reg-file is in every respect a normal text-file. It has a certain format. So you would need to write a (medium-complicated) parser.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
CString str;
CStdioFile ptr;
ptr.Open("C:\\Documents and Settings\\Mac01\\My Documents\\web.reg",CFile::modeRead,NULL);
ptr.ReadString(str);
while(str != "")
{
AfxMessageBox(str);
ptr.ReadString(str);
}
ptr.Close();
I am using this code to read my .reg file. It has various values inside it, but output is "ypW".
|
|
|
|
|
What is the third param of CStdIoFile-c'tor?
My MSDN only shows two parameters there: filename and flags.
Other than that, I don't see what is wrong with your code.
This console-program uses std C++ streams instead as MFC, but it works as intended:
#include "stdafx.h"
#undef max //even out some MFC-idiocity
#undef min
#include "iostream"
#include "fstream"
#include "limits"
int _tmain(int argc, _TCHAR* argv[])
{
std::string str;
std::ifstream ptr;
ptr.open("C:\\Documents and Settings\\Mac01\\My Documents\\web.reg");
if( ptr.is_open()) {
std::getline( ptr, str);
while( ptr){
std::cout << str << std::endl;
std::getline( ptr, str);
}
}
else {
std::cout << "Unable to open file!" << std::endl;
}
return ::system( "pause");
} The harder part is interpreting the lines you read.
In '[' and ']' you find the name of the Registry to open, and below that you find key/value-pairs of keys to set.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
Your .reg file is most likely in Unicode (UTF-16) format. You have to open the file with the CFile::modeBinary flag.
Also, you may have to create a Unicode project to display the contents of the file properly.
|
|
|
|
|
Michael Schubert wrote: Your .reg file is most likely in Unicode (UTF-16) format.
Such thing is possible?!?
OK, sure. How could it handle non-latin content otherwise?
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
There are several possibilities: UTF-8, ISO or Windows encodings, single or multibyte to represent non-latin characters.
However, Microsoft changed the default registry export format to Unicode from Windows 2000 onwards (which is a good thing).
|
|
|
|
|
U'r code won't work at all. If u see the .reg file closely, its actually an .inf/.ini file format. So u can implement the same concept/logic of .ini/.inf here.
Come online at:-
jubinc@skype
|
|
|
|
|
how do i get the default value of a check box into another form?
for example i have 2 check boxes in a form. if i click on any of the check boxes the value is getting passed. but what do i do to make the application fetch the value without clicking the checkboxes. or without opening that form?
|
|
|
|
|
Do you have tried already a simple GetWindowText?
Greetz
|
|
|
|
|
how can i use a GetWindowText function for this? i am not accessing the form for that. the default value needs to be set once i click on the first menu item of the screen.
|
|
|
|