|
I want to splitan existing dialog to which i have added some controls into two parts based on my requirements.How can i do this?
Thanks.
|
|
|
|
|
In MFC use CSplitter class. You will have to set the controls parents to be that of the splitter pane and also take into account that controls may move when resizing the panes.
|
|
|
|
|
|
mine is a dialog based application.I have designed a dialog by inserting different controls.Now i want to insert a splitter bar to my dialog placing some controls on one side of splitter bar and and the rest in the other.Totally i want to cut the window into two halves.
Thanks
|
|
|
|
|
radhika28 wrote: I want to split...
Are you wanting a splitter window, or a property sheet with two pages?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I want a splitter window similar to sdi application.Mine is a dialog based application.
|
|
|
|
|
That sounds like a very odd UI. Do you have an example?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
How can I bring a child window on top of model-less dialog box in a MDI application.Plz let me know the solution/alternatives to overcome this.
|
|
|
|
|
I want to log on to another computer using netbios. Are there any APIs.
For instance I want to log on to 34.12.56.12 with
user: admin
pass: admin
and copy a file from my machine to c$\temp
Thank you!
modified 8-Mar-17 3:52am.
|
|
|
|
|
Daniel Kanev wrote: I want to log on to another computer using netbios.
Are you referring to Netbios() ?
Do you have to log into the machine prior to copying the file? If not, check out CopyFile() and SHFileOperation() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Yes, I refer to NetBios(). How can I use this function to log on and perform file operations?
modified 8-Mar-17 3:52am.
|
|
|
|
|
Unless there's something you can do in the NCB structure, I don't know of a way.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,
and maybe this way:
WNetAddConnection2( LPNETRESOURCE lpNetResource, LPCTSTR lpPassword, LPCTSTR lpUsername, DWORD dwFlags );
BOOL CopyFile( LPCTSTR lpExistingFileName, LPCTSTR lpNewFileName, BOOL bFailIfExists );
or
int SHFileOperation( LPSHFILEOPSTRUCT lpFileOp );
DWORD WNetCancelConnection2( LPCTSTR lpName, DWORD dwFlags, BOOL fForce );
-----------
Mila
|
|
|
|
|
I want to change toolbar bmp's default transparent color (192,192,192) to other color in MFC.
Anyone who can tell me, Thanks a lot.
|
|
|
|
|
my code:
<br />
BYTE * pBuf = (BYTE *)new char [1024];<br />
<br />
CMemFile* p_mF = new CMemFile( pBuf, 1024, 1024);<br />
<br />
cout << p_mF->GetFilePath() << endl;
<br />
p_mF->SetFilePath("D:\\1.txt");
<br />
<br />
CFile myfile("D:\\1.txt",CFile::modeRead);
<br />
|
|
|
|
|
Try:
CFile myfile("D:\\1.txt", CFile::modeRead);
DWORD dwLength = myfile.GetLength();
LPBYTE pBuf = new BYTE[dwLength];
myfile.Read(pBuf, dwLength);
myfile.Close();
CMemFile mF;
mF.Attach(pBuf, dwLength);
...
mF.Close();
delete [] pBuf;
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
when project running at
CFile myfile("D:\\1.txt", CFile::modeRead);
is error, because D:\1.txt not exist.
|
|
|
|
|
Ok, and? It's common knowledge that a file that does not exist cannot be read from. This is not a code problem.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
How to create transparent gif file?
|
|
|
|
|
you mean, programmatically ?
use the CxImage[^] library
|
|
|
|
|
Hi everyone,
In programs like powerpoint or AcdSee we can see many Transitions but how can I make these states is it possible with VC++.
Thanks
|
|
|
|
|
By Transitions I presume you mean a slide show like effect? This[^] may help you.
|
|
|
|
|
I am writing the interface in C++ and someone else will write the implementation.
Some interfaces have to have only one son that should be singleton, that is the object of the only son of my interface should be only one in the whole system.
I am using templates to obligate some son class of my interface class to be singleton, but how can I obligate that it will be only one son class of my interface class? (That the implementer will not be able to inherit from my interface class more than once)
Is it possible?
Thanks in advance.
|
|
|
|
|
Make the constructor in your interface private, declare the implementation class as a friend to your interface, and use "public virtual" inheritance of your interface from the implementation class - that'll prevent any other class inheriting, as it won't be able to see the constructor.
See here:
http://www.research.att.com/~bs/bs_faq2.html#no-derivation[^]
The only problem is that the person doing the implementation would be free to change
class Usable : public virtual Usable_lock {
to
class Usable : public Usable_lock {
which would allow somebody to derive from Usable
If you've got control of setting up the instantiation of Usable, then all should be fine, but in the end of the day, there'll always be loopholes if the person doing the development is determined to do things they shouldn't (That's what code reviews are for!)
|
|
|
|
|
Hello Mr. benjymous,
Thanks for the answer!
But in my case the interface class is placed in the H file and the implementation class is placed in the DLL, the DLL #include H with the interfaces, but H with the interface does not know "who" is the implementation class.
The interface is really independant and does not aware about classes that are implementing it.
So the solution you proposed is not really good for my case.
Is it possible in my case?
Thanks a lot in advance.
|
|
|
|