|
Invoke a Call to the function CSplitterWnd::SetColumnInfo to set the specified column size.
Invoke a Call to the function CSplitterWnd::SetRowInfo to set the specified row size.
Invoke a Call to the function CSplitterWnd::RecalcLayout redisplay the splitter window after adjusting row or column size.
MSDN docs: [CSplitterWnd::SetColumnInfo] and [CSplitterWnd::SetRowInfo] and [CSplitterWnd::RecalcLayout].
Sample code:
void CMyFrame::OnSize(UINT nType, int cx, int cy)
{
if(::IsWindow(m_wndSplitter.m_hWnd) && ::IsWindow(m_wndSplitter2.m_hWnd))
{
m_wndSplitter.SetRowInfo(0, cy*2/3, 10);
m_wndSplitter.SetRowInfo(1, cy/3, 10);
m_wndSplitter2.SetColumnInfo(0, cx/4, 10);
m_wndSplitter2.SetColumnInfo(1, cx*3/4, 10);
RecalcLayout();
}
}
|
|
|
|
|
In VB, I used string.contains to see if a value exist in a string, Is there a c++ equivalent?
I looked at find, replace, but wasn't sure about them, or I don't know what the nomenclature is for it.
I want to make sure that a WCHAR doesn't contain the value before I wcsncat_s it.
modified 28-Nov-11 13:13pm.
|
|
|
|
|
yes, find is what you want.
str.find("target");
or
str.find("target", startPos);
|
|
|
|
|
Is that for string?, I forget to mention I was working with unicode characters (WCHAR)
I'll give it a try right now, Thanks Chris.
|
|
|
|
|
jkirkerx wrote: Is that for string?
for std::string and std::wstring, yes.
|
|
|
|
|
I got lucky, and used wcsncpy_s, as nomenclature, that lead me to a very long list of functions in MSDN, and I found wcsstr. It was buried so deep, and the description was very vague.
So I wrote it, and so far so good, no double entries anymore. That was a hard one, Eric scared me off with having to use pointers, and I could not find anything on the subject.
Thanks Chris and Eric for the Help.
pzMatch = _tcsstr(szNewServerNames, szAddServerName);
int iMatch = (int)(pzMatch -szNewServerNames + 1);
if (pzMatch = NULL) {
_tcsncat_s(szNewServerNames, iSNs, szAddServerName, iASN );
}
|
|
|
|
|
Use the CString class in C++. Yes, you can use in in Win32 if you include the header and lib.
If not, noy need to write raw C style code, searching an array for a pattern drectly. And as a VB coder, you are going to hit poiters big time, be prepared, its gnarly.
==============================
Nothing to say.
|
|
|
|
|
Richard got me using WCHAR's, and Ihaven't made it over the pointer mountain yet. I still have a code module to work on from Richard that works with pointers.
Let me try the find first, it's a registry function and I want to stick with the same format.
Thanks!
|
|
|
|
|
jkirkerx wrote: Ihaven't made it over the pointer mountain yet.
Worth persevering, pointers are very very usefull. When you write C, you really are aware of writing real code, and I dont mean that in an elitist way, just that you are directly manipulating the machine. Well, OK assembler is more direct, but C is as close, without having to tell it how to eat and breathe.
==============================
Nothing to say.
|
|
|
|
|
I must concur that message.
Writing my program is getting depressing. Now I'm doing the SQL stuff, and opened a whole new can of worms to eat for another week.
I'll get to the pointers soon, but this was a quick patch for my registry program until I figure out the pointers and use the code that Richard wrote for me, so I can implement it.
|
|
|
|
|
Hi Experts.
I had created a system driver, which is successfully installed in x86 system. But when i try to install in x64 it gives error, Unsigned Driver Installation Unsupported
Is there any logical work around so that unsigned driver can be installed in x64 system.
I am a individual developer, so i am unable to get code signing certificate.
please guide..
Regards,
Vishal
modified 3-Dec-11 13:01pm.
|
|
|
|
|
You can test sign a driver during development.
You can use some tools that come along with the WDK to do this.
Basically you first create a test certificate using MakeCert.exe .
You then install the certificate using CertMgr.exe .
Then sign the driver binaries using SignTool.exe .
The above method is use to sign the driver binaries.
You can also use Inf2Cat.exe to create a CAT file if your driver has an INF based package.
Another important step is that you must first put the system into Test Mode to install test signed drivers.
This applies to both steps mentioned above.
You can do this by executing the command bcdedit -set testsigning on from an elevated command prompt.
More information here - Signing Drivers during Development and Test (Windows Vista and Later)[^]
|
|
|
|
|
Thanx, can this method be used in the production environment..
Regards,
Vishal
|
|
|
|
|
Definitely not.
Because the test certificate is not strong enough and customers will not appreciate going into test mode.
|
|
|
|
|
sorry for late reply. Thanx for your valuable suggestion.
Regards,
Vishal
|
|
|
|
|
sorry for late reply. Thanx for your valuable suggestion. I am considering Code Signing Certificate for Individual developer, I had talked to few providers, but they replied that only a business entity can get this certificate.
Regards,
Vishal
|
|
|
|
|
|
Hi Experts,
Is there any way I can get all logical drives information with follwing attribtes:
1. Active Partition
2. Start Sector number
3. End Sector Number
|
|
|
|
|
Start here[^] for information on the logical volumes in your system.
.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Additionally, try looking around here[^], probably especially around here[^].
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
But I am intrested to get Stating sector of logical drives. How to get that?
|
|
|
|
|
I never used these so i don't know much either, i just thought it might give you some pointers in the right direction. Anyways, could this[^] be what you are looking for?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
Class is there to get sector number but its very confusing to get that.
Can you help to get the start sector of logical drive?
|
|
|
|
|
As said, i never used these so this is "new land" to me too, but the example on the site seems to be usefull, try to check that out, particularry, try to change this line:
hres = pclsObj2->Get( _bstr_t(L"DeviceID"), 0, &vtProp2, 0, 0 );
into something like this:
hres = pclsObj2->Get( _bstr_t(L"StartingAddress"), 0, &vtProp2, 0, 0 );
and this:
printf("%ls : %ls\n", vtProp.bstrVal, vtProp2.bstrVal);
to this:
printf("%ls : %i64\n", vtProp.bstrVal, vtProp2.ullVal);
or somesuch. Good luck.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
Thanks for your help but could not get the address...I will try google to find something like you suggested.
Again Thanks.
|
|
|
|