|
Thanks!!
That's what I was looking for.
Everything's beautiful if you look at it long enough...
|
|
|
|
|
Hi everyone,
First thanks for all of your help. It helps improve my knowledge everyday. Now for my next attempted trick I've created a dll which has a bunch of dialogs meant to pop up when called by an external app.
one of these dialogs requires the use of InitCommonControlsEx() becuase it uses the Progress control. I have initialized everything, and when the function is called it goes through the initialization process fine, but the dialog box NEVER gets displayed. I have no idea why. Here's my init code:
INITCOMMONCONTROLSEX InitCtrls;
// Initialize the common controls
InitCtrls.dwSize = sizeof(INITCOMMONCONTROLSEX);
InitCtrls.dwICC = ICC_PROGRESS_CLASS;
InitCommonControlsEx(&InitCtrls);
hTemp =CreateDialog(hDllHInstance,
MAKEINTRESOURCE(IDD_WORKING),
hWnd,
IuxWorkingDialogBoxWndProc);
if (hTemp == NULL)
error = GetLastError();
And the initialization in the WndProc (clipped from the rest of the function):
HWND m_hProgress;
switch( msg ) {
case WM_INITDIALOG:
m_hProgress = GetDlgItem(hDlg, IDC_PROGRESS);
SendMessage(m_hProgress, PBM_SETRANGE, 0, MAKELPARAM(0, m_progressRange));
SendMessage(m_hProgress, PBM_SETSTEP, 1, 0);
m_progressCounter = 0; // reset the progress counter
return 1;
break;
Any suggestions? Thanks in advanced.
|
|
|
|
|
Stupid me. I knew it was something dumb. I forgot to set the dialog to a popup. It was set to child. Doh!
Thanks anyways!
|
|
|
|
|
I have an app and I have created several icons for it in the one icon file. These are:
32x32 16M colors
32x32 256 colors
32x32 16 colors
16x16 16M colors
16x16 256 colors
16x16 16 colors
I'm running XP Pro and Home here at my office, and the icons show up fine. One of my beta testers, however, is running Win2K and he says the icon in the tray looks like a gray box.
Just wondering if there is something I did wrong - I thought by including both sizes and a variety of color depths, the O/S would use the appropriate icon and not have to muck it up any.
Thanks in advance...
Tommy
Tommy Evans
Trinity Technologies
|
|
|
|
|
Render a set of 48x48 pixel icons.
48x48 16
48x48 256
48x48 16M
Kuphryn
|
|
|
|
|
Just curious - what will that do for me?
|
|
|
|
|
48x48 pixel is the desktop icon.
Kuphryn
|
|
|
|
|
This is probably because the older Windows taskbar does not display 256 color and above icons. Make sure your tray icon is a 16 color icon, at least, if you're on an OS prior to XP.
|
|
|
|
|
Well, I do have a 16-color in the icon resource. Does the order of the icons matter? Currently I have 16M, 256 then 16 in that order.
Thanks!
|
|
|
|
|
The ordering of the images in the ICO file matters. You have to order them from lowest color depth to highest. Pre-XP OSes will choke on the 16M color image, as you've found out.
--Mike--
PROCRASTINATION: Hard work often pays off after time, but laziness always pays off now.
BUY MY SOFTWARE!! (please?) RightClick-Encrypt | 1ClickPicGrabber
My IntarWeb Homepgae!!!11
|
|
|
|
|
When adding a custom control to a dialog resource, I can add a hex value for the Style.
How can I know that values that I can put in there ? beside looking at a .h file and doing all of the OR myself ?
and if I have the 0x50810000 value, what are the styles that are added to the custom control ?
Max.
Maximilien Lincourt
For success one must aquire one's self
|
|
|
|
|
You would have to look the values up in the header file. AFAIK that is the only way.
0x50810000 => WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Heya,
I've writing an application to interface with a telnet client to provide a nice graphical front-end to a remote piece of hardware. Unfortunately, the telnet interface is designed to be parsed by a human and so has no nice features like terminators and has random lag. Delays as long as 250ms are routine and although this poses no problems for a human reading the response; plays havok with an automated front end.
I was wondering if people out there had come across similar problems and what solutions they've tried and the success they've had. Currently, my sockets code runs with an 80% chance of getting all the data from the device. The big issue is that it is sooo slow as I deliberately wait for 250ms just in case.
Any ideas... Iain
----
"I would be careful in separating your weirdness, a good quirky
quantum weirdness, from the disturbed weirdness of people who take
pleasure from PVC sheep with fruit repositories."
|
|
|
|
|
I might be on completely the wrong track here but, it's sounds like you are using select() with a 250ms timeout and are using synchronous style comms (i.e. select() will block). Why not take a look at a non-blocking mode of operation and use WSAAsyncSelect()/WSAEventSelect() or use the callback mechanism offered by WSARecv. This will move your code to an asynchronous style of operation and mean that you should pick up all packets, no matter when they arrive.
Hope this helps,
Phil
|
|
|
|
|
I am trying to do what the previous post was, only I am not calling the new class. I am using the following code:
extern CHjipaperlessApp theApp;<br />
<br />
CMultiDocTemplate *pTemplate = (CMultiDocTemplate*)theApp.GetDocTemplate(3);<br />
<br />
ASSERT(pTemplate);<br />
<br />
CDocument *pDocument = pTemplate->OpenDocumentFile(NULL)
This launches a view class, but I want to pass an array to this new class. Any suggestions?
Much Thanks,
Michael Shuster
Good judgement comes from experience; Experience comes from bad judgement.
|
|
|
|
|
There are several solutions. One solution is to pass in objects via contructor or call some other function after creation.
Kuphryn
|
|
|
|
|
After the OpenDocumentFile() call, you have a pointer tot he document, can't you just call a function on it and pass it the array as a parameter?
You may have to cast the pDocument pointer to the correct type to do it.
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
Hi, I have a problem passing variables between classes (I am new to C++) and I am trying to implement a class for data manipulation in VC++.
I have an array loaded from file in the dialog class of the app that I wish to pass to the other class for various operations before being returned to the dialog class for output to a new file.
This is probably a very straightforward query but I am struggling to get this running and would appreciate any advice or help anyone can give.
Thanks,
Charlie.
|
|
|
|
|
Use references. Add a member to "the other class" of type reference (ie., CStringArray& m_array). Pass the real array in your dialog class to the class's constructor:
CMyDlg::OnWhatever()
{
COtherClass oc(arrayFromFile);
...
}
...
COtherClass::COtherClass(CStringArray& array) :
m_array(array)
{
}
Regards,
Alvaro
There are no stupid questions, but there are a lot of inquisitive idiots. -- despair.com
|
|
|
|
|
Hello again, I was wondering if someone could inform me how to display a bitmap and text on a button, if that is possible?
I would at least need to know how to get a bitmap displayed on the button, and could just add the text to the bitmap, if needed...
Also, because I am using API, I would appreciate a no-mfc version of how to do this. Thanks.
God is dead. - Nietzche
Nietzche is dead. - God
|
|
|
|
|
I need to know as this filter works, like valued to the users, where entrance the parametros of validation, etc. I need to install it in a system that validates the users while they are within the site, allowing or denying access against its privileges, thanks!!!!
|
|
|
|
|
I'm programming in visual c++ (vs6) for a while now, and I always get the same difficulties with transferring projects from one machine to the other.
I have 2 machines, both win98. But the first is win98/osr1 in english, the latter is win98/osr2 in dutch.
Transferring projects will always result in resource exceptions. Probably, opening an english resource (...and the whole project) on a dutch machine is impossible. I have to delete half of my project an rebuild it again, loosing much data.
Is there some sort of way that ignores languages in resources? Or maybe a way to kick out all language related problems all together (even better)?
btw. Next to US-english stands this: [standard]. In my opinion, this US-english is not a standard, far from it...
using: [VISUAL STUDIO 6.0 sp5] [WIN98/2]
|
|
|
|
|
Hi all,
I am cooding an application for sending key-strokes to an other application. For example, sending a ctrl+C to to the target application. Because the target application will be non-MFC application(e.g Java applet, OpenOffice...etc), it may not be able to use the WM_XX message.
Do you have any great idea to do so?
Cheers,
Tony
Enjoy Coding.
|
|
|
|
|
|
Hi,
is there a Win32-API with which I can programmatically remove a usb-device (especially usb-drive)?
Any help appreciated
Rainer
|
|
|
|