|
I would recommend you reading this article.
Life is a stage and we are all actors!
|
|
|
|
|
You have lot of controls?
Why don't you use a function?
Example:
void CFacePlate::SetDlgItemVisible(int idCtrl, int iTagType)
{
if (oTagBase->GetTagType() == iTagType)
{
GetDlgItem(idCtrl)->ShowWindow(SW_SHOW);
}
else
{
GetDlgItem(idCtrl)->ShowWindow(SW_HIDE);
}
}
BOOL CFacePlate::OnInitDialog()
{
CDialog::OnInitDialog();
SetDlgItemVisible(IDC_STATECOMBO, INDICATOR);
SetDlgItemVisible(IDC_SPVALUE, CONTROLLER);
}
|
|
|
|
|
Anu_Bala wrote: UpdateData(FALSE);
Remove this. It's rarely needed.
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
HI,
I written one application using MFC Appwizard exe.In that application iam browsing a file in my PC and Parsing into required form and loading in a database table. Till now my application working fine.
But the requirement changed as i need to take the input from Commandline and need to Run the application as batch file.
MY Requirement is i need to take two parameters in commandline
one is File path and Another one is Table Name.
I need your Guidance.
Thanks,
Krishna.
|
|
|
|
|
|
|
The official MFC way is to:
- derive a class from CCommandLineInfo and overide CCommandLineInfo::ParseParam
- call CWinApp::ParseCommandLine in your overide of CWinApp::InitInstance using an instance of your class derived from CCommandLineInfo.
When a new instance of your application starts CWinApp::ParseCommandLine slices the command line into tokens and chucks each on in turn into "YourDerivedClass"::ParseParam. ParseParam can do whatever it likes with the tokens it gets - raise or lower flags, set global state, you name it.
If you want a simple class to explore these concepts try this for size:
class simple_command_line_parser : public CCommandLineInfo
{
public:
void ParseParam( const wchar_t* parameter, BOOL, BOOL )
{
::AfxMessageBox( parameter );
}
};
All it does is display the parameters it recieves in a message box. You'd use it by adding the following two line to your App's InitInstance:
simple_command_line_parser sclp;
ParseCommandLine( sclp );
Anyway, hope that helps!
Ash
|
|
|
|
|
this makes absolutley no sense as to why this is happening...
Here is the scenerio:
I have an INI file that gets uploaded into some product durring the test.
I have to modify the INI file before upload, so I do so using WritePrivateProfileString(x,x,x,x). Return value is good, no errors.
Read the settings I just changed in the INI file via the GetPrivateProfileString(x,x,x,x), values returned match what I changed them to,
ok, stop there.. (via breakpoint or messagebox)
Now, go into windows explorer and open the INI file and none of the data in the INI file has changed per the write command.
Now, exit the program, or stop it if in the enviornment. Now go and read the INI data from the INI file in windows explorer.. The data is now changed.
Or you can simplely write some data to a bogus file and it will force the INI file to get updated...
OK, now the reason this is such a problem is that after I modify the INI file I have to start the upload process, but I can't because the upload procss graps the file from windows, except the file hasn't been updated yet to the values I wrote using the writeprivateprofilestring command.
This makes no sense to me. Why is windows waiting to update the actual file? Is the a command I need to send to force windows to release the cach so that the file gets updated?
Hopefully someone can explaing what is going on here... Any information will help.. I hope I am so confused by this....
|
|
|
|
|
See the description here[^], particularly the paragraph that states:
The system keeps a cached version of the most recent registry file mapping to improve performance. If all parameters are NULL, the function flushes the cache. While the system is editing the cached version of the file, processes that edit the file itself will use the original file until the cache has been cleared.
It's time for a new signature.
|
|
|
|
|
Sounds like a caching issue. Would it help to call RegCloseKey() when done writing?
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Dear friends,
how to create blank wmv file in visual c++ witout using any tools..
I tried different way, didn't get any result. so if anyone know about this
give some ideas of creation of blank wmv file
i am looking forward..
regards
Mohanchandra
|
|
|
|
|
hiii......i m a btech final year student & trying to do the netdefender firewall.there is occur problem during loading the system driver "DrvFltIp".can anybody tell me about this driver wroking & how it call the startService()method...
|
|
|
|
|
Hi,
How could I Send UTF-8 URL By following code in szTranReq:
CHttpFile* pHttpFile = pInetHttpConnection->OpenRequest(
CHttpConnection::HTTP_VERB_GET, szTranReq,
NULL, 1, NULL, L"1.1", INTERNET_FLAG_EXISTING_CONNECT | INTERNET_FLAG_DONT_CACHE | INTERNET_FLAG_RELOAD);
|
|
|
|
|
m_code wrote: ... NULL, 1, NULL, L"1.1", INTERNET_FLAG_EXISTING_CONNECT ...
The L prefix generates a Unicode (UTF-16) string.
It's time for a new signature.
|
|
|
|
|
Of course, I mean how the content of szTranReq Object could be transmitted to the server as UTF-8, because When It is CStringW and contain non-ASCII characters the server do not recognize them.
|
|
|
|
|
You are free to send ASCII characters via this call. However you need to ensure that the characters sent are in a format that is accepted and understood by the server.
It's time for a new signature.
|
|
|
|
|
I know that the server recognize UTF-8 for content of http-Get Object, But I don't know how to send my Unicode Object, containing Russian words to sever because when I send them normally the sever misunderstand them with "???"
|
|
|
|
|
The problem is not in the transmission of data, but rather getting the client and server to speak the same 'language'. If the server does not accept Russian characters then there is nothing the client can do to change that. You need to work with the server support people to find out what format your data needs to be in to be accepted by the server. If it will accept UTF-8 then you need to convert your Unicode characters to multi-byte UTF-8 before sending.
It's time for a new signature.
|
|
|
|
|
Hi,
I have a JPEG file I would like to use as a cursor
is there any way or product I can use to accomplish this ???
thankx
|
|
|
|
|
icoFx[^] probably has what you need.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
Seems like this producut just for creating ICONS
|
|
|
|
|
Sorry about that, i keep "mixing up" ICO and CUR...must be bad genes
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
I do the same u right ....
My boss screams at me all the time personally I think (at least on my part its lack of conecntration yeah genes ADHD )
|
|
|
|
|
Yeah, i had my share of screaming boss too sadly...was no fun...my condolences...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
It not free but .... I re-saved my file as jpg opened it under awicons saved it as .cur ......
|
|
|
|