|
|
I'm not useing any classes for the dialog or anything. I just created the dialog in the resource editor and I am useing DialogBox() to show the dialog box and a Window Procedure to handle it's messages. I am trying to use SendMessage() to operate the progress bar. I tested this in another program by just simply haveing the progress bar go up everytime a button was pressed and it worked fine. That led me to believe it was a problem with my PumpMessage() function or that I may need a second one for the progress bar's hWnd.
Thanks,
Jon
|
|
|
|
|
So I assume that "not useing any classes" means you are not using MFC. Correct?
|
|
|
|
|
I figured out why it wouldn't work... it was a stupid mistake, involving a global hWnd that had the same name as several local hWnd's, he he rookie mistake.... While I was trying something it just all the sudden clicked in my mind what was wrong...
But thanks for trying to help..
|
|
|
|
|
I used the CXTabCtrl found on this site because i though it would be easier to implement each of my tabs as dialogs. The problem is that I can no longer use a GetDocument() call in my dialogs to access the date in my CMyAppDocument class. How do I get that pointer from within my dialogs?
Thanks for any help.
|
|
|
|
|
Hello all!
Can someone explain the way the registry entries are handled for common files? I'm using SuperPIMP installer from Nullsoft (opensource!) and I need to install some common files. I think I have to add the functionality into the installer.
I think you add 1 to the proper key if it's already installed and create the key when it hasn't been installed yet. Then when you uninstall it, you decrement the key if the value is greater that 1 and delete the key if your program is the only one using it. Is this correct?
BTY, I highly recommend SuperPIMP! It's the best freeware installer out there. It has the most features, it's compact, and it comes with source included! Who could ask for more? Hats off to Justin Frankel!
|
|
|
|
|
I have created a slider in my toolbar class, How do I intercept the slider's scroll messages?
|
|
|
|
|
Category: AdvancedUI
Hello,
I'm trying to (i think) stretch bitmaps? What I'm talking about is similar to stardock's (www.stardock.com) windowblinds feature. The title bar only uses a certain size bitmap, but when the window is resized, so is that little section to span the title bar, without loosing quality.
I've done stretching with StretchBlt(), but depending on the resolution of the bitmap, and the colors (i think hehe), it distorts. I would like to know how windowblinds does it so smoothly.
I have looked at the winamp_ui, and winamp plugin lessons by James Spibey (good job). But they don't appear to do what I'm talking about, and there is alot of flickering when you resize, or move another window around the desktop.
Is there away to stretch only the middle of the bitmap or something to that extent? Whatever you suggest to be able to resize a skinned title bar. Any help is appreciated, thanks.
Geon
|
|
|
|
|
Hello,
This isn't the answer to your question but how did you use stretchblt to resize the bitmap?
You might want to try this template:
http://www.codeproject.com/bitmap/2_pass_scaling.asp
very smooth resizing.
|
|
|
|
|
I open a file for reading by typing:
ofstream datain("c:\\my_program\\data\\my_file.txt", ios::in);
The problem is, when I give the program to some people, they have the data on the c: drive while others have data on the d: drive or something different. Is there any way of opening this file without specifying the drive?
I tried typing:
"..\\my_program\\data\\my_file.txt"
as well as
"../my_program/data/my_file.txt"
but nothing has worked yet!!
Please, any response any one can give me will be greatly appreciated.
Sincerely,
Erich J. Ruth (an overworked graduate student)
|
|
|
|
|
You may retrieve the current dir, or better the executable path, and then append the name of the file.
If you want only the current drive GetCurrentDirectory() is right, just take the first char.
If you want the current executable path, use GetModuleFileName(NULL,...) and cut off the text after the last backslash. Then you may append your file's relative path.
Paolo.
|
|
|
|
|
It is mentally exhausting me trying to write something that converts a number to a dollar format. Does anyone have anything that would consider all possible cases (i.e. negative numbers, numbers less than 3 digits, ...) and that works?
Please, please, any response any one can give me will be greatly appreciated.
Sincerely,
Danielle
|
|
|
|
|
Look up the GetNumberFormat() and GetCurrencyFormat() APIs.
|
|
|
|
|
Is there any documentation or help in device handling using C++.
If any one has the idea, please share it.
Thank you.
|
|
|
|
|
Handle how?
If my question seems ambiguous then it is because your question is.
|
|
|
|
|
hi Sam,
I have to communicate with a palm print device to check for a valide palm print.
How could I manage to do it in C++ (under Windows & Linux environments), if there is no DLL for the Device.
Is there any help about such type of problems i.e. Device Handling in C++ or VC++.
If you have any information regarding this topic please let me know.
Thanx,
Riz.
|
|
|
|
|
You say it is a "palm print device"; is it a parallel interface?
Do you have documentation of how to do communicate with a palm print device? Does it say anything about "IrDA"?
|
|
|
|
|
hello,
I have a seemingly simple task. I have a dropdown combobox which I use to present a list of 'things' that currently exists. The user is also free to type something in the edit box.
I want to handle the following events:
1) The user selects something from the dropdown listbox - I then present the details about that 'thing'
2) The user types something and hits RETURN, and if it exist in the dropdown listbox I present the details about it, as above.
3) The user types something and hits RETURN, and if it doesn't exist in the dropdown listbox I create the 'thing' and clear the form so he can type in the details if he wants.
4) Bonus: If the listbox is in dropped-down mode, I want incremental search in the listbox while/if the user types something.
This is what I have done: I have a handler for CBN_SELENDOK. There, I have to check GetCurSel() and GetLBText() here. UpdateData() doesn't work. Why? But OK, I can handle the situation where the user selects an existing item.
How shall I best trap the RETURN key? Subclassing, i suppose. I have tried that but currently I get stuck in a weird situation where I click on the down-arrow but the combobox doesn't drop down!?! Strange huh!?
BTW, Which is the best way of notifying the CComboBox about the keypress in the subclassed CEdit?
Any ideas about why these suposedly simple things are so complicated to perform?
Thanks
Peter
|
|
|
|
|
I'm loading and decoding TGA, and JPEG's into a BYTE * on the freestore, and I have the width, height, etc of the image, but I dont know how to put it all into a HBITMAP so it can be drawn on a window (Aim-drawing on a tree control). If anyone has any ideas, please reply!!
Thanks.
|
|
|
|
|
Use SetDIBits(...) method.
"INFO: Rotating a Bitmap by 90 Degrees" MSDN article could give you more hints.
|
|
|
|
|
I want to change the TitleText of the MainFrame (SDI) at the initialization time of my app.
I dont want to have this Text in the Form (Document - Application).
I can use SetWindowText to do this later (after Initialization) but I didnt found out where I have to put it when
I want to change the Text to appear while starting.
Where should I put my code?
What function should I use
Thank you
|
|
|
|
|
To change the Window title you must use the SetWindowText() function as folows:
1- Override the function PreTranslateMessage() in the MainFrame Class
2- Write the SetWindowText() function here.
Regards,
Rizwan Majeed.
|
|
|
|
|
|
That's a little extreme. All you need do is remove the FWS_ADDTOTITLE style from the window and then change the IDR_MAINFAME string to say whatever you like.
|
|
|
|
|
Hi DiDi,
I haven't done this myself, but I have done this with Dialog Based apps, so I am making some assumptions here.
In your SDI, in the View class, there is a function OnInitialUpdate(). This function is called after the window is 'created' but before it is actually displayed on the screen.
In order to set the window text, the window must exist. But, I understand that you want to set the text before the window becomes visible. The aforementioned function is the perfect place to put such code.
In your View class, override OnInitialUpdate(), call the base class CView::OnInitialUpdate(), and then add your code to change the name of your window before this function finishes.
Hope this helps
Jeff
|
|
|
|