|
|
in a Document-View application, a modeless dialog is created and shown, the
dialog is very big, so when the user click the frame window or the view, he
wants the dialog not to stay on top. i tried SetWindowPos, but it seems not
work.
|
|
|
|
|
I don't believe there's a way around this. It's the nature of modeless dialogs (they're always on top of the parent window). You might want to consider making the dialog smaller or at least resizable.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
making Desktop parent of child dialog might help
No Worries!
|
|
|
|
|
Why not to use CFormView instead of dialog?
So, you can have your windows managed like cascadely, tile horizontally and tile vertically.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
I am new to character set conversion.
Could you write some simple code in C++ to print some Unicode character such as '\u0041' and '\u4EBA', where '\u0041' is 'A' and '\u4EBA' is a Chinese character.
And what if i want to print some character that is from a system support UTF-8?
Regards
World on the way
|
|
|
|
|
Consider using CString (if you can use MFC). It supports UTF-16.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I have some doubts in virtual base pointers.
Say, If I inherit class B from class A virtually, like this:
class B : virtual A{
};
I presume, instance of B will contain a vbptr. My question is, where this vbptr will point to, or in other words, what is assigned to vbptr ?
Will it be pointing to the base class object A / to a virtual table ??
So Can anyone pls. tell me how vbptrs are implemented under the scenes.
|
|
|
|
|
The compiler figures out the layout of classes/structures in memory. Normally, there is a fixed offset from a pointer to a class object to a pointer to one of its members, sub-objects or base objects, and the compiler can figure out this offset only from the class definition. However, if class B has a virtual base A, the offset from a pointer to B to A is only known when the complete object C that may have multiple base classes that virtually inherit from A is defined. Since a lot of code will be using B without having any idea what C it may be a base object of, classes with virtual bases require a level of indirection. A hidden member is added to B (which you are calling vbptr) that points to the base object A. Code that references A through a B object is transparently changed to use this hidden member to find A at runtime, instead of relying on a fixed offset defined at compile time. When the compiler generates code to create an object of type C, it knows the layout of the complete object and will set the hidden member in B (and any other class with virtual base) appropriately (note that the object code to do this can not be incorporated in the constructor for C, since the constructor may be called when C is a sub-object rather than a complete object; instead the code is generated when the complete object is instantiated on the stack, globally or with new).
Virtual method calls with virtual base classes get really complicated. The compiler has to generate a vtbl for A for each complete virtually derived class C looking at the whole network of base classes in C.
|
|
|
|
|
Anybody having some experience of working with Garmin or some other GPS plz tell me if write a program to configure my serial port ( baud rate, parity bits etc) and read ,write to serail port, can i simply read the string containing latitude, longitude etc information??? or i must have to implement Garmin's protocol or NMEA 2???
plz help!!
Thanks
Muhammad Shoaib Khan
http://geocities.com/lansolution
|
|
|
|
|
Try Garmin's web site, you will find all the info you need there. From memory I think you can configure the GPS to do either.
or try:- http://gpsinformation.net/[^]
"Committee--a group of men who individually can do nothing but as a group decide that nothing can be done." - Fred Allen
|
|
|
|
|
I need regex's head file and lib file.But I can not find it.
Could you pls give me the address to download?
Thanks!
|
|
|
|
|
Who I have writen the code on voice chat between a client and a server not p2p.I have a question to ask:I combine the server and client( both are in P2P)to a new server ,why the new server can't work
|
|
|
|
|
yingkou wrote:
Who I have writen the code on voice chat between a client and a server not p2p.I have a question to ask:I combine the server and client( both are in P2P)to a new server ,why the new server can't work
what kinda problem u r getting , is there some problem in Network communication or regarding Voice capture or playing.
No Worries!
|
|
|
|
|
my problem is the memory initialize.I want to know how to initialize the LPWAVEHDR with the data sent by another machine.
|
|
|
|
|
Is it possible to restrict the screen area that a child process can occupy? For example, say I want a child process window to only occupy the area between 0,100 to 800,600 the window can not go outside of these bounds if the user tries to maximise or resize or move the window.
|
|
|
|
|
Just override OnMove() and OnSize() .
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Ravi Bhavnani wrote:
Just override OnMove() and OnSize().
that would require having access to the source code of the app I want to launch, which i don't.
thanks anyway
|
|
|
|
|
Who I have write the code on voice chat between a client and a server not p2p.I have some question to ask
|
|
|
|
|
hi everyone. i have some simple questions for the cp windows pros out there
im developing an MFC app, and basically the area where my questions
for advice apply, is my startup functionality.
i need to
a) put the app into startup, and remove the app from startup on the fly.
im hoping someone can point me to a nice, easy object or api to provide this functionality to me. would really appreciate some direction here...
b) I have a dialog app. got my Capp class and all the good stuff that comes w/ it. I basically need to know in my code before the window is drawn, that my app was started from system startup, as opposed to being ran by the user so i can do some extra stuff in this case. On startup i'd like to pass some special parameters to the app so it can act a little different for me on a system startup run. any suggestions here would be great.
thanks in advance !
todo....
:: insert inspirational text here ::
|
|
|
|
|
Add your application path under following resitry key
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
first check it sing Regedit.exe utility ( comes with windows) U can add path using Registry related APIs like RegOpenKeyEx and RegsetValueEx
this will add ur app to startup
hmmm.. for second thing wat u can do is that write the system time to registry when ur app starts.. but first check that since when is ur system up and if the value there in registry is older than that it means it is being started at system startup otherwsie by some user.
Cheers
Muhammad Shoaib Khan
http://geocities.com/lansolution
|
|
|
|
|
b) When you update the aforementioned registry key with your application, add a command-line parameter. When the user starts your application from Start/Run, or from within Windows Explorer, no such command-line parameter will be provided.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
cool!
i was thinking command line params too, i didnt know though the registry provided me w/ the startup functionality, and so i didnt know how id be able to pass em
i was wishing desperatly last night for a windows version of rc.d/rc.local lol
thanks alot for the help guys, you put me on track now , and i should be able to finish up my app 2 night.
todo....
:: insert inspirational text here ::
|
|
|
|
|
Hi,all
i wanna to get the local printer status, and i also read msdn Q160129 , but the informaiton got is not enough and real-time which is the status of system printer,not physical printer, can anybody tell me how to get the physical printer status by parallel port programming?
Thx
Rapo Lee
|
|
|
|
|
I have some code here that is supposed to swap bytes in a word. For some reason it has a bug in it in the ByteSwap2 function or the ByteSwap_c function. It's getting very frustrating and time is running out. Can anyone help me..?
The main is on the bottom of the code.
Thanks.
B
void ByteSwap2_c(int n, short *a)
{
int i;
for (i=0; i<n; ++i) {
short int tmp=a[i];
short int pmt;
((char*)(&pmt))[1]=((char*)(&tmp))[0];
((char*)(&pmt))[0]=((char*)(&tmp))[1];
a[i]=pmt;
}
}
#include "stdio.h"
void ByteSwap2_c(int n, short int *a);
void ByteSwap2_asm(int n, short int *a);
void ByteSwap2(int n, short int *a)
{
int i;
short *b = (char *) malloc ( n * sizeof(short int));
for (i=0; i<n; ++i)
b[i]=a[i];
ByteSwap2_c(n,b);
for (i=0; i<n; ++i) {
if (a[i] != b[i]) {
printf("a[%d] (0x%04X) != b[%d] (0x%04X)\n",i,a[i],i,b[i]);
exit(1);
}
}
free(b);
}
void test2(int n, short int *a, short int *b)
{
int i;
ByteSwap2(n,a);
for (i=0; i<n; ++i) {
if (a[i] != b[i]) {
printf("a[%d] (0x%04X) != b[%d] (0x%04X)\n",i,a[i],i,b[i]);
exit(1);
}
}
}
int main()
{
static short int a[4]={0x0304, 0x8999, 0xef12, 0x5678};
static short int b[4]={0x0403, 0x9989, 0x12ef, 0x7856};
test2(4,a,b);
printf("all tests pass\n");
}
|
|
|
|