hi all~
i just built a cute window with the help of a tutorial, but met some
problem when try to repaint the window, my callback function is as
below: -
LRESULT CALLBACK WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM
-
lParam)
-
{
-
switch (iMsg)
-
{
-
case WM_PAINT:
-
PAINTSTRUCT ps;
-
HDC hdc;
-
hdc = BeginPaint(hwnd, &ps);
-
TextOut(hdc, 100, 100, "Holla !", 10);
-
EndPaint(hwnd, &ps);
-
break;
-
case WM_DESTROY:
-
PostQuitMessage(0);
-
break;
-
case WM_CLOSE:
-
DestroyWindow(hwnd);
-
break;
-
default:
-
return DefWindowProc(hwnd, iMsg, wParam, lParam);
-
}
-
-
return 0;
-
}
-
when i compile the program it reports an error like this:
[Linker error] undefined reference to `TextOutA@20'
i'm with Dev-C++, anyone help me ? tks !!! 2 3682
Try posting your query to a more appropriate forum -- i.e. one devoted
to windows programming.
If I had to guess, I'd say you're missing a statically-linked library
on your include path.
Luke
"black(flashing vampire)" <qu********@gmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com... hi all~
i just built a cute window with the help of a tutorial, but met some problem when try to repaint the window, my callback function is as below: - LRESULT CALLBACK WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM
- lParam)
- {
- switch (iMsg)
- {
- case WM_PAINT:
- PAINTSTRUCT ps;
- HDC hdc;
- hdc = BeginPaint(hwnd, &ps);
- TextOut(hdc, 100, 100, "Holla !", 10);
- EndPaint(hwnd, &ps);
- break;
- case WM_DESTROY:
- PostQuitMessage(0);
- break;
- case WM_CLOSE:
- DestroyWindow(hwnd);
- break;
- default:
- return DefWindowProc(hwnd, iMsg, wParam, lParam);
- }
- return 0;
- }
-
when i compile the program it reports an error like this: [Linker error] undefined reference to `TextOutA@20' i'm with Dev-C++, anyone help me ? tks !!!
try microsoft.public.vc.language Just don't tell them you're using Dev c++ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dan |
last post by:
Using XML::Simple in perl is
extreemly slow to parse big
XML files (can be up to 250M,
taking ~1h).
How can I increase my performance /
reduce my memory usage?
Is SAX the way forward?
|
by: Kevin Dombroski |
last post by:
Howdy - I would like my application to be able to read data from another
application. Specifically, I would like my to get the text from the "client
area" of another application's window whenever...
|
by: abcd |
last post by:
I am trying to set up client machine and investigatging which .net
components are missing to run aspx page.
I have a simple aspx page which just has "hello world" printed....
When I request...
|
by: --== Alain ==-- |
last post by:
Hi,
i was thinkging to override WNDPROC of my ListView control, in order to
control how the headers and items will be redrawn.
My purpose is to :
- keep the header format (horizontal and...
|
by: Giancarlo Berenz |
last post by:
Hi:
Recently i write this code:
class Simple
{
private:
int value;
public:
int GiveMeARandom(void);
|
by: =?Utf-8?B?RXJpYw==?= |
last post by:
Hello All,
I am currently working on an issue that has a custom control that mimics a
combobox that when it has focus it continues to generate endless WM_PAINT
Messages. The control in itself...
|
by: kiberg |
last post by:
Hi
When I listen WM_PAINT event, the cpu is max.
LRESULT CALLBACK WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
int x, y; HDC hdc; HPEN hOldPen, hPen; HBRUSH...
|
by: ayan4u |
last post by:
hi,
I am using InvalidataRect(hWnd, &rect, TRUE) to clear my client rect....does this mean that a WM_PAINT message will the invoked automatically by it....
neways fot the time being lets assume...
|
by: Phillip Taylor |
last post by:
Hi guys, I'm looking to develop a simple web service in VB.NET but I'm
having some trivial issues. In Visual Studio I create a web services
project and change the asmx.vb file to this:
Imports...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |