|
Hi,
I want to do the same, but without loading the bitmap on button. My buuton should only contain text.
I hope u got my point.
Please give me some suggestions...
thnaks
madhavi
|
|
|
|
|
OnMouseHover event will simply solve what u r looking for either with Image or test, just drop some code there and u will see the difference
|
|
|
|
|
hi all,
I'm having a Error when I compilled my Project.
Error is
"error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'char [15]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast"
Probelm caused Code Part:-
HWND m_hDisplay;
m_hDisplay = CreateWindowEx ( WS_EX_CLIENTEDGE, RICHEDIT_CLASS, NULL,
WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL |
ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL,
0, 0, 100, 100,
m_hWnd, (HMENU)IDC_IM_DISPLAY, GetModuleHandle(NULL), NULL);
There is a Problem in "RICHEDIT_CLASS" ..So what is the solution for that?..If anyone know this please help me ?
Thanks in advance..
|
|
|
|
|
Try the following:
CreateWindowEx ( WS_EX_CLIENTEDGE, _T(RICHEDIT_CLASS), NULL,
WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | ......
Greetz,
Davy
|
|
|
|
|
hi Davy,
Many Thanks ...I compilled it.
|
|
|
|
|
Clicked on File Menu
Selected New Project
Selected "MFC AppWizard (exe)"
Selected Dialog Based
I got a new dialog that has 2 buttons - OK, CANCEL.
Q. Where's the code that adds them? What's a newbie got to do to get with this stuff?
Q. Are there any tutorials that describe step by step application UI development with screenshots or explain what the Class Wizard does and how somethings done there can be undone?
Q. Finally, how does one create a tabbed page?
|
|
|
|
|
you need to start off by buy a book on visual c++ or taking some classes or finding lots and lots of tutorials online
and yes there are tons even here.
and creating a tab page is somewhat complicated you would need more than basic programming skill to create a tabbed page
anywhere here is a tutorial on making a dialog based app
http://www.thecodeproject.com/dialog/dialogapptute.asp[^]
|
|
|
|
|
Anonymous wrote:
Q. Where's the code that adds them?
In the project's .rc file.
Anonymous wrote:
What's a newbie got to do to get with this stuff?
Start off small and practice.
Anonymous wrote:
Q. Are there any tutorials that describe step by step application UI development with screenshots or explain what the Class Wizard does and how somethings done there can be undone?
Most start with MSDN's Scribble example. It's a very comprehensive tutorial.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
hi i am working with the following code. however anytime i size it larger or smaller horizonitly the tree view continies to shrink horizontily waht am i doing wrong?
ive tried both getwindowrect and getclientrect and neither do the job
also as you can see i want it to remain attached to the left side of the window and to just resize verticly wich works fine. can anyone help me?
<br />
CRect rect, rect2, rect1;<br />
<br />
GetClientRect(&rect);<br />
<br />
tree.GetClientRect(&rect2);<br />
<br />
rect1.top = rect.top+24;<br />
rect1.left = rect.left;<br />
rect1.right = rect.right+rect2.Width();<br />
rect1.bottom = rect.bottom;<br />
<br />
tree.MoveWindow(rect1);<br />
|
|
|
|
|
The problem is that MoveWindow() works in window coordinates, but GetClientRect() doesn't return the full size of the window, only the client area. It doesn't include the borders, or the scrollbars or anything else in the non-client area. Change tree.GetClientRect() to tree.GetWindowRect() and it should work nicely.
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"
|
|
|
|
|
Hai,
I want to print % symbol in my printf statement..
eg : printf(" Error is %.2f %",val); ie it should print Error is 5.00%
How should I do this??
thanks.
|
|
|
|
|
in order to print a % use \% if you wannt print a \ do \\ or a quote mark would be \"
they are all escape sequances similar to \n or \r
|
|
|
|
|
Using %% in the format string will output a single % symbol. So your format string should be " Error is %.2f %%" .
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"
|
|
|
|
|
Or use %c in the format string
printf(" Error is %.2f %c",val,'%');
Regards,
Andrzej Markowski
|
|
|
|
|
Hi
I am creating a simple movie player with VC++ 6, and I am planning to create a custom control in the GUI for its seeking purpose (I want to be able to modify the color and look of the seeking bar). I am unsure though, which control should I inherit from for this purpose, CSliderCtrl or CProgressCtrl? CProgressCtrl seems appropriate because the seeking bar is periodically updated when the movie is playing, however, I also want the user to move the seeking bars, something which is provided by CSliderCtrl. Could someone help me on this? Or is there another control which is more appropriate than the two?
Thanks!
|
|
|
|
|
i would use the slider control thats just my opinion since it can do anything the progress control can do it just looks different but if your gonna make it owner drawn anyways then why should it matter :P
|
|
|
|
|
I agree with the other reply. Use the CSliderCtrl and make it owner draw so it looks nicer
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,
I like ask you about an issue with the threads...
I'm working in a GUI app with threads what creates windows (2 threads & 2 windows) and i don't know how manage their respective message loops;
I was created a loop for each window...
but the trouble is when the second window (a child window in the surface of the first window) is refreshed, more exactly when i drag it to an area non visible of the screen (coords -50x, -50y f.e.) and then i drag it to an visible area, the window have vertical lines with the parent window color, and i don't know how i can solve it... ((
Please if someone cal help my I'll thank you
PS: I'm not english forgive me my bad english
|
|
|
|
|
Hi,
Have a look at this article
http://www.codetools.com/threads/usinguithreads.asp
Sujan
|
|
|
|
|
Hi Sujan,
Thank you for your answer.
I had do how you told me, but I'm trying to do it without the MFC, the trouble is what i've refresh problems in the child window, i think what it's because i must wait in the message loop, with any function as WaitForMultipleObjects as the MSDN says, but i don't know how i can implement it, i really want to know how i can solve that problem
|
|
|
|
|
You need to use MsgWaitForMultipleObjects and when you get messages, they are processed by your message loop. If you only use WaitForMultipleObjects, then when WM_PAINT and other messages show up for your second window, they are not processed until your thread is unblocked by some other event it was waiting upon. You can look at the MFC code to see how they do this with their main message pumping loops, and you could mimic something like that.
Otherwise, when you get WAIT_OBJECT_0 + nCount you need to process messages with GetMessage, TranslateMessage and DispatchMessage.
This way, your thread either waits on one of its events, or unblocks when messages are available for the window to process.
|
|
|
|
|
Thank you Blake, now excuse me, but can you explain me what are the objects what i'must put in the 2nd argv.
Please!!! i don,t understand too much about how it works.
What i must create to take the respective handle??
Thanks
|
|
|
|
|
The first argument is how many handles are in the array passed to the second argument.
The handles are handles to 'waitable' objects such as mutex, event, semaphore, thread handle, process handle, etc.
The MsgWaitForMultipleObjectsEx function can specify handles of any of the following object types in the pHandles array: Event,Mutex, Critical section, Semaphore, Process, Thread
|
|
|
|
|
Blake,
then you are trying to tell me what i can use the handle of the first thread for this function, no??
amonng another things what i can use?
Please can you give me an example of that please!!!
I'm to much grateful, THANK YOU!!!
|
|
|
|
|
If you are waiting on a thread or process handle, they are not 'signaled' until the thread or process exits. You can wait on a process handle from a call to CreateProcess, for exmaple, to detect that the created process has terminated. If the main thread of oyur program creates one or more secondary threads, you can put the thread handles into an array, and be 'signaled' when one of the threads exits. However, since you said your thread also made a window, you need to use MsgWaitForMultipleObjects so that your thread can process the window messages.
|
|
|
|