|
thanks both of you, got the point.
makes me wonder how people would have managed to code if there was no dynamic dispatch.
|
|
|
|
|
Hi people, I need to create a toolbar in at least 256 colors, but when I create the resource it says I can only use 16 color images.
I'm using VS 2003 C++
Any idea on how can I create toolbar resources in hi color?
Thanks a lot
|
|
|
|
|
You need to edit the toolbar bitmap in an external image editor; or even the bitmap editor in VS.net, but NOT the toolbar editor.
|
|
|
|
|
Yeap, thanks, I find the solution.
steps, just in case someone someday needs to know the same.
1 - Create the image with an image editor as Maximilien says.
2 - Create a normal toolbar with the crapy 16 colors.
3 - Set the new bitmap size in the toolbar
4 - And Before showing the toolbar...
<br />
CBitmap bitmap;<br />
CImageList imageList;<br />
bitmap.LoadBitmap(MAKEINTRESOURCE(IDB_TOOLBAR));<br />
imageList.Create(80, 32, ILC_COLORDDB|ILC_MASK, 13, 1);<br />
imageList.Add(&bitmap, RGB(255,0,255));<br />
cToolBar.SendMessage(TB_SETIMAGELIST, 0, (LPARAM)imageList.m_hImageList);<br />
imageList.Detach();<br />
bitmap.Detach();<br />
|
|
|
|
|
I have an MDI application. Is there any way to display an
modal dialog box after the entire application is initialized?
I want to put together sort of a welcome dialog box.
I tried putting
CMyDialog dlg; dlg.DoModal();
all over the place, but nothing seems to work correctly. I can
display a modal dialog before anything is created, but Im trying
to get it to display after the application is first initialized.
Please, any response any one can give me will be greatly appreciated.
Sincerely,
Danielle Brina
|
|
|
|
|
DanYELL wrote: I tried putting
CMyDialog dlg; dlg.DoModal();
all over the place...
In the view's OnInitialUpdate() method?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DanYELL wrote: I want to put together sort of a welcome dialog box.
Is this for a "trial" version? Otherwise that is just annoying.
"Alot of the people on this forum are incredibly stupid, thinking that the internet is real" Score: 1.0 in the Soap Box
led mike
|
|
|
|
|
Hi all,
When using the wprintf function, what indicator must one use if you would want to display a date:
wprintf(L"\tUser Password Age: %d\n", pBuf->usri1_password_age);
Thanx in advance
Only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Programm3r wrote: When using the wprintf function, what indicator must one use if you would want to display a date:
That all depends on what format the date is in. If it's a string, use %s .
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Well, the format will be in a .... not really sure ..
But i'll try the %s.
Thanx for the reply David
Only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
First you want to use the safe version wprintf_s[^]
See GetTimeFormat[^] and GetDateFormat
"Alot of the people on this forum are incredibly stupid, thinking that the internet is real" Score: 1.0 in the Soap Box
led mike
|
|
|
|
|
Thanx for the help
Only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
|
I really must refresh the page more often!
|
|
|
|
|
You can use CTime time = CTime::GetCurrentTime();time.GetDay();...
|
|
|
|
|
I Created an User Interface Thread and Activated that, with
AfxBeginThread(), Ineed to post a message To thread immediately after creation, But MessageLoop Not Work at that time. one millisecond Sleep() can Solve The Problem But In My App Not Acceptable.
Any Idea,Suggestion,Help?
Thanks a lot.
M.Mehrdad.M
|
|
|
|
|
You are right in that after you called AfxBeginThread(), you cannot tell when the thread is actually up and running. A normal approach is to make your UI thread to notify the main thread at the very beginning of the thread function, presumably before the thread loop.
Best,
Jun
|
|
|
|
|
M.Mehrdad.M wrote: Ineed to post a message To thread...
Which thread? Which one is sending and which one is receiving?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: Which one is sending and which one is receiving?
newly created thread must get a message in it's message que.
|
|
|
|
|
The main thread needs to wait until the second thread's message queue is ready. The steps go like this:
1. Main thread creates an event object that the second thread will be able to access
2. Main thread creates the second thread
3. Main thread waits on the event, so it will block
4. Second thread calls PeekMessage() during its initialization to create a message queue for itself
5. Second thread signals the event
6. Main thread wakes up and now the second thread's message queue is available to receive messages
|
|
|
|
|
thanks a lot Mike,
Michael Dunn wrote: 5. Second thread signals the event
I had same idea, too. but the problem is when newly created
thread must set that Event
with best regareds, M.Mehrdad.M
|
|
|
|
|
The original thread creates the event.
The second thread OPENS the event, and can signal it just fine.
Otherwise, the secondary thread can receive the handle to the event too, if you wanted. It should have no problem signaling the event, whether or not it has a message queue.
Any sufficiently gross incompetence is nearly indistinguishable from malice.
|
|
|
|
|
Hello,
I have Visual C++ program that implements Graphical User Interface (GUI). This program uses CWinApp, CFormView, CFrameWnd, and CDocument.
Now I need to package this C++ application to work as COM DLL (or ActiveX).
This program must be used as popup window from another program written in Java.
Is it possible to convert Visual C++ program with GUI into COM DLL or ActiveX ?
Please advice.
|
|
|
|
|
1111 1
1 11 1
11 1
111
111
111
hi, experts,really need your helps, i have one project to do this using C++.
this is just only a example, In this problem, you can see that the hole inside many 1 consider call void element=V, two 1 which is quite far away from others is call exceptional element=E, the total number of 1 is =A; i need to use the C++ to calculate the result S = (A-E)/(A+V), for example this case s = (21-2)/(21+1)=0.86.
So how to write a C++ program, to search the void element, the exception element as well as the total number of 1 and calculate the result??
i am so eager to know the knowledge about this, may anyone give me a hand???
Your great help will be appreciated!!, thank so much.
please send to my email sinbearzc@hotmail.com if you can give me a help, thank..
|
|
|
|
|
sorry, the formation show out is not the same as i want to type, i have to choose another way, as below, thanks
1111
1 11
1111
1
1
111
111
111
|
|
|
|