|
Hi
I am drawing on a dialog that is a child for other dialog
in the child dialog am handling the right click event ,in this handling and at certain condition i need to notify the parent dialog that a click happend at the child dialog?
any help is appreciated
thanks alot
|
|
|
|
|
Tarek Jabri wrote: i need to notify the parent dialog that a click happend at the child dialog?
You can use SendMessage to send a user defined message from the child dialog to the parent dialog.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Help !
I'm looking for the reverse API of LoadBitmap.
where can i find a function, or an implementation
who takes a CBitmap object and pushing/adding
it back to the resource....
resource of some other(not running)program.
i want to create RT_BITMAP resources dynamically.
10x in advanced.
me.
|
|
|
|
|
Have a look at the UpdateResource API.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
The followings are there declaration:
const value_type *data( ) const;
const value_type *c_str( ) const;
but I thank they have the same use.
|
|
|
|
|
The later is guaranteed to end with '\0' . The former is not.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
I have tested them.
string str( "Hello world" );
char szTemp1[12], szTemp2[12];
strcpy(szTemp1, str.data());
strcpy(szTemp2, str.c_str());
when I view the memory, szTemp1 and szTemp2 have the same content,
and both of them end with '\0'.
// szTemp1: 48 65 6c 6c 6f 20 77 6f 72 6c 64 00
// szTemp2: 48 65 6c 6c 6f 20 77 6f 72 6c 64 00
|
|
|
|
|
ustclover wrote: when I view the memory, szTemp1 and szTemp2 have the same content,
and both of them end with '\0'.
Note the word "guaranteed". The C++ Standard requires c_str to return a pointer to an array that ends with `\0`, and it does not require (nor forbid, for that matter) for data .
The implementation you tested obviously returns a pointer to the same piece of memory in both cases, but it is not necessarily the case for all implementations.
Also, have you tested the case when you have an empty string? c_str() would be guaranteed to return the pointer to `\0`. For data() , again it is implementation dependent, but I would be surprised if it returned the same thing.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
I have tested the case for an empty string too. Though the result is same with the nonempty case, I have believed what you said is right. Thank you again
|
|
|
|
|
Hello
I want to use SetBitmapbits function but I can,t I need a sample code or a Guidance
thanks
Agh
|
|
|
|
|
|
how can i launch a programm before session openning?
am
|
|
|
|
|
I assume you mean before a user logs in. Write the program as a service, and install it to run automatically.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi all, I'm new to Visual C++. I have created my Forms for an application. How do i link the FOrms...so that on a click event, an existing form exits and a different Form loads. Please help. Tks
-- modified at 8:02 Sunday 12th March, 2006
|
|
|
|
|
|
No the Forms were mostly from scratch. i know how to get a button event handler to work. But i dont know how to link that handler to "load" the next Form and destroy itself...
|
|
|
|
|
Is it possible to fix the directory of the File Open/Save dialog and NOT allow the user to change it ?
For example:
c:\fixeddiretory
|
|
|
|
|
I guess your program could just ignore the path.
|
|
|
|
|
If you just want to let the user pick a file from a single directory, it might be better to just have your own dialog with a list that you populate yourself.
Software Zen: delete this;
|
|
|
|
|
Hey guys! i wna use glut functions like glutMouseFunc or glutKeyboardFunc outside of the int main(int argc, char **argv) . How can i do this??
Please help!!
AmanN
|
|
|
|
|
See two threads below.
Best regards
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
Hi,
I have a problem with the output of CBitmap images to Adobe Distiller. I can see my bitmap in the view and the preview. Printing is also fine. But the output into pdf does not work. Text and other graphics like lines or boxes works fine, only bitmaps are not visible.
Is there anybody with a solution in the world?
Greetings from Hannover, Germany
Markus
Dr-Kuulun
|
|
|
|
|
I forgot my code:
CDC dc;
dc.CreateCompatibleDC(pDC);
CBitmap b;
b.LoadBitmap(IDB_BITMAP1);
dc.SelectObject(&b);
pDC->StretchBlt(100,100,200,200,&dc,0,0,48,48,SRCCOPY);
pDC->MoveTo(0,0);
pDC->LineTo(100,100);
The line is visible but not the bitmap.
Dr-Kuulun
|
|
|
|
|
Hi Dr-Kuulun
I run your code and this work.
I enter CDC *pDC=GetDC(); that I dont find in your code
CDC dc;
CDC *pDC=GetDC();
dc.CreateCompatibleDC(pDC);
CBitmap b;
b.LoadBitmap(IDB_BITMAP1);
dc.SelectObject(&b);
pDC->StretchBlt(100,100,200,200,&dc,0,0,48,48,SRCCOPY);
pDC->MoveTo(0,0);
pDC->LineTo(100,100);
|
|
|
|
|
Hey guys!!
How can I use the following GLUT functions without having to include them in main(int argc, char **argv) ??
glutMouseFunc(Mouse);<br />
glutMotionFunc(MouseActiveMotion);<br />
glutPassiveMotionFunc(MousePassiveMotion);<br />
glutEntryFunc(MouseEntry);<br />
glutKeyboardFunc(NormalKeys);<br />
glutSpecialFunc(KeyInput);
I'm trying to implement a camera using GLUT but the thing is I have to use this inside an OpenGL window that ive integrated in MFC. I have a separate class for my camera functions like void CCAMERA::Mouse(int button, int state, int x, int y)
But the compiler wont let me do this:
glutMouseFunc(Mouse); or this glutMouseFunc(CCAMERA::Mouse); or even when I instantiate my class as Camera and do this: glutMouseFunc(Camera.Mouse); , it wont let me.
Please help!
Thanks in advance guys
Aman N
|
|
|
|