|
Hi,
Ive got a small dialog application which has a few popup windows which normally exist outside of the client area of the main dialog. On the main dialog there are several controls that have tooltips asscoiated with them. My problem is that the tooltips get displayed on top of the main dialog but "underneath" the other popup windows. Is there any way around this problem or is it unfixable?
Cheers,
Andy.
|
|
|
|
|
Try setting the Z order to topmost:
pWndTT->SetWindowPos(&wndTopMost, 0,0,0,0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
farewell goodnight last one out turn out the lights Smashing Pumpkins, Tales of a Scorched Earth
|
|
|
|
|
Hello,
I would like to know how can i get the following information in VC++6.0:
- Get the language use by the OS,
- Get the IP adress,
- Get the hostid,
- Get the serial number of the network card,
- Get the user login name.
Thanks for help.
S.
|
|
|
|
|
For the "language" maybe this help you:
GetInstalledLangs()
GetSystemLCID()
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
Samprayoga wrote:
- Get the IP adress,
try this:
char buf[128]; struct hostent *host; struct in_addr addr;
gethostname(buf, 100);
host = gethostbyname(buf); // host id
memcpy(&addr, host->h_addr_list[0], sizeof(addr)); // ip address
// don't forget to do error checking, though
|
|
|
|
|
Hi,
Is there anyway to get the background color for tab control in XP?
Neha
|
|
|
|
|
Hi,
I had set dc.SetBkMode(TRANSPARENT); in OnPaint() function.In OnLButtonDown() function i will hide some controls & display some new controls. But it never hides the controls eventhough i had written Invalidate().
But if i minimise & maximise the window.it is proper.
Could anyone tell me what is wrong?
Neha
|
|
|
|
|
Anonymous wrote:
dc.SetBkMode(TRANSPARENT); in OnPaint()
This call will only affect the Device Context for the extent of the OnPaint handler. So I don't think it would do what you want. You need to make use of the ShowWindow() function using SW_SHOW or SW_HIDE as parameters on the windows you want to show/hide.
Roger Allen
Sonork 100.10016
If I'm not breathing, I'm either dead or holding my breath.
A fool jabbers, while a wise man listens. But is he so wise to listen to the fool?
Please step to the rear of the car and make room for more victims. - John Simmons the Outlaw programmer, 1st Feb 2002, in the lounge
|
|
|
|
|
One more thing was i was returning TRUE inOnERaseBKGnd()..
|
|
|
|
|
I need to create a CRgn for my window which correlates to a bitmap i'm painting for an odd shaped non-client area.
It there built in functionality to create a region, say, from a 2 color bitmap?
The only way I can think of to implement it is to create a region by combining regtangles of 1 pixel size, and walking through every pixel in my bitmap. But to me, this sounds like a sh!t way of doing it; surely theres a better way?
Any one got any pointer?
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
If I understand your question, I seem to remember doing something like this in the past...
Simply select the region into the dc...
SelectClipRgn( hdc,hrgn )
Than all you have to do is blt the bitmap into the dc, it should draw only in the selected region.
"Thank you, thank you very much" Elvis.
|
|
|
|
|
You might want to have a look at Jean-Edouard Lachand's article Converting a bitmap to a region .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi,
I have a VC++ application where I have to place an Ohms icon inside the static text control.
Any idea how to do it ?
|
|
|
|
|
1. Make sure that when the string is displayed the correct character set is used.
2. The Ohms character in the OEM character set is at position 234. You can insert into your text by typeing Alt + 0234 or as an escape sequence of \352 (in octal)
Roger Allen
Sonork 100.10016
If I'm not breathing, I'm either dead or holding my breath.
A fool jabbers, while a wise man listens. But is he so wise to listen to the fool?
Please step to the rear of the car and make room for more victims. - John Simmons the Outlaw programmer, 1st Feb 2002, in the lounge
|
|
|
|
|
Thanks for your reply.
I was able to solve the problem of typing Micro as in "µFarads" (Alt + 0181).
But in VC++ editor the default character set is ANSI. So when I type Alt + 0234 I get "ê".
How do I change the character set to DOS in the VC++ editor so that I can get the Ohms character ??
|
|
|
|
|
Resizable arrays?
Can any one tell me how do you make a resizable array.
Our Instructor wants us to start an array of size 1. and just grows as you keep adding stuff to it.(it does not have to shrink).
Thanks
|
|
|
|
|
Use the vector class
#include<vector>
#include <iostream>
using std::vector;
using std::cout;
using std::endl;
int main()
{
vector<int> reszarr(1); //create a single element int vector
//whenever you want to put in an extra value it goes on resizing
reszarr.push_back(20); //here 20 is element number 2
reszarr[0] = 10; //populate the first element
//To display contents of reszarr
for(int count = 0;count < reszarr.size();++count)
cout << "Element Number: " << count+1 << " " << reszarr[count] << endl;
return EXIT_SUCCESS;
}
//for displaying the elements you can also use a iterator
#using namespace std;
vector<int>::iterator inIter;
for(inIter = reszarr.begin();inIter != reszarr.end();++inIter)
cout << *inIter << endl;
Atul
Sonork ID : 100.13714 netdiva
|
|
|
|
|
I am not supposed to include anything for this project
that's why i have to create my own resizable array. so i can't use the vector class from the lib.
so again.
Can you tell me how do you make a resizable array?
Thanks
|
|
|
|
|
I am not supposed to include anything for this project
that's why i have to create my own resizable array. so i can't use the vector class from the lib.
so again.
Can you tell me how do you make a resizable array?
Thanks
|
|
|
|
|
Use realloc function.
Example:
<br />
char * flexBuff;<br />
flexBuff = (char *)malloc(1); <font color=green><nobr>
flexBuff[0] = 'a';<br />
flexBuff = (char *)realloc((void *)flexBuff, 10);<br />
<font color=green><nobr>
Volodya Orlenko,
orlenko [at] hotmail [dot] com
|
|
|
|
|
Hi Marwan
Are you the same guy as marouane miftah el kheir ?
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
or are you'll twins?;P
Just kidding. Anyways it is a valid point are you'll both the same? And Marwan? Is it a shortened form of anything?
Have you troubled your project giver? Is that the reason why he is troubling you??
Just a few questions <marquee direction="LEFT" behavior="ALTERNATE" scrolldelay="1" scrollamount="20">zippedpast me...
Atul
|
|
|
|
|
I'd recommend a class which creates an array that resizes by some sensible amount, keeps track of how much of it is used ( i.e. allocates more memory than it needs instead of allocating every time ), and then creates a new array using new when needed, and copies it across, deleting the old one which is too small. I would not use C functions such as malloc, even though new calls malloc internally.
I believe that is how vector works.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
All,
I am working on a simple application, using the WTL. The only child of the main window is a subclassed CEdit control. I have handled the WM_NCCALCSIZE message in the CEdit control to lock its size to 80 characters by 24 characters.
The problem that I need help with is that that main frame is always the "windows default" size. I would like the client area of the main frame to be the exact size of the child window. I tried to handle WM_NCCALCSIZE in the main frame class, but alas, it is called before WM_NCCALCSIZE and WM_CREATE in the child window.
The effect that I am trying to achieve is simliar to the appearance of the GVim program, if that is of any help.
Thanks!
--
Paul
"I drank... WHAT?"
|
|
|
|
|
Look at the implementation of CScrollView::ResizeParentToFit (at <VisualStudio>\vc\mfc\src\viewscrl.cpp ), maybe you can copy and paste that code to your project to achieve a similar effect.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|