|
i am sooryy i misunderstand him
i applogize for him & i am reealy sorry
|
|
|
|
|
kosamoza wrote:
i applogize for him & i am reealy sorry
It's OK
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
in china u will not be a good student just because u can't learn from other.
&
maybe u could be a good programer but i don't think u can do some useful things with your partner before u think they were going to insult u.
&
my english is poor & i don't want to insult u. but if u think that way maybe it's just cultual gap )
|
|
|
|
|
Hi,
I am using an owner drawn button on the same window as an edit box. I set the size and position of the button in the WM_INITDIALOG code using...
SetWindowPos(GetDlgItem(hwndow, Button), NULL, ButtonList[3], ButtonList[4], ButtonList[1], ButtonList[2], SWP_NOACTIVATE);
ButtonList being an array containing size and position of the button. I then set the focus to the edit box using...
SetFocus(GetDlgItem(hwndow, IDC_TEXT));
However, the focus is never set to the edit box. Remove the SetWindowPos line and it works perfectly. Put it back and no focus. If the user presses the enter key the code for that also sets the focus to the edit box and that works correctly whether the SetWindowPos is there or not.
I can find no reference to SetWindowPos causing a problem with the text focus so has anyone any idea what is wrong? I would hate to have to use a default button.
Richard
|
|
|
|
|
Did you try SWP_NOACTIVATE|SWP_NOZORDER as the last param for setwindowpos?
John
|
|
|
|
|
ALSO, I think there is a specific difference in return value from the WM_INITDIALOG required if you call SetFocus from within the WM_INITDIALOG handler. You might be setting it to a specific control, but return the wrong value, and Windows will set focus to a 'different' control in the dialog (the first one in the 'tab order' that can accept focus, I beleive).
|
|
|
|
|
Thanks for your answers guys,
Adding the SWP_NOZORDER flag solved the problem. You were right about Windows automatically setting the focus to the first window that can accept focus in the tab order so I removed the SetFocus line.
Your help was much appreciated!
Richard
|
|
|
|
|
Hi all,
How do you switch between Release and Debug builds and vice versa?
Many thanks Alton
|
|
|
|
|
with the combo box on the standard toolbar...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Or you can click in the menu on Project->[name] Settings and you have there a combobox Configuration.
|
|
|
|
|
Or you can set up a batch build and build all different builds at once.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Or Alt+B, O
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
|
Can I integrate the gcc into a program made with Visual C? I want to use it to create a preprocessed file of a c program and then to extract the informations.
Another option is to use ShellExecute for gcc but I don't know the sintax for creating a preprocessed file from a C program. Does anyone know the exact sintax? I know it has something to do with -E but that's it and I can't find an example on the net. Or some files already preprocessed.
|
|
|
|
|
See here.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I want to have an unsigned short hold a millsecond counter, I update the counter evey 300 milliseconds via a timer.
I would like the counter to be quite accurate, so dont want to assume that I can just say:-
counter = counter + 300;<br />
counter = (unsigned short)timeMillsec & (0x0000FFFF);
I did try
timeMillsec = clock()/CLOCKS_PER_SEC * 1000;
But increments every second, any sugestions?
|
|
|
|
|
I don't understand really what you want to do but if you want to retrieve the 'time elapsed' in milisecond, you can use the GetTickCount function. Take a look in the MSDN.
|
|
|
|
|
This could be one of those "order of operation" issues. As far as I remember, in arithmetic calculations C uses the highest-resolution type which is present in the calculation, but if all are integer, it will not force a REAL conversion.
If clock() returns an integer (I don't have the development environment or help on my desk PC), then clock() / CLOCKS_PER_SEC will return an integer value, being seconds, so multiplying by 1000 will give 1-sec increments.
try
timeMillsec = (clock() * 1000)/CLOCKS_PER_SEC;
or
timeMillsec = clock() / (CLOCKS_PER_SEC/1000);
You may have to watch out for maximum size of integers, etc.
|
|
|
|
|
Hi everyone
I am a beginer at VC++,recently I write a project about SQL Server 2000 using VC++,but I don't know how to execute a SQL statement especially in multiqueries such as "Select Min(Length) From table1 Where Name =(Select Name From Table2 Where Name = '\"+m_Name+"\')"
I don't know why '\"+m_Name+"\' write like ?
Can anyone kind and patient enough to tell me ?
thanks a lot
sffsdfsdfdfdf
|
|
|
|
|
zpzhou2008 wrote:
I don't know why '\"+m_Name+"\' write like ?
m_Name is a variable, probably a CString or std::string . It is surrounded by single quote marks because the variable might contain spaces that are necessary for the query.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Thanks DavidCrow! Here is a SQL statement that used in VC by ADO
CString strSQL ="SELECT Date,Min(ReduceTime) FROM NormalReduceTime WHERE Name in
(SELECT DISTINCT includetime FROM SetTimeSegement
WHERE NAME='套播一')group by date order by date "
Why I execute in Query Aaanysize successfully,
but after I used it in VC and execute it ,it had no response,otherwise to say:
it didn't worked successfully as I imaged and had no data queried out!
What had happened to me ?
thanks
Reply me will give you a smart patient
|
|
|
|
|
zpzhou2008 wrote:
...but after I used it in VC and execute it ,it had no response...
Without seeing the exact code you are using (not just the strSQL variable), it's impossible to offer any suggestions.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
k, say i have a structure like
struct MYSTRUCT
{
char somestring[64];
int number;
int number2;
};
now i would like to be able to write an array of this structure to a file
and then it read it again, preferable with a non fixed length, would it be possible to do this?
|
|
|
|
|
you can use CFile or FILE structures to print to file.
Dynamic arrays are CArrays I think. (It's been a while )
More info on MSDN.
If you don't have MFC then you can write your own CArray class which isn't that difficult.
good luck.
No hurries, no worries.
|
|
|
|
|
Hello,
Archer282 wrote:
would it be possible to do this?
Yes!
Does:
std::ostream ostr;
for( int i = 0; i < nYourArraySize; i++ )
ostr << YourArray[i].somestring << YourArray[i].number << YourArray[i].number2;
help?
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|