|
yes i m getting japanese text in CString.
|
|
|
|
|
Please check whether _UNICODE preprocessor is added in your project setting.
Величие не Бога может быть недооценена.
|
|
|
|
|
CString name;
WCHAR disname[100]={0};
name= m_IniReader.getKeyValue(str,"VIEWNAME");;
wcscpy(disname, A2W((LPCWSTR)name));
Use this code. And make sure that your project build support UNICODE.
Raj Jaiswal
|
|
|
|
|
Hi,
My application is a MDI application and looks like,above the frame(mainframe caption bar)one modeless dialog always displaying.
My problem is in order to move the applicaton to secondary monitor,we normally do- Restore down the window,and clicking on the blue caption bar we drag the window and move to secondary monitor.
But my application always having dialog on top,i cannot click on the caption bar,so i cannot move to secondary monitor.
So pls anybody of you kindly explain how can i move that.
Anu
|
|
|
|
|
You could define a "hot place" on your dialog
to process the following reactions there on :
- WM_LBUTTONDOWN to set a "hot place flag" and the mouse capture
- WM_MOUSEMOVE to move the dialog and the main frame, if the "hot place flag" was set
- WM_LBUTTONUP to reset the "hot place flag" and release the mouse capture
virtual void BeHappy() = 0;
|
|
|
|
|
I use C++ to create two XLL's A.xll and B.xll. A function in A.xll requires B.xll. If I compile A.xll with a project dependency on B.xll, then Excel does not register the functions in A.xll. If I compile A.xll without the project dependency and only include B.lib, then all functions are registered.
What is the reason? Is it a bug in Visual Studio compiler or some other issue?
|
|
|
|
|
Hi,
The following is TCP/IP packets collected by Wireshark:
34 16:09:29.056911 10.10.10.7 10.10.10.100 TCP 49167 > amiganetfs [PSH, ACK] Seq=55 Ack=1567 Win=64240 Len=6
35 16:09:29.193003 10.10.10.100 10.10.10.7 TCP amiganetfs > 49167 [PSH, ACK] Seq=1567 Ack=61 Win=5632 Len=1
36 16:09:29.386529 10.10.10.7 10.10.10.100 TCP [TCP Retransmission] 49167 > amiganetfs [PSH, ACK] Seq=55 Ack=1567 Win=64240 Len=6
What is happening here is 49167 sends 6 bytes to amiganetfs which acknowledges them and sends one byte back, then 49167 resends the packet 34 as if it didn't receive the ack (but it was received and picked up by Wireshark). It seems that ack was ignored by 49167. Any idea why it's happening so?
|
|
|
|
|
What does this have to do with C++ ?
|
|
|
|
|
It may be possible that the ACK did not reach the other side. Capture on both the sides and see.
BTW, Nobody will be able to help you further on this if you don't post
the exact code which transmits the packet and receives the packet.
"I'm willing to admit that I may not always be right, but I am never wrong." - Samuel Goldwyn
|
|
|
|
|
I am new to c++. I need to use a vector to store array with flexible length. That is in a loop, for each index i, the length of the array x[i] is change.
Please give me the declaration and code fragments.
Thanks
|
|
|
|
|
A simple google[^] search is the best help sometimes, the first hit seems to be promising already.
> 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. <
|
|
|
|
|
Sounds like, in the most general case, you're after a std::vector of std::vector s:
typedef std::vector<int> InnerType;
typedef std::vector<InnerType> OuterType;
OuterType my_array;
Or you can construct the type directly without the typedef s (I'd use the typedef s personally):
std::vector<std::vector<int> > my_array;
Steve
|
|
|
|
|
try it this way
vector<int> countVal;
vector<int> ArrInts;
#This can be a loop to assign values of flexible length .I have kept it simple
countVal.push_back (12);
countVal.push_back (13);
countVal.push_back (14);
ArrInts.assign(countVal.begin(),countVal.end());
|
|
|
|
|
Thank you!
I am trying to do the following within a function if it is works:
//
for ( int i=0;i<nh;i++)
{
="" int="" n="d[i]/10;
" vector="" <float=""> z[n];
//
for ( int j=0;j<n;j++)
{
="" xc="10*j*" x[i]="" d[i];
="" yc="10*j*" y[i]="" z[j]="SEVAL3D(n_points," xc,yc,x_topo,="" y_topo,="" z_topo);
="" if(zmax<z[j])="" {zmax="z[j];
" imax="j;}
" }
please="" advise="" if="" i="" can="" use="" a="" vector="" in="" this="" way?
thanks
<div="" class="signature">modified on Thursday, March 25, 2010 1:37 PM
|
|
|
|
|
Check your posts after you've made them - some of it has gone missing:
mrby123 wrote: for ( int i=0;i
mrby123 wrote: for ( int j=0;j
Clearly these two lines are incomplete.
There are many problems with your code. For example, the following is illegal since n is computed at runtime (and your post doesn't show the template arguments):
mrby123 wrote: vector z[n];
Also what is d ? You don't use z ?
If you want help explain what you're trying to do in detail and take some care to make it readable.
Steve
|
|
|
|
|
I was happily coding away when I noticed that the compiler keeps recompiling way too many files.
So, I changed a single line in my code – using unassigned variable and guess what – it recompiled and given me no error - until I used “Rebuild all”.
This in no big deal, I can use “Rebuild all” all the time, but it is annoying.
I know sometime this happens when you change system time / date. But I did not touch anything in that area.
When I have a break in coding I am going to reload VC6.0 from scratch.
Is there any other, preferably easier way to convince the compiler to behave??
Please, no comments likes “old technology”, “upgrade” to VS 2xxx, .NET etc. are necessary!
Only constructive comments are welcome and as always appreciated.
Thanks for your time.
Vaclav
|
|
|
|
|
Try disabling precompiled headers (if you didn't try that yet).
> 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. <
|
|
|
|
|
The first thing to try is a complete clean and rebuild to freshen up all the timestamps and such. After this, if the problem persists, you can investigte further.
Steve
|
|
|
|
|
Thanks guys, here is an update.
My 5th grandchild was born 5 o'clock this morning and I spent quality time with crying 2 year old - 3 o'clock in the morning.
As far as this goes – I did try to modify precompiled header compilation and it was a disaster.
What normally takes less than a minute to compile ( one main plus five DLL's )took more time than I care to count. So I reset the Precompile Headers option and went back to “normal”.
I forgot to clarify that I have been doing Clear / Rebuild all for a while.
But I have have been ignoring one anomaly which needs to be corrected . I am not sure if its causing this problem , but it will take some time to clean up. . I am getting about 30 + C6311 “notes”, basically because my DLL's are using same #define constants (IDD_PROPPAGEX).
I'll let you know if this “problem” persists after that.
FYI – the compiler output looks like this and only the main program is recompiled, not the DLL's.
--------------------Configuration: OpenHR - Win32 Debug--------------------
Compiling...
Skipping... (no relevant changes detected)
StdAfx.cpp
Compiling...
Skipping... (no relevant changes detected)
ChildFrm.cpp
and rest of the main app files follows.
Thanks for your help.
I need a good nite sleep.
Vaclav
|
|
|
|
|
Hi all,
Is it possible to boot from virtual disk image file(with an entry added with windows boot menu) that resides inside windows partition (NTFS) and add a bootloader entry for booting from the virtual disk without modifying the partition table.
Please help.
|
|
|
|
|
Hello,
I am calling SymEnumSymbols(GetCurrentProcess(),0,0,Callback,NULL) function of DbgHelp API, for every call its getting failed and as a result callback function for this not called ever. GetLastError() returns 0 that's ERROR_SUCCESS.
I have pdb of which I need to lookup symbols. Any idea...?
Regards
Usman
|
|
|
|
|
Do you use SymInitialize to initialize?
Greetings
Covean
|
|
|
|
|
yes exactly
it's initialized with GetCurrentProcess i.e ::SymInitialize(GetCurrentProcess(),NULL,FALSE);
and before this SymSetOptions also called with following options.
DWORD symOptions = SymGetOptions();
DWORD oldOptions = symOptions;
symOptions|=SYMOPT_PUBLICS_ONLY;
SymSetOptions(symOptions);
|
|
|
|
|
I think you have to set the last parameter to true to load the symbols directly SymInitialize(GetCurrentProcess(),NULL,TRUE); or use SymLoadModule64 to get an base module address that you can use with your SymEnumSymbols call.
Here I found some cpp on the net maybe that helps.
Greetings
Covean
|
|
|
|
|