|
I have an edit control. The details are:
IDC_EDIT (the id)
m_edit (member variable, CString).
I know i can set a text to the control by simply writing
<br />
m_edit = "sometext";<br />
But I want the text to be selected, ready to be deleted with a backspace. How do i do that?
Aljechin Alexander
|
|
|
|
|
CEdit* edit = (CEdit*)GetDlgItem(IDC_EDIT);<br />
edit->SetFocus();<br />
edit->SetSel(0,-1);
this is this.
|
|
|
|
|
Thank you for the help.
It works that way.
Aljechin Alexander
When did time start? When i purchased my new watch? or when humane were created or when earth was created or when the bigbang occured? or before that? When exactly?
|
|
|
|
|
My program writes avi files (using a video capturing card) using the windows API (AVIFileCreateStream etc.)
When the file is quite large (3 GB) the avi file becomes corrupt. The VirtualDub-program analyses the file with the message : missing index block.
Can someone help me regarding this problem?
Best regards,
Peter de Hon
PdH
|
|
|
|
|
Probably the API donot
support file buffering
more then 3GB. OR we
need to check for how
the file is stored by
API.
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
I would guess that it is tool large for the VirtualDub or some other associated program. Does it die when it hits approx 2.7G? If so they are probably using a signed 32 bit buffer somewhere.
|
|
|
|
|
Using Win32/VC++, I want to scan the users My Pictures folder (and potentially any other user/system folder using:
g_hFind= FindFirstFile( "*.jpg", &g_FindFileData);
and
FindNextFile(g_hFind, &g_FindFileData) )
How do I set the "working" folder so that I don't need to include the path name as part of the file path?
<br />
hr = SHGetSpecialFolderLocation(0, <br />
CSIDL_COMMON_PICTURES, <br />
&pidlDocFiles);<br />
<br />
Thanks in advance,
If you're interested, read more of what I have to say
my DirectX9 site.
- Segment Fault
|
|
|
|
|
I guess you could use:
SetCurrentDirectory(strPath);
But you still need to get the path first using SHGetSpecialFolderLocation() etc.
this is this.
|
|
|
|
|
Think of a situation that the user changes that folder location (yes he can) while ur application is running.
Your application will stop behaving properly if you have cached the path or set it as a default path.
IMO, i wont do that.
-Prakash
-- modified at 3:45 Wednesday 4th January, 2006
|
|
|
|
|
I think it is okay to ignore this case for all practical purposes. You will have the problem either way you do it: either change the current directory and relative file names, or get the location of My Pictures folder and use absolute name. When you are working on a directory and the directory has changes, the behaviour is unknown anyways.
thanks!
|
|
|
|
|
Hi guys
I've seen some articles talking about CFileDialog with preview and the CFileDialog resource is bigger than the usual CFileDialog. I read about "template dialog" but I don't know how this stuff is implemented.
What is the procedure to do a custom "CFiledialog" resource?
Thanks and Happy New Year
Doc
|
|
|
|
|
Good that you are thinking about it.
Take a look at OPENFILENAME;
There is a special field in the structure called lpTemplateName;
Here you need to pass in the name of the dialog.
This will embed the open dialog inside your dialog. If you want to have a placeholder then put a static control on the dialog with the id stc32.
Set this on: OFN_ENABLETEMPLATE
If you want to have more then search in MSDN documentation for this keyword.
stc32.
When you search you will find a topic called "Open and Save As Dialog Boxes". Here you will find all the details.
Cool
You also need to start thinking about hooks. If you wanna provide your own preview controls.
Tip: lpfnHook member of OPENFILENAME
Set this On: OFN_ENABLEHOOK
Love Forgives--Love Gives--Jesus is Love <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Thanks pal, just what I need.
Doc
|
|
|
|
|
doctorpi wrote: just what I need.
Just what the doctor ordered.;P
Love Forgives--Love Gives--Jesus is Love <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
I have a static control(derived from CStatic) and rich edit controls and it contains two lines. I want to set the color of the first line to blue and the second line to red. Currently I am using the CDialog::OnCtlColor and using the SetTextColor function to set the color. However it sets the color for the whole static control i.e. both the lines. Can someone help?
knarasimharao
|
|
|
|
|
Hi All,
Is it possible to get the mdi child frame window floating outside the mdi parent area.
I believe i have seen this before at codeproject, but can't recall it.
Thanks
mickey
|
|
|
|
|
I have read article "Making ATL OLE DB Provider templates support updating of data" at www.codeproject.com. Through reading your article, you must be a professional in "OLE DB Provider" field, I think so. Now, would you like to give me some help about this issue? You will be pretty appreciated.
1. In the file "IRowsetChangImpl.h" of your "Simple Data Object with update support", there is a row of code "HRESULT hr = pT->GetDataHelper(hAccessor, pColInfo, (void**)&pBinding, pDstData, cCols, spConvert, pRow);"(lies in method "SetDataHelper"). But there is not definition and implementation of "GetDataHelper". How to resolve it?
2. Now, I'm building up a updatable OLE DB Provider. This provider will be run in MS SQLServer DTS. First "Transform Data Task" of MS SQLServer DTS get the rowset from SQLServer, then call this provider, and pass rowset data to my provider by calling IRowsetChange::SetData(HROW hRow, HACCESSOR hAccessor, void* pSrcData). My questions are as following:
1) "Transform Data Task" pass the new data(a row of data include 10 columns) to my provider through method "SetData(HROW hRow, HACCESSOR hAccessor, void* pSrcData)". Is it correct?
2) I have get the DBBINDING info by the next code:
STDMETHOD (SetData)(HROW hRow, HACCESSOR hAccessor, void* pSrcData)
{
DBACCESSORFLAGS *pdwAccessorFlags;
DBCOUNTITEM *pcBindings;
DBBINDING **prgBindings;
DBBINDING *pBindings;
pdwAccessorFlags = (DBACCESSORFLAGS *)::calloc(1, sizeof(DBACCESSORFLAGS));
pcBindings = (DBCOUNTITEM *)::calloc(1, sizeof(DBCOUNTITEM));
pBindings = (DBBINDING *)::calloc(1, sizeof(DBBINDING));
prgBindings = &pBindings;
HRESULT hr = this->GetBindings(hAccessor, pdwAccessorFlags, pcBindings, prgBindings);
return S_OK;
}
Now, how can I extract data from pSrcData? I'm puzzled.
Expect for your reply!
Thanks in advance!
|
|
|
|
|
Hello,
has anyone tried to use VC 6.0 with VC 8.0 compiler/linker/debuger?
Thanks,
Tomas Rapkauskas
|
|
|
|
|
Tomas Rapkauskas wrote: has anyone tried to use VC 6.0 with VC 8.0 compiler/linker/debuger?
Why you want to do that?
And i think it is not possible. There is a diffrent Project File and a diffrent language (MC++, CLI)
|
|
|
|
|
VC 8.0 IDE quite slow, uses more RAM and does not provide any features
which I need in current situation.
If it would be possible to use 8.0 compiler/debuger/linker with VC 6.0 IDE
I would avoid to buy new VC 8.0 IDE.
Also I don't think that it's dependencies between project workspace
and compiler.
I have tried "code blocks" with MSVC++ compiler it works, so I think it's possible to force VC 6.0 IDE to use VC 8.0 compiler.
|
|
|
|
|
Is it possible to use a different compiler than the compiler provided with VC IDE, but I forgot how to do this. Anyway you can found something on the web.
|
|
|
|
|
read the intructions of :|Visual C++ Toolkit 2003
My blogs:
http://blog.joycode.com/jiangsheng
http://blog.csdn.net/jiangsheng
http://bloglines.com/public/jiangsheng
Command what is yours
Conquer what is not
---Kane
|
|
|
|
|
The GetPrivateProfileSection Function returns values from a file with more than one null character, but with two null characters at the end. I am not able to use it because after the first null character, nothing is getting retrieved into some string object where i copy. How to use this function and get the WHOLE thing?
Thanks in advance
Aljechin Alexander
If space and time are related in some way, at what time and which dimension of the space did this relation occur? If the universe was created at some point of time, then does the time starts right from that point? Before that there was no time?
|
|
|
|
|
You need to use UNICODE supported apis to access the data.
If you dumpthe section of the code here , we might point out the exact problem that you are doing.
-Prakash
-- modified at 1:32 Wednesday 4th January, 2006
|
|
|
|
|
Sure, Here's the code.
//The .ini file
[SETTINGS]
Count = 10
ColorsEnabled = Red, Cyan
StackStyle = FALSE
Membership = Advanced
//In the C++ file
CString szValue;<br />
char chpValue[32767];<br />
<br />
GetPrivateProfileSection("SETTINGS",chpValue,sizeof(chpValue),"MySettings.ini");<br />
szValue = chpValue;<br />
The result is I get szValue to be "Count = 10" and nothing more! I need all the lines in the ini file in the "SETTINGS" section.
Thanks in advance
|
|
|
|